Linked by Eugenia Loli-Queru on Mon 16th Jan 2006 04:07 UTC
Hardware, Embedded Systems "Booting a computer from your USB flash drive may seem like a daunting task, but it is actually quite easy. With the right equipment and some basic knowledge this very useful technique can be taken advantage of in all sorts of different circumstances. This article goes over booting your Windows or Linux system from USB as well as booting directly into Linux and a few other details of the process."
Thread beginning with comment 86144
To read all comments associated with this story, please click here.
How can I boot through local bootloader?
by Dolphe on Mon 16th Jan 2006 05:51 UTC
Dolphe
Member since:
2006-01-16

The instructions for the hardware were pretty straightforward. The suggestions for special distros should be useful.

However, if someone knows, please please tell me:
How can I boot to a USB drive FROM a local bootloader?
For example, 1) let my computer boot as normal to LILO (or GRUB, or NT loader), 2) If I want to load the local Windows installation I press 1, but if I want to load the USB linux drive, I press 2.
How can I do that??

This situation would not be handled by the BIOS, of course, it must be handled by the bootloader.
I have looked into some commercial and propietary apps like System Commander, PQ's bootloader, zBootManager, and bootman.
It seems LILO would be the best candidate, since GRUB works only in Linux AFAIK, and requires its config file always to be visible, which can't be guaranteed with the removable drive.

Please provide pointers. Neither Google or Altavista have done.

Ford Prefect Member since:
2006-01-16

Hi,

you should create a little partition for boot files on your hard disk (could be 128 megs or so). There you store your grub config and kernel image. Then you set up your boot entry to boot the kernel image from the hard drive but with the partition on the usb drive as root= parameter. So effectively, you boot up from the usb storage.

For this to work you only need to have a kernel with the apropriete stuff compiled in for usb and usb mass storage, or a inird kernel.


Perhaps this could also work with files on a fat partition, I don't know if it's possible to read fat for grub, but I guess so. Also you should check out grub 2, which has more features than grub and perhaps supports usb, too.


Ford Prefect

Reply Parent Bookmark Score: 1

Dolphe Member since:
2006-01-16

Thank you for the pointers. I did not know there was a GRUB 2 in the works. I went out searching about it, and found this how-to while doing that [ http://www-128.ibm.com/developerworks/linux/library/l-fireboot.html ].
The most important line for me in the tutorial is the following:
I was also able to install a boot loader in the MBR of the internal drive and use that to boot the USB drive (where it appeared as hd1 in GRUB).

I usually prefer LILO, because (aside of pretty splash screens ;) ) unlike GRUB, it can still boot into the other OSes if the partition with the config file is borked (or removed). GRUB can't, AFAIK.
I know most people nowadays are biased towards GRUB, and will point that with LILO, what could get borked is the MBR.
In my case, LILO has been a more practical choice than GRUB, because 1) I don't mess with bootloader configuration once it's setup, 2) I can easily recover my MBR from a backup, and 3) I don't need to worry about sticking to a partition just to accomodate for the config file. You see, sometimes I've had to wipe the whole partition and just reformat. GRUB doesn't survive that. LILO does.

I will keep reading about GRUB 2. It seems that right now the documentation pages are not completely up yet.

At least I have been assured it can be done.
Thanks.

Reply Parent Bookmark Score: 1