What you really need is a boot manager. My HP computer comes with one built in. when I boot up I press ESC to bring up the boot manager window which shows all my bootable device. I select the one I want to use from there. Grub is still used with the boot manager, but it boots afterwards.
In grub I have my usb key listed as (hd0,0) since it will be the first partition of the first drive that I am booting. Similarly I have my sda set up to be (hd0,0). When the usb stick is removed my hda boots normally. When it is inserted I use the boot manager and boot from it. You need to manually edit grub with a text editor as su in order to change it. The problem is that grub names its drives relative to boot order and when you tinker with the boot order grub gets understandlably confused. Wouldn't you? You can get third party boot mangers, but I have never needed one so can't comment on their usefulness or ability to do what you want. Roy Linux: Fast, friendly, flexible and ... free! Support open Source <,*)}}+< Only dead fish go with the flow. Follow LinuxCanuck on Twitter or Identi.ca for the latest news. 2009/8/25 vox <[email protected]> > > Hi, > I'm installing a system from a USB stick containing a restore system, > and I'm having some troubles installing grub on the hard drive. > > I've made two partitions, c0d0p1 on which the boot-partition resides, > and c0d0d2 on which the rest of the system resides. So far so good. > Now I want grub to install mbr on the system disk, and I can't really > get it to work. > > When I boot on the USB stick the system sees the USB as hd0, which is > as it should. So I ran > > grub-install --root-directory=/mnt/c0d0p1/boot /dev/cciss/c0d0 > > and got the output > > Installation finished. No error reported. > (hd0) /dev/sda > (hd1) /dev/cciss/c0d0 > > Which is correct. But I am going to remove the USB stick after > installation, and when I do so /dev/sda isn't there anymore (because I > removed the stick :). So is there a way to make grub install on /dev/ > cciss/c0d0 and have it boot from that drive when I remove the the > stick? > > BR, > Andy > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -~----------~----~----~----~------~----~------~--~---
