Bug#546008: error: you need to load the kernel first

Hans-Georg Bork hgb at hgbhome.net
Sun Oct 24 13:54:13 UTC 2010


Hi,

today I cam across that error after a fresh squeeze net installation
(installed with grub-legacy). After install system was bootable, I then
installed grub-pc 1.98+20100804-6 which wrote a new grub.cfg.

The system use /dev/sda1 exclusive for /boot (ext2)
and /dev/mapper/LVM-root for / (ext4).

Excerpt from /boot/grub/grub.cfg (written by hand on different system):
--------------------------------------------------------------------------------------------------
menuentry 'Debian GNU/Linux, with ...' --class debian --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy ...
	linux	/boot/vmlinuz-2.6.32-5-amd64 root=...
	initrd	/boot/initrd.img-2.6.32-5-amd64
}
--------------------------------------------------------------------------------------------------

Booting with that entry gives "error: you need to load the kernel
first".

Since /boot is on a seperate partition the load lines should read

	linux	/vmlinuz-2.6.32-5-amd64 root=...
	initrd	/initrd.img-2.6.32-5-amd64

and when just editing them to that the system boots fine. It seems that
${GRUB_DEVICE} is set wrong.

Some tests:
# grub-probe --target=device /boot 
/dev/sda1
# grub-probe --target=fs /boot 
ext2
# grub-probe --target=drive /boot 
(hd0,msdos1)
# grub-probe --target=partmap /boot 
msdos

Hope this helps a bit.

Kind regards
	--hgb






More information about the Pkg-grub-devel mailing list