kernel update fails when kernels from other distributions are installed in shared /boot

Bug #338563 reported by laltopi
2
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Medium
Unassigned
Jaunty
Won't Fix
Medium
Unassigned

Bug Description

I have multiple linux distributions installed on my computer with a shared /boot partition. I have had this configuration working for a while now with ubuntu as one of the distributions. With jaunty, updates break the boot process every time there is a kernel update and dselect attempts to regenerate initramfs as it incorrectly selects the image from another distribution rather than the ubuntu image. The error message is as follows:

Setting up initramfs-tools (0.92bubuntu21) ...
update-initramfs: deferring update (trigger activated)

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-initrd-2.6.27.7-desktop-1mnb.img
Cannot find /lib/modules/initrd-2.6.27.7-desktop-1mnb.img
update-initramfs: failed for /boot/initrd.img-initrd-2.6.27.7-desktop-1mnb.img
dpkg: subprocess post-installation script returned error exit status 1

In this case, deselect is trying to update the initrd image for Mandriva - instead of regenerating the ubuntu image: initrd.img-2.6.28-8-generic

Revision history for this message
Michael Vogt (mvo) wrote :

This also happend to me during a test upgrade when for some reason the /vmlinuz and /initrd links were wrong.

Changed in initramfs-tools:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

This patch adds a check if the symlink target actually exists before setting the version. This should be ok because set_linked_version is just one source to find the right version (next are set_highest_version and set_current_version) so if the link is broken other methods will be used next.

Revision history for this message
Michael Vogt (mvo) wrote :

Hm, my proposed fix is not good enough for the original report. I think it needs a additinal
check in set_highest_version if /lib/modules/initrd.img-$ver exists and if not skip until
one is found that exists.

tags: added: patch-needswork
Changed in initramfs-tools (Ubuntu Jaunty):
status: Confirmed → Won't Fix
Revision history for this message
Benjamin Drung (bdrung) wrote :

set_linked_version in initramfs-tools 0.142ubuntu17 from noble has:

```
    linktarget=
    if [ -e /initrd.img ] && [ -L /initrd.img ]; then
        linktarget="$(basename "$(readlink /initrd.img)")"
    fi

    if [ -e /boot/initrd.img ] && [ -L /boot/initrd.img ]; then
        linktarget="$(basename "$(readlink /boot/initrd.img)")"
    fi
```

Changed in initramfs-tools (Ubuntu):
status: Confirmed → 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.