Grub and/or kernel problem...

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at
Tue Nov 15 14:46:58 UTC 2005

On Tue, Nov 15, 2005 at 09:35:11AM -0500, William O'Higgins Witteman wrote:
> I have recently created a problem for myself, and I'm hoping someone can
> help me sort it out.
> I recently compiled a custom kernel (2.6.12) the Debian way, and I think
> it probably worked - the compile finished cleanly, and the kernel
> installed and grub got automagically updated.  However, grub got updated
> wrong, and even when it is fixed, the new kernel doesn't boot.
> Here's what grub did by default:
> title       Debian GNU/Linux, kernel 2.6.12.dragonfly
> root        (hd1,0)
> kernel      /boot/vmlinuz-2.6.12.dragonfly root=/dev/hdb1 ro
> savedefault
> boot
> title       Debian GNU/Linux, kernel 2.6.8-2-386
> root        (hd1,0)
> kernel      /boot/vmlinuz-2.6.8-2-386 root=/dev/hdb1 ro
> initrd      /boot/initrd.img-2.6.8-2-386
> savedefault
> boot
> Now, there's only one drive on this machine - /dev/hdb doesn't exist,
> nor does hd1,0.  So I had to fix those errors, but I don't know where
> they are coming from.
> Once I have corrected the drive address problem I can once again boot
> into the second (stock) kernel, but I get a kernel panic if I try to
> boot the first, with the following errors:
> VFS: Cannot open root device "hda1" or unknown block (0,0)
> Please append a correct "root =" boot option
> Kernel panic - not syncing: VFS: unable to mount root fs on unknown
> block (0,0)
> I have considered that the lack of an initrd image could be the problem,
> but I don't know how to create such an image - the manpage of mkinitrd
> made absolutely no sense to me, and several attempts have not appeared
> to help.  Anyone have any ideas?  Thanks.

Well the root= and such are all set based on the single level comments
in /boot/grub/menu.lst (which update-grub looks at and then updates with
kernels found in /boot).

If you compiled your own kernel, then make sure you used --initrd with
make-kpkg if you used the same type of modular filesystem/diskdriver
setup as debian always does (I tend to for most things).  Otherwise the
kernel will not generate an initrd when installed, and there won't be
one for grub to use and the kernel will be unable to find the rood

Lennart Sorensen
The Toronto Linux Users Group.      Meetings:
TLUG requests: Linux topics, No HTML, wrap text below 80 columns

More information about the Legacy mailing list