You have two grubs, one on each device. Both show the first bootable device as (hd0,0).
The trick is to write grub to the device and not to the mbr. If you write it to the mbr then you lose the flexibility of moving devices in and out as you want. To do this in Ubuntu you need to choose the device to write it to which is on the last page of the installation where it reviews all of the changes, just before installation. Click on the Advanced button at the bottom and you can choose what device to write it to. You will of course need one on the mbr for your hd boot up, but leave your usb key out. If you are using another distro such as CentOS then you will need to consult their documentation about how to manually write grub to each device. 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]> > > Thanks for the replies. > > Yes, I surely understand that grub gets confused if I remove a device > that's "supposed" to be there. :) > > My menu.lst looks like this: > > #boot=/dev/cciss/c0d0 > default=0 > timeout=5 > splashimage=(hd0,0)/grub/splash.xpm.gz > hiddenmenu > title CentOS (2.6.18-8.el5) > root (hd0,0) > kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00 > initrd /initrd-2.6.18-8.el5.img > > > menu.lst isn't autogenerated (right?) from grub-install, so I guess I > have to do some scripting to fix the faults in it. Why is boot= > commented out? > > Roy: > So I can use two hd0 without grub complaining? I have to look into > this. > > BR, > Andy > > On Aug 25, 2:31 pm, Robert Citek <[email protected]> wrote: > > Can you post grub's ./menu.lst file? Also, what error message is grub > > presenting and when? > > > > I suspect the issue is with grub's notion of what is the first harddrive. > > > > Regards, > > - Robert > > > > On Tue, Aug 25, 2009 at 6:21 AM, vox<[email protected]> wrote: > > > 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? > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
