Kernel image missing after reinstallation preserving /home

Bug #287747 reported by João Pinto
20
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Critical
Colin Watson
Intrepid
Fix Released
Critical
Colin Watson

Bug Description

Hello,
I was testing the Ubuntu Intrepid AMD64 Desktop CD (22 Oct 2008).
The test was done with the Use Case defined on https://wiki.ubuntu.com/UbiquityPreserveHome, I have selected to keep my existing / partition, without formatting.
When the system booted after install I found the following:
The grub menu entries were now containing (Ubuntu 8.10), but the kernel was still pointing to the previous (Hardy) versions.
The system booted, but network, and X (mouse/keyboard) where not working. I have found that the kernel modules were not available.
On the resulting partition:

grep kernel /mnt/sda2/boot/grub/menu.lst
# kernel /vmlinuz root=/dev/hda2 ro
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## Xen Linux kernel options to use with the default Xen boot option
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
title Ubuntu 8.10, kernel 2.6.24-21-generic
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=0babdae6-3141-4e62-a30e-373c9d11bc69 ro xforcevesa quiet splash
title Ubuntu 8.10, kernel 2.6.24-21-generic (recovery mode)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=0babdae6-3141-4e62-a30e-373c9d11bc69 ro xforcevesa single
title Ubuntu 8.10, kernel 2.6.24-19-generic
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=0babdae6-3141-4e62-a30e-373c9d11bc69 ro xforcevesa quiet splash
title Ubuntu 8.10, kernel 2.6.24-19-generic (recovery mode)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=0babdae6-3141-4e62-a30e-373c9d11bc69 ro xforcevesa single
kernel /boot/memtest86+.bin

ubuntu@ubuntu:/$ ls /mnt/sda2/lib/modules/
2.6.27-7-generic
ubuntu@ubuntu:/$

Please note that I need to have a working system so I will not be able to do further research on this use case.

Thanks

Tags: iso-testing
Revision history for this message
Evan (ev) wrote :

João,

I cannot reproduce this with a standard install (/ ext3 and swap). Can you reply with the output of `parted /dev/sda print all` and your /etc/fstab?

Thanks

Changed in ubiquity:
assignee: nobody → evand
status: New → Incomplete
Revision history for this message
João Pinto (joaopinto) wrote :

Model: ATA WDC WD5000AAKS-6 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 262GB 262GB primary ntfs boot
 2 262GB 292GB 30.0GB primary ext3
 3 292GB 466GB 174GB extended
 5 292GB 296GB 4096MB logical linux-swap
 6 296GB 466GB 170GB logical ext3

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda2
UUID=0babdae6-3141-4e62-a30e-373c9d11bc69 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda6
UUID=96491ac2-3115-48a7-98f2-43e741cd573d /home ext3 relatime 0 2
# /dev/sda1
UUID=C0DCE401DCE3EF98 /windows ntfs defaults,umask=007,gid=46 0 1
# /dev/sda5
UUID=a694d88f-5199-4b8e-bcc6-bda54d953b86 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

Changed in ubiquity:
status: Incomplete → New
Revision history for this message
João Pinto (joaopinto) wrote :

I have repeated this procedure in my laptop.
The result is the same, a mixed old kernel with new modules.

Changed in ubiquity:
status: New → Confirmed
Revision history for this message
João Pinto (joaopinto) wrote :

I have booted from the livecd and chrooted into the broken system, the kernel package is listed as installed but grub is unable to find it:
root@ubuntu:/# sudo update-grub
sudo: unable to resolve host ubuntu
Searching for GRUB installation directory ... found: /boot/grub
findfs: Unable to resolve 'UUID=4f99a04d-379f-43fd-86c6-a1ba3b9cb8e2'
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.24-21-generic
Found kernel: /boot/vmlinuz-2.6.24-19-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

root@ubuntu:/# dpkg -l | grep -i linux-image
ii linux-image-2.6.27-7-generic 2.6.27-7.14 Linux kernel image for version 2.6.27 on x86
ii linux-image-generic 2.6.27.7.11 Generic Linux kernel image

Reinstalling linux-image-2.6.27-7-generic will get the proper entry added into the grub menu.

Revision history for this message
Steve Netting (steve-netting) wrote :

Confirmed problem here on upgrade from early 8.10 beta to a) latest daily build and b) the RC.

/lib/modules contains only newer modules (2.6.27-7). /boot contains new 2.6.27-7 abi, config, initrd and System.map's but missing matching vmlinuz. menu.lst also still pointing at old kernels etc but like João's comments above - text updated to read 8.10.

Initial symptoms were lack of keyboard/mouse support in X. Managed to temporarily fix this but then noticed lack of network support - at which point I checked out /lib/modules and noticed the mismatch with the running kernel (older 2.6.24-21)

Revision history for this message
Matt Zimmerman (mdz) wrote :

Please post output from:

ls -l /boot

Revision history for this message
Evan (ev) wrote :

Can you attach the installation syslog, partman, and debug files to this bug report. You can find them in /var/log/installer.

Revision history for this message
João Pinto (joaopinto) wrote :

Logs attached.

Revision history for this message
João Pinto (joaopinto) wrote :

ls -ltr /boot/
total 50224
-rw-r--r-- 1 root root 1921464 2008-08-21 05:46 vmlinuz-2.6.24-19-generic
-rw-r--r-- 1 root root 905170 2008-08-21 05:46 System.map-2.6.24-19-generic
-rw-r--r-- 1 root root 80049 2008-08-21 05:46 config-2.6.24-19-generic
-rw-r--r-- 1 root root 422667 2008-08-21 05:46 abi-2.6.24-19-generic
-rw-r--r-- 1 root root 124152 2008-09-11 21:11 memtest86+.bin
-rw-r--r-- 1 root root 8104424 2008-10-02 17:02 initrd.img-2.6.24-19-generic.bak
-rw-r--r-- 1 root root 8114287 2008-10-15 10:29 initrd.img-2.6.24-21-generic.bak
-rw-r--r-- 1 root root 8104535 2008-10-20 11:05 initrd.img-2.6.24-19-generic
-rw-r--r-- 1 root root 1920760 2008-10-22 04:12 vmlinuz-2.6.24-21-generic
-rw-r--r-- 1 root root 905617 2008-10-22 04:12 System.map-2.6.24-21-generic
-rw-r--r-- 1 root root 80062 2008-10-22 04:12 config-2.6.24-21-generic
-rw-r--r-- 1 root root 422838 2008-10-22 04:12 abi-2.6.24-21-generic
-rw-r--r-- 1 root root 2244272 2008-10-24 09:29 vmlinuz-2.6.27-7-generic
-rw-r--r-- 1 root root 1029585 2008-10-24 09:29 System.map-2.6.27-7-generic
-rw-r--r-- 1 root root 91364 2008-10-24 09:29 config-2.6.27-7-generic
-rw-r--r-- 1 root root 507665 2008-10-24 09:29 abi-2.6.27-7-generic
-rw-r--r-- 1 root root 1073 2008-10-24 09:31 vmcoreinfo-2.6.27-7-generic
-rw-r--r-- 1 root root 8114393 2008-10-28 08:21 initrd.img-2.6.24-21-generic
drwxr-xr-x 3 root root 4096 2008-10-29 13:01 grub
-rw-r--r-- 1 root root 8174829 2008-10-29 13:41 initrd.img-2.6.27-7-generic

Revision history for this message
Colin Watson (cjwatson) wrote :

This is due to:

        # If no kernel was copied, try some possible locations for the
        # kernel we used to boot. This saves a couple of megabytes of CD
        # space.
        bootdir = os.path.join(self.target, 'boot')
        re_image = re.compile('vmlinu[xz]-')
        for entry in os.listdir(bootdir):
            match = re_image.match(entry)
            if match is not None:
                break
        else:
            kernel = self.find_cd_kernel()
            if kernel:
                prefix = os.path.basename(kernel).split('-', 1)[0]
                release = os.uname()[2]
                target_kernel = os.path.join(bootdir,
                                             '%s-%s' % (prefix, release))
                self.copy_file(kernel, target_kernel, md5_check)

In this case /target/boot contains a kernel and so we think that it was copied from the livefs and don't copy another one!

Changed in ubiquity:
importance: Undecided → Critical
status: Confirmed → Triaged
Matt Zimmerman (mdz)
Changed in ubiquity:
milestone: none → ubuntu-8.10
Colin Watson (cjwatson)
Changed in ubiquity:
assignee: evand → kamion
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Kernel and modules missing after reinstallation preserving /home

This bug was fixed in the package ubiquity - 1.10.9

---------------
ubiquity (1.10.9) intrepid; urgency=high

  * Always copy the kernel from /cdrom/casper/ if it's there regardless of
    whether any kernels are already present in /target/boot/, since those
    could just be due to a preserve-home install (LP: #287747).

 -- Colin Watson <email address hidden> Wed, 29 Oct 2008 15:26:24 +0000

Changed in ubiquity:
status: Triaged → Fix Released
tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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