Failed to boot after kernel update

Bug #117955 reported by Bill Coutinho
2
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Incomplete
Undecided
Caspar Clemens Mierau

Bug Description

I upgraded Ubuntu 7.04 from kernel 2.6.20-15-generic to 2.6.20-16-generic. But when I restarted after the update, grub refused to boot with the error:

  Error 17: Cannot mount selected partition

I tried to boot from the old kernel, but the error was the same.

Eventually, I managed to boot from a CD and, looking at "/boot/grub/menu.lst", I saw that the new kernel was configured to boot from "(hd0,3)", when the right partition should be "(hd0,2)". But what seems even worse than that, the root partition for the old kernel was _changed_ to "(hd0,3)".

I fixed "menu.lst", re-installed grub and now the system is ok.

Revision history for this message
Caspar Clemens Mierau (leitmedium) wrote :

Hi there,

just to make sure: As the menu.lst gets updated after a kernel update it could be possible a change from earlier times to your partitions, menu.lst or system setup could just be notified after the last update as grub then rewrites the menu.lst.

Can you please evaluate if there could be any changes from the last weeks to your system that could lead to this situation?

Revision history for this message
Bill Coutinho (bill-coutinho) wrote :

Well, when I first installed this machine, it didn't boot and I had to fix the "menu.lst" manually. As I recall it, the situation was similar but, I didn't report a bug at the time. This is the first kernel upgrade since then, though.

Revision history for this message
Caspar Clemens Mierau (leitmedium) wrote :

Thanks for your reply. Can you please attach your menu.lst, /etc/fstab and a partition listing (e.g. with parted)?

Revision history for this message
Bill Coutinho (bill-coutinho) wrote :
Revision history for this message
Bill Coutinho (bill-coutinho) wrote :
Revision history for this message
Bill Coutinho (bill-coutinho) wrote :
Revision history for this message
Bill Coutinho (bill-coutinho) wrote :

$ sudo fdisk -l

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 1 796 6392832 27 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 796 4628 30773528 7 HPFS/NTFS
/dev/sda3 4629 11912 58508730 83 Linux
/dev/sda4 11913 12161 2000092+ 82 Linux swap / Solaris

Revision history for this message
Caspar Clemens Mierau (leitmedium) wrote :

Thanks for your reply.

I notice you have partition marked "Unknown". There is a slight chance, grub wrongly "counts" the partitions therefore. As you can see, you already have the wrong root device in the following line:

# groot=(hd0,3)

Please change this line, run update-grub and control the new menu.lst afterwards and let me know if that helped.

Revision history for this message
Bill Coutinho (bill-coutinho) wrote :

I'll change that line. But, isn't it commented out? I didn't pay attention to that line because it starts with a '#'.

But, thanks much for the attention.

Revision history for this message
Caspar Clemens Mierau (leitmedium) wrote :

Grub reads out this line though its commented out. See menu.lst and grub man page for details.

Revision history for this message
Bill Coutinho (bill-coutinho) wrote :

Ok, thank you.

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.