Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a system with Linux and WinXP installed. Grub is set up with Linux as the default. Sometimes, I would like to plug in a USB drive, telling the computer to boot to Windows, without having to provide user input at the GRUB menu.
What I'm currently trying is installing GRUB to the USB thumbdrive. After copying my system's grub.conf to it and removing all but the Windows XP entry, I get marginal success. The first boot-up, GRUB tells me "unknown filesystem" and enters rescue mode. If I reboot from there, it works - Windows gets booted.
I'm wondering why that it doesn't just boot straight away. Either something is wrong with the USB's grub.conf, or the USB key wasn't set up correctly.
It is GRUB 1.98, from Debian stable.
I made a new partition table on the flash drive, there are 2 partitions. sdd1 is ~3MB ext2 with the boot flag, sdd2 is FAT32 for other storage.
I believe both were rounded to nearest MiB, not cylinder. I didn't use any syslinux tools on it (mkdiskimage), because I want more than one partition.
Installed with grub-install --no-floppy --root-directory=/mnt/sdd1 /dev/sdd
My guess from playing around with grub2 on a usb key, is that when you first boot grub thinks that the flash drive is the first hard drive and on reboot gets it right and thinks your internal drive is the first hard drive. If you edit the grub.conf to work on a first boot it may very well fail on reboots. I think you can use uuids or labels to get it right, but I haven't done anything like that, so I can't tell you how to go about setting up the grub.conf
Last edited by colorpurple21859; 10-06-2012 at 09:25 AM.