Karmic netboot install fails to configure kernel when doing a 'targeted' kernel

Bug #412316 reported by borrell
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

Trying to install Karmic from the netboot install, all goes well until I have to select a kernel. If I select any kernel in the list, for example linux-generic, then select to do a 'targeted' build of the kernel, it fails. This is an extract of the syslog from the failed install:

Aug 12 01:59:41 in-target: Running depmod.
Aug 12 01:59:42 in-target: update-initramfs: Generating /boot/initrd.img-2.6.31-5-generic
Aug 12 01:59:42 in-target: readlink: missing operand
Aug 12 01:59:42 in-target: Try `readlink --help' for more information.
Aug 12 01:59:42 in-target: mkinitramfs: missing root /sys entry
Aug 12 01:59:42 in-target: mkinitramfs: workaround is MODULES=most
Aug 12 01:59:42 in-target: mkinitramfs: Error please report the bug
Aug 12 01:59:42 in-target: update-initramfs: failed for /boot/initrd.img-2.6.31-5-generic
Aug 12 01:59:42 in-target: Failed to create initrd image.
Aug 12 01:59:42 in-target: dpkg: error processing linux-image-2.6.31-5-generic (--configure):
Aug 12 01:59:42 in-target: subprocess installed post-installation script returned error exit status 2
Aug 12 01:59:42 in-target: Setting up linux-firmware (1.15) ...
Aug 12 01:59:42 in-target: dpkg: dependency problems prevent configuration of linux-image-generic:
Aug 12 01:59:42 in-target: linux-image-generic depends on linux-image-2.6.31-5-generic; however:
Aug 12 01:59:42 in-target: Package linux-image-2.6.31-5-generic is not configured yet.
Aug 12 01:59:42 in-target: dpkg: error processing linux-image-generic (--configure):
Aug 12 01:59:42 in-target: dependency problems - leaving unconfigured
Aug 12 01:59:42 in-target: dpkg: dependency problems prevent configuration of linux-generic:
Aug 12 01:59:42 in-target: linux-generic depends on linux-image-generic (= 2.6.31.5.16); however:
Aug 12 01:59:42 in-target: Package linux-image-generic is not configured yet.
Aug 12 01:59:42 in-target: dpkg: error processing linux-generic (--configure):
Aug 12 01:59:42 in-target: dependency problems - leaving unconfigured
Aug 12 01:59:42 in-target: No apport report written because the error message indicates its a followup error from a previous failure.
Aug 12 01:59:42 in-target:
Aug 12 01:59:42 in-target: No apport report written because the error message indicates its a followup error from a previous failure.
Aug 12 01:59:42 in-target:
Aug 12 01:59:42 in-target: Errors were encountered while processing:
Aug 12 01:59:42 in-target: linux-image-2.6.31-5-generic
Aug 12 01:59:42 in-target: linux-image-generic
Aug 12 01:59:42 in-target: linux-generic
Aug 12 01:59:42 in-target: E:
Aug 12 01:59:42 in-target: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
borrell (borrell) wrote :
Revision history for this message
borrell (borrell) wrote :

Worth noting that if I DONT select targeted (and select 'generic', I think the other option is called) then it all works fine.

Revision history for this message
Russell Green (r.green) wrote :

Also affected my this bug using the latest daily lpia netboot installer.A workaround is to install the system without a kernel then chroot into the install and install the kernel that way.

Revision history for this message
Andres Mujica (andres.mujica) wrote :

Hi,take a look on this:

update-initramfs: Generating /boot/initrd.img-2.6.31-5-generic
Aug 12 01:59:42 in-target: readlink: missing operand
Aug 12 01:59:42 in-target: Try `readlink --help' for more information.
Aug 12 01:59:42 in-target: mkinitramfs: missing root /sys entry
Aug 12 01:59:42 in-target: mkinitramfs: workaround is MODULES=most
Aug 12 01:59:42 in-target: mkinitramfs: Error please report the bug
Aug 12 01:59:42 in-target: update-initramfs: failed for /boot/initrd.img-2.6.31-5-generic
Aug 12 01:59:42 in-target: Failed to create initrd image.
Aug 12 01:59:42 in-target: dpkg: error processing linux-image-2.6.31-5-generic (--configure):
Aug 12 01:59:42 in-target: subprocess installed post-installation script returned error exit status 2

affects: ubuntu → initramfs-tools (Ubuntu)
Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

The problem behind error message in #4 is that /usr/share/initramfs-tools/hook-functions can't evaluate the root partition in a chroot environment.

As a workaround add inside the chroot environment as 1st line to /etc/mtab the correct view of your root partition.

See also this article: https://www.computer42.org/xwiki/bin/view/DevNotes/Rescue%20Tasks#Hmountinganexistinginstallationchroot

I have run in this after a broken kernel update in lucid (to 2.6.32-24-generic) on some i386 machines.
dpkg -configure -a in a chroot environment failed with the error message noted above.

Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

Workaround procedure works with older systemrescuecd versions (e.g. 1.3.4).
In the current version my /dev/mapper/system-root is linked to ../dm-0.
This will cause mkinitramfs to run in a different error condition because it strips down the evaluated block from "dm-0 "to "dm-"

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

Bug attachments

Remote bug watches

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