Hi adrian15, Thanks for the nice Sci-fi :-)
This is regarding the shift of BIOS drive numbers when we have a USB pendrive on the PC. --- adrian15 <[EMAIL PROTECTED]> wrote: > My solution for grub legacy is more or less (I need some advice if you > do not mind) this one: > > 1) Add a "preprocessor if" somewhere to see if we're going to build a > normal grub or a usb rescue grub. > > # if defined(USB_RESCUE) > static const char *preset_menu = "usbshift\n"; > # endif > > I think that activates the preset menu or kind of. I actually have the following option in grub.conf (for grub-legacy) on my USB pendrive so I can revert to the boot loader installed to the regular location: title Normal Harddisk map (hd0) (hd1) map (hd1) (hd0) root (hd0) chainloader +1 No, as you imagine, this only works when the boot loader on hd0 only depends upon the primary drive (hd0). Once it tries to see hd1, there the pen drive is. > Then usbshift command checks if grub is running from hd0, > if it is true it should do the following thing with map commands. > > Before: > usb1 disk1 disk2 disk3 disk4 disk5 > hd0 hd1 hd2 hd3 hd4 hd5 > After: > disk1 disk2 disk3 disk4 disk5 usb1 > hd0 hd1 hd2 hd3 hd4 hd5 Yes, this is good idea. It would be nice if we have a command like shiftdrives to do the above so that I can rewrite the grub.conf like: title Normal Harddisk shiftdrives root (hd0) chainloader +1 and we no longer have to worry about hd1 seen from the boot loader on hd0. What do you think? my two cents, zunda -------------------------------------- Start Yahoo! Auction now! Check out the cool campaign http://pr.mail.yahoo.co.jp/auction/ _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel