Unable to boot Ubuntu server after update/upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu |
Invalid
|
Undecided
|
Unassigned |
Bug Description
OS: Ubuntu 8.04.1 Server
I updated the server with via ssh using sudo aptitude update && sudo aptitude safe-upgrade
Aptitude updated the server kernel from "2.6.24 -19 server" too "2.6.24-21 server". After the update/upgrade the server could not boot, and the error message "Grub error 17" was given.
Please notice that I have _not_ deleted any partitions, I have not changed menu.lst myself before this happend, there is no other OS on the PC, and I have not changed the sata connections at all.
To fix the problem I used a livecd and wrote this in a terminal:
sudo grub
find /boot/grub/stage1 The answer I got was: (hd3,1)
root (hd3,1)
setup (hd3) The answer I got was: /boot/grub/menu.lst Succeeded
quit
After rebooting the PC I got an new error: Error 22 No Such partition
Every kernels I tried from the menu.lst ended up with the same error.
Here is some information about the system(from running a livecd):
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00018dcc
Device Boot Start End Blocks Id System
/dev/sda1 1 48641 390708801 83 Linux
Disk /dev/sdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0330391b
Device Boot Start End Blocks Id System
/dev/sdb1 1 48641 390708801 83 Linux
Disk /dev/sdc: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4bfbc829
Device Boot Start End Blocks Id System
/dev/sdc1 1 48641 390708801 83 Linux
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000e4f3e
Device Boot Start End Blocks Id System
/dev/sdd1 1 243 1951866 82 Linux swap / Solaris
/dev/sdd2 * 244 1216 7815622+ 83 Linux
/dev/sdd3 1217 10966 78316875 83 Linux
/dev/sdd4 10967 121601 888675637+ 83 Linux
-------
/ is stored on /dev/sdd2
/home i stored on /dev/sdd3
/dev/sdd4 is one LVM
The hard drives called /dev/sda1, /dev/sdb1 and /dev/sdc1 is one LVM.
Using the livecd I mounted / and opend /boot/grub/
title Ubuntu 8.04.1, kernel 2.6.24-21-server
root (hd0,1)
kernel /boot/vmlinuz-
initrd /boot/initrd.
quiet
title Ubuntu 8.04.1, kernel 2.6.24-21-server (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-
initrd /boot/initrd.
title Ubuntu 8.04.1, kernel 2.6.24-19-server
root (hd0,1)
kernel /boot/vmlinuz-
initrd /boot/initrd.
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-server (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-
initrd /boot/initrd.
title Ubuntu 8.04.1, memtest86+
root (hd0,1)
kernel /boot/memtest86
quiet
To fix the problem I changed manually every (hd0,1) too (hd3,1) in /boot/grub/
Please ask if you want more information, and thank you for your time.
This bug seems to be similar to my own experiences, so I'm adding this comment to it.
After having my system upgraded yesterday (2009-01-30) using the package linux-image- 2.6.22- 16-generic_ 2.6.22- 16.61_i386. deb, I found today that it was impossible to boot my computer. Upon selecting any entry in my grub boot menu, I got "Error 15: File not found".
I looked at the commands in the grub command editor (by pressing E in the boot menu screen) and saw that the "root" definition was incorrect and the "UUID" for the "kernel" definition was also incorrect. These are the definitions I saw:
root (hd0,5) 2.6.22- 16-generic root=UUID= 20ae8580- c8c7-4c16- a436-181b9e38a3 a7 ro quiet splash img-2.6. 22-16-generic
kernel /boot/vmlinuz-
initrd /boot/initrd.
I worked around this by setting "root" to "(hd0,0)" and by replacing the "UUID=..." with "/dev/sda1", removing the "quiet" and "splash" options so that I could actually see what happens, rather than seeing the Kubuntu progress bar and then seeing absolutely no detail when switching to text mode.
Upon looking at /boot/grub, I saw that menu.lst and menu.lst~ were both updated yesterday and both were the same, so the update didn't preserve the old contents of menu.lst. I have now changed the contents of menu.lst back to what it was before.
I have recently switched hard disks in my computer, and the layout of the partitions is different to those on my previous disk (which did use "(hd0,5)" as the root partition, along with the "UUID" shown above). However, I made sure to change menu.lst to use the new, correct values, and I had successfully booted several times before this error occurred today.
It might be the case that some other file is used to retain details of the root partition and that the update scripts populate menu.lst with values from this other file, but it is very bad that the scripts just discard any existing copy of menu.lst, making an identical duplicate of the new, incorrect file, and if such special files with disk information then these should be documented somewhere.