How to create a USB boot drive (like the old boot floppies)?

I have a Dell laptop with Windows XP installed, and for various reasons (Help: I borked my WindowsXP boot when installing OpenSUSE 11.3) I can not install a GRUB boot loader to the first hard drive (hd0).

I currently have a second hard drive in this laptop with a perfectly working OpenSUSE 11.3 instance, but no way to boot into it. I remember back in ancient times, a common option with Linux distros was to create a boot floppy to boot into Linux rather than installing GRUB or LILO to MBR. Since this laptop doesn’t have a floppy drive I’d like to do the same thing with a USB stick. Is there any way to install GRUB (or something similar) to a USB stick? What I am not asking here is whether I can put a full, bootable Linux instance on a USB drive - I only want a boot loader on USB that launches to the appropriate mount point on (hd1).

You could put grub MBR and just a boot partition ( only contains /boot) that contains the main grub and kernel with the root home and swap partition on the second hard drive. Not sure if the installer will do this for a USB device. If the installer sees the device you should only have to tell the installer to install grub in the NBR of the device and create a 100 meg partition and mount it as /boot.

So openSUSE and in particular, grub do indeed work properly when ran from an external (or second) hard drive. The issue is really the same for any computer when you decide to boot from a drive that is not the first boot drive. For instance lets say I have a sda and a sdb, sdb is based on hardware to be second, but if I boot from sdb through a BIOS setting or manipulation, grub did not know that when it was installed. If you put grub on the boot drive when it is first or sda, all things work, even if openSUSE is on sdb.

So, what is the problem/fix when you install openSUSE and grub to an external hard drive?

  1. You must be able to select the second hard drive as your booting drive in your BIOS setup for any of this to work.

  2. What ever boot drive you select by any BIOS means is HD0. That is the problem in that if I boot from sdb, then it is HD0.

  3. When you installed openSUSE, you did not boot from the external hard drive, so it was NOT labeled by grub as HD0. openSUSE has no way to even guess what hard you are intended on booting from if it is not the first hard drive!

If it is a new install (no existing partitions on second hard drive) here are the basics I would follow.

  1. Keep the number of partitions at four or below. (Like SWAP (2GB only), / [root] as EXT4, /home as EXT4 & /Software (NTFS or FAT32 so Windows can see it and allow easy file sharing).
  2. Use all Primary Partitions (no logical Ones)
  3. Install a generic Master Boot Record (MBR)
  4. Install Grub in the “/” root partition. Make this the Active or booting partition.
  5. During the install, you must modify the booting section so that the external drive is HD0 in and in the menu.lst file. Assign other hard drives in the remaining hardware order.
  6. I highly suggest you create a separate partition for /home as it is helpful anytime you reinstall openSUSE to maintain.
  7. I would make any forth partition compatible with Windows, such as FAT32 or NTFS. The openSUSE Partitioner can not create a NTFS partition. As long as there are only four partitions total, you can create the NTFS BEFORE you install openSUSE. Just leave 80 GB or so NOT partitioned and free or you can come back later and add a NTFS or FAT32 partition. However, it will not be added automatically to your fstab file if it does not exist when you install openSUSE.
  8. When you install openSUSE and Grub on an external hard drive, you only need to remove the external hard drive for Windows to boot normally. Further, as long as the Windows drive is normal, you can load any Windows service pack without error by simply removing the external hard drive.

That is it in a nutshell. Do the above and it will work like a champ. Be for warned that you are trying to NOT install anything on your normal boot drive. Make sure that the booting section is setup just as I say above. Make a backup of any Windows partitions you can not save or restore.

Thank You,

Thanks for the detailed reply jdmcdaniel. Unfortunately I’m not in a position to do this as a new install (see the linked thread in from my first post above), and it’s not really an option for me to go into BIOS and change the order of my boot devices every time I want to run OpenSUSE instead of Windows. What I can do is set BIOS to look for USB as the first boot option - that way if I have a bootable USB key inserted and it has something like GRUB installed, I can boot to my OpenSUSE installation that way.

The machine currently has Windows installed on hd0 (sda). It also has a windows bootloader installed here. I can not and will not touch this boot loader. See the linked thread for gory details. The internal caddy tray drive hd1 (sdb) has a functional OpenSUSE install on three partitions (/, /home, and swap). IIRC sdb2 is the / mount point but I’d need to doublecheck.

So if I can get a bootloader installed on a USB key, and create a boot entry that points to sdb2, and make sure I have the right parameters in the boot entry, I should be able to access linux. That’s the high-level plan anyhow, now I just need to figure out the details to make it work.

First off, we will add a grub menu.lst option to run Windows when the external drive is connected and Windows will just run automatically when the external hard drive is not connected.

Give me that fdisk -l command here in this thread to see what is in your second drive or just a manual list of the partitions and disk size for the external drive. We just need to have only one Windows partition on the second hard drive and 80 GB of free space and we are in like Flint if you BIOS can be set to boot from the second drive. Again, your fist drive takes over when the second is not plugged in and a Windows load option will be included in the grub menu when the second hard drive is connected.

Thank You,

Can I suggest the Ultimate Boot CD with its partition managers? AFAIK, its only CD but booting the CD to SmartBoot Manager might solve your problem.
Then if there’s an option to install Smart Boot Manager or Grub2 to the USB instead then you’re done.

Out of curiosity I looked at some of the UBCD boot partition programs and some of them can be installed to a floppy.
Here’s one from :wink: another Linux forum Grub 2 Basics - Ubuntu Forums