Skip to contentSkip to conversation

GRUB 2 does not show new kernel :(

DISCUSSION shirish 1 participant 1 message Jun 27, 2007

lore
Share & tools
lore

shirish

author
#0 lore raw

Hi all,
Mr. Bean I shutdown the comp. Cold-booted the comp. & waited
for GRUB to kick in. I chainloaded to GRUB 2 ( it shows up as GRUB version 1.95) and while the entries are there they are not working. Some things which might give pointer are :-

title Chainload into GRUB 2
root (hd0,0)
kernel /boot/grub/core.img
savedefault

title Debian GNU/Linux, kernel 2.6.22-6-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-6-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro quiet splash
initrd /boot/initrd.img-2.6.22-6-generic
savedefault

title Debian GNU/Linux, kernel 2.6.22-6-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-6-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro single
initrd /boot/initrd.img-2.6.22-6-generic
savedefault

title Debian GNU/Linux, kernel memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin

Grub legacy

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=100
set root=(hd1,1)

### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###

menuentry "Debian GNU/Linux, linux 2.6.22-7-generic" {
	linux	(hd1,1)/boot/vmlinuz-2.6.22-7-generic root=/dev/sdb1 ro
	initrd	(hd1,1)/boot/initrd.img-2.6.22-7-generic
}
menuentry "Debian GNU/Linux, linux 2.6.22-7-generic (single-user mode)" {
	linux	(hd1,1)/boot/vmlinuz-2.6.22-7-generic root=/dev/sdb1 ro single
	initrd	(hd1,1)/boot/initrd.img-2.6.22-7-generic
}
menuentry "Debian GNU/Linux, linux 2.6.22-6-generic" {
	linux	(hd1,1)/boot/vmlinuz-2.6.22-6-generic root=/dev/sdb1 ro
	initrd	(hd1,1)/boot/initrd.img-2.6.22-6-generic
}
menuentry "Debian GNU/Linux, linux 2.6.22-6-generic (single-user mode)" {
	linux	(hd1,1)/boot/vmlinuz-2.6.22-6-generic root=/dev/sdb1 ro single
	initrd	(hd1,1)/boot/initrd.img-2.6.22-6-generic
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###

menuentry "Memory test (memtest86+)" {
	linux	(hd1,1)/boot/memtest86+.bin
}

### END /etc/grub.d/20_memtest86+ ###

Grub 1.95 version

Ok the first thing is GRUB legacy starts at the MBR. from where I guess it finds which place to jump to the hdd to start booting & reading stuff . ( IIRC this is called bootstrapping) while the newer one shows location of the hdd. The simplest way would be perhaps to just change something like :-

linux (hd1,1)/boot/vmlinuz-2.6.22-7-generic root=/dev/sdb1 ro

to

linux (hd0,0)/boot/vmlinuz-2.6.22-7-generic root=/dev/sdb1 ro

although should root=/dev/sdb1 is good enough or should it have the full UUID as given in grub legacy above ?

linux (hd0,0)/boot/vmlinuz-2.6.22-7-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro

Would that be the correct way? I ask because ubuntu now uses UUID labels
https://help.ubuntu.com/community/UsingUUID

I'm sure quite a few of the things which I have asked would be standard FAQs for the new GRUB. Hopefully Khaled Hosny is also listening and can add to his list of things if he feels like doing documentation :)

Another thing I found out is a simple grub-update is able to change the grub.cfg to its previous state of 444 . With a simple sudo chmod was able to change that :)

Lemme know how to proceed & would do accordingly.

Signature · 4 lines
         Shirish Agarwal
 This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/

065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17