Re: editing GRUB options

From: Steven Kurylo <sk_at_no.spam.please>
Date: Tue Apr 17 2007 - 22:27:39 CST

> Doing cat /boot/grub/device.map (on the SATA drive install)
>
> gets me:
> (hd0) /dev/hda
> (hd1) /dev/sda
>
> But in menu.lst (of the same install) I see:
> title Ubuntu, kernel 2.6.17-11-generic
> *root (hd0,0)*
> kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sda1 ro quiet
> splash vga=786
> initrd /boot/initrd.img-2.6.17-11-generic
>
> Am I confused, or has Ubuntu got another hiccup? Seems to me it would be
> good to have this mis-match sorted out before messing with menu.lst.

Perhaps it wrote the boot map while you had hda working? Then during
boot it pulled the kernel from hda (hence the hd0) and with the root
being sda1, you got that install. Since the kernel on both your
installations is the same, vmlinuz-2.6.17-11-generic, it worked.

Then hda was removed. Grub would go looking for hd0 during boot, and
the bios would hand it sda this time - sda is the only drive so it
would become hd0 for grub. Again, the kernel is the same, so you
never really noticed.

Now that hda is back in there, the first part is happening again.

Thats my theory. Lets test it.

Reboot your computer and when the grub menu appears (or ESC to make
the menu appear), hit e (?) to edit the menu entry. Then goto the
root lined and edit it (e again?). Change it to read "root (hd1,0).
Then I believe you hit b to boot the kernel.

This change is only good for the single boot, so it doesn't risk
wrecking anything. Does it boot? If so my theory is correct.

So the next thing is to make sure your device map is correct.
  'mv /boot/grub/device.map /boot/grub/device.map.bk'
Then
  `grub-install --recheck hd0'
What device map does it give you? If sda is hd1, then change the
groot line in menu.lst to to (hd1,0). Then run `grub-install hd1' and
finally `update-grub'. This should update your list of kernels to all
have root (hd1,0).

You should be able to reboot and everything will work.

From there you can go back to my original suggestion off adding manual
boot entries to the bottom of the menu.lst.
Received on Tue, 17 Apr 2007 21:27:39 -0700

This archive was generated by hypermail 2.1.8 : Tue Apr 17 2007 - 22:27:57 CST