How do I install GRUB to a USB drive using Windows Vista?

4

2

I'm trying to build my recovery usb key drive. I'd like to use GRUB as my bootloader.

How do I install GRUB to my usb's MBR?

Lots of examples out there seem to expect I'm running Linux.

Dane O'Connor

Posted 2009-09-17T20:31:51.080

Reputation: 1 118

Answers

1

Ultimately I used this video for guidance.

Basically, the goal is to install the grub4dos loader to the MBR of the usb drive and copy its program/configuration files to the drive's root. To do this, you download grub4dos (the program) and grubinst (a utility to add the program's loader to a MBR).

Grubinst has 2 clients, a gui and a command-line utility. The video leverages the gui. It didn't work correctly for me - yelling that there was something wrong with my drive's partition table. Running the command line client worked though. If you run into the same problem look at the readme for options and use the gui to grab the hd# of your usb drive.

I considered UNetbootin but I

  • didn't want a tool to do this for me (wanted more understanding)
  • wanted to add many bootables to the usb

Dane O'Connor

Posted 2009-09-17T20:31:51.080

Reputation: 1 118

1

See here: Install Ultimate Boot CD (UBCD) to a Flash Drive in Windows

This worked for me. All the GRUBs are on it, plus extras. And it's all free. Just download the USB installer and Utimate CD ISO. Run the installer, follow its prompts.

madestmax

Posted 2009-09-17T20:31:51.080

Reputation: 11

1

You can refer to this article - it worked for me. Edit the menu.lst to suit your needs.

The OP wants to install GRUB through Windows, and only Windows.

Try WinGrub.

caliban

Posted 2009-09-17T20:31:51.080

Reputation: 18 979

This is my reference article. How do you get to the "grub>" shell from windows? Is it an exe in the grub download? Also, how do I get the hdId of my usb drive? – Dane O'Connor – 2009-09-17T21:27:01.950

Not amenable to even running a LiveCD???? Okay okay edited my answer, you can use that. – caliban – 2009-09-17T21:31:07.200

I'm running from a location without a cd drive. This whole exercise is so I can get a "live usb". – Dane O'Connor – 2009-09-17T21:38:14.813

Oh, do try WinGrub then, or you can also try Grub4DOS found on the same page. – caliban – 2009-09-17T21:44:40.853

1

UNetbootin is a good tool to install entire distributions on a USB flash.


A reference to the Super Grub Disk wiki page on How do I boot an USB hard disk?

In order to GRUB or SGD to boot a USB drive, pendrive or hard disk your BIOS computer has to offer the usb drive as a boot drive.

If your BIOS does not let you boot your pendrive with F8 or F12 keys or by setting up your BIOS hard disk boot order with F1 or SUPR keys at boot... it does not mean that it cannot offer the drive to GRUB to be booted.

You can use UNetbootin to install SGD to your USB Flash.

The WinGrub technique also looks good and
you might be able to use the notes in my references for understanding the steps better.

nik

Posted 2009-09-17T20:31:51.080

Reputation: 50 788