update-grub new kernel fails

Bug #140982 reported by jimjin
8
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

When dist-upgrade upgrades a new kernel or when update-grub is executed, the menu.lst file is done wrongly.

What i get is:

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

but:
- root (hd0,0) should be (hd0,1) since the partition is /dev/sda2
- root=/dev/hda1 should be /dev/sda2 as i said above

I got this error since i installed ubuntu.

uname -a
Linux petronio 2.6.20-16-generic #2 SMP Fri Aug 31 00:55:27 UTC 2007 i686 GNU/Linux

Ubuntu 7.04 - Feisty Fawn

Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The default installation process of Ubuntu should have used UUIDs for drive partitions instead of /dev/hda1. You can learn more about UUIDs at https://help.ubuntu.com/community/UsingUUID . How exactly did you go about installing Ubuntu? Thanks in advance.

description: updated
Revision history for this message
jimjin (jimjin) wrote :

Ubuntu should have is one thing, the last 10 times i installed ubuntu (not just to me but to other friends) it used /dev/...

I installed ubuntu with the installing script. I made the partitions myself with cfdisk before executing the ubuntu installer, because i normally first install windows xp and THEN ubuntu otherwise i will have to re-update grub manually with chroot since windows overwrite grub apparently.

I am surprised you set this post to low importance.

Im a Debian Sid user. Once the system works, if i update-grub or a new kernel, it sets the CORRECT partitions and stanza in the menu.lst file. In ubuntu it just dosen't happend making it impossible to use for an avarage user and ubuntu is meant to be for human beings.

Trust me, no normal human being would guess that they would have to edit grub and instead of hd0,0 they have to type hd0,1 nor they would guess that is /dev/sda2 and not /dev/hda1

Please let me know if you need extra info such as config files or others...

Revision history for this message
Michał Gołębiowski-Owczarek (mgol) wrote :

I agree with jimjin. I did not manually change menu.lst after an installation of Ubuntu. I just put "/boot" as a different partition than "/" so menu.lst should set up correctly by default. Unfortunately, after every kernel update, my proper "hd(0,0)" automatically changes to "hd(0,1)". I can manage, but what an usual Ubuntu user can do?

BTW: Is it a dup of #21412?

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Is this still a problem for you? If it is, then please attach your /boot/grub/menu.lst, and post the output of:

sudo fdisk -l
ls -l /dev/disk/by-uuid/

Thanks

Revision history for this message
Łukasz Góralczyk (lukasz-goralczyk) wrote :

Hello,

I encountered the same problem, correct root partition is not properly detected: there's "root (hd0,6)" instead of "root (hd0,4)" (there's also a problem of uuids, but I will fill a bug report for this /or find already existing one/). "6" comes from, probably, Linux way of numbering partitions (sda1, 2, 5, 6, ...), but grub ("4") does it differently 1 - sda1, 2 - sda2, 3 - sda5, 4 - sda6, ... . sda6 is my root partition (see below for more info) - maybe here lays the cause?

uname -a:
Linux sagittarius 2.6.27-4-generic #1 SMP Mon Sep 22 04:40:15 UTC 2008 x86_64 GNU/Linux

System version: Ubuntu 8.10 Intrepid (Alpha 4 as fas as I remember).

Partitions (mounting points):
sda1 - Windows
sda2 - extended
sda5 - /boot
sda6 - /
sda7 - /home
sda8 - swap

See attachements for more info on partitions and uuids.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks.

Please could you attach the whole menu.lst file please (instead of just a subset)? I need to see the default options.

Revision history for this message
Łukasz Góralczyk (lukasz-goralczyk) wrote :

Hello. Problem solved.

My issue was related with blkid having old entries in cache (/etc/blkid.tab) which confused update-grub. Old entries came from my old drive which I recently upgraded. I cleaned the cache (sudo blkid -g), removed menu.lst and run update-grub which created new menu.lst with correct entries.

I can still send whole menu.lst but I think that now it doesn't make sense.

Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this bug and help to improve Ubuntu.

If the generated boot stanza doesn't match your hard drive configuration, then you need to adjust the groot and kopt settings in the upper part of your menu.lst, so that update-grub has correct information to use when generating this stanza.

In Ubuntu 8.04 and above, update-grub will warn if these settings don't match, instead of silently overwriting; so this bug is considered fixed in later releases.

Changed in grub:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.