[lug] Grub question
blug-mail at duboulder.com
Fri Nov 10 18:25:05 MST 2006
Ken Weinert wrote:
> Lee Woodworth wrote:
>> Ken Weinert wrote:
>>> Well, I'm not sure how I did it, or what exactly I did, but grub is sort
>>> of non-working right now.
>> When this has happened to me, reinstalling grub on the boot drive
>> has fixed things.
>> (I have a /boot partition on hda1, system is on hda2, grub boot sector
>> on hda)
>> # grub
>> root (hd0,0)
>> setup (hd0)
> I'll give that a try when I get home tonight and let you know if that
> fixes it. If not I'll post up the info the other responder asked about
> for further discussion.
> Any ideas on can cause this temporary insanity?
> And no, I've not added/deleted drives or partitions, just compiled up a
> new kernel and tried to add it to the boot menu. Yes, that implies that
> I messed up the boot menu somehow, but I've not yet seen it and I didn't
> keep a copy of what it looked like before (why should I? what could go
> wrong? :)
This has happened to me when I changed /boot/grub/grub.conf to add a new
kernel line. I suspect that grub.conf moved to a different set of blocks
when the file was rewritten. It appears the early boot stage has the
config file location hard-coded as block addresses so it didn't know
where the config was anymore. The grub setup command looks for the grub
boot code and could be calculating block addresses that it inserts into
the early stage boot loader.
Minimal grub.conf w/o an initrd:
# Boot automatically after 30 secs.
# By default, boot the first entry.
# For booting GNU/Linux
title Gentoo-Linux-2.6.17-r3 sda3
kernel /vmlinuz-2.6.17-gentoo-r3 root=/dev/sda3 udev
More information about the LUG