update-initrd-links creates incorrect symlinks

Bug #1929255 reported by Fabien Malfoy
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux-base (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
New
Undecided
Unassigned
Hirsute
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

## Problem description

Executing the `/etc/kernel/postinst.d/xx-update-initrd-links` script incorrectly detects symbolic links targets and then creates malformed (hence broken) ones instead:

/initrd.img -> initrd.imgboot/vmlinuz-5.3.0-53-generic
/initrd.img.old -> initrd.imgboot/vmlinuz-5.3.0-53-generic

while it should actually be:

/initrd.img -> boot/initrd.img-5.3.0-53-generic
/initrd.img.old -> boot/initrd.img-5.3.0-53-generic

The problem appeared with the release of the version 4.5ubuntu1.5 of the linux-base package, which made this script executable.

[Test Plan]

 * Install new linux-base and initramfs-tools

 * create /etc/kernel-img.conf with

do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = yes

 * Install one kernel flavour, check that symlinks in /boot have sane targets
 * Install another kernel, check that symlinks in /boot/ have sane targets

 * create a selfbuilt kernel and install it by calling installkernel (you can download kernel debs from kernel-ppa, and unpack them to pretend one has self built it). and check that symlinks in /boot have sane targets.

 * Purge all kernel, and remove symlinks in /boot

 * Update /etc/kernel-img.conf to

do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

 * Install one kernel flavour, check that symlinks in / have sane targets
 * Install another kernel, check that symlinks in / have sane targets
 * create a selfbuilt kernel and install it by calling installkernel (you can download kernel debs from kernel-ppa, and unpack them to pretend one has self built it)

* remove all kernels, purge initramfs-tools, clean up symlinks in / and /boot
* repeat all of the above, without having initramfs-tools installed. I.e. install kernels _without_ recommneds.

[Where problems could occur]

 * The rewritten postinst.d script now simply mostly calls linux-update-links like the normal linux-image postinst script does. One has to make sure that .deb installations of kernels happens correctly and that installkernel way of installing kernels happens correctly. Under different kernel-img.conf settings. The previous incarnations of fixing this and related issues did not account for the above cases and codepaths.

Revision history for this message
Fabien Malfoy (fmalfoy) wrote :
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-base (Ubuntu):
status: New → Confirmed
Revision history for this message
Fabien Malfoy (fmalfoy) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-base (Ubuntu Bionic):
status: New → Confirmed
tags: added: regresion-proposed regression-update
Fabien Malfoy (fmalfoy)
tags: added: regression-proposed
removed: regresion-proposed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I'm also not sure why that script exists at all in the current form.

I would have thought we could switch to linux package themselves to call linux-update-symlinks like it is done in debian.

Or at least not reimplement the wheel and just call linux-update-symlinks directly.

Revision history for this message
Krzysztof Kozlowski (krzk) wrote :

Proposed patch looks good to me.

Revision history for this message
Fabien Malfoy (fmalfoy) wrote :

Sure, I proposed the patch as a quick fix that would allow users to get things running back again shortly. But if there are more academic ways to workaround this, feel free to give me pointers.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On a given system we can have the following symlinks

/vmlinuz.old -> boot/vmlinuz-4.15.0-144-lowlatency
/vmlinuz -> boot/vmlinuz-4.15.0-144-generic
/boot/vmlinuz.old -> vmlinuz-4.15.0-144-lowlatency
/boot/vmlinuz -> vmlinuz-4.15.0-144-generic

which is controlled by /etc/kernel-img.conf setting link_in_boot. The compiled-in default, and the setting that installers set has changed. Thus depending which release one installed either cases might be present.

And they should all work.

Testing the proposed patch:

linknames() {
 tgt_kernel="$1"
 echo old "initrd.img${tgt_kernel#vmlinu?}"
 echo new "${tgt_kernel%/*}/initrd.img${tgt_kernel#*vmlinu?}"
}
linknames boot/vmlinuz-5.11
linknames vmlinuz-5.11

produces

old initrd.imgboot/vmlinuz-5.11
new boot/initrd.img-5.11
old initrd.img-5.11
new vmlinuz-5.11/initrd.img-5.11

meaning it fixes the case of link_in_boot = no; but regresses the link_in_boot = yes case.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

linux-update-symlinks install 4.15.0-144-generic /boot/vmlinuz-4.15.0-144-generic => generates correct symlinks for vmlinuz{.old} with both link_in_boot and without link_in_boot.

I am confused how come Debian kernels call linux-update-symlinks and Ubuntu kernels (and upstream) do not.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

But we do call linux-update-symlinks in the maintainer scripts.....

why doesn't installkernel call that, horum.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Untested yet, but here is a proposed patch which hopefully will fix installkernel in all link_in_boot modes, without regressing anything.

description: updated
description: updated
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

# dpkg-query -W initramfs-tools linux-base
initramfs-tools 0.140ubuntu4
linux-base 4.5ubuntu8

# cat /etc/kernel-img.conf
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

# ls -latr / | grep '> boot'
# apt install linux-generic
# ls -l / | grep '> boot'
lrwxrwxrwx 1 root root 33 May 27 13:12 initrd.img -> boot/initrd.img-5.11.0-16-generic
lrwxrwxrwx 1 root root 33 May 27 13:12 initrd.img.old -> boot/initrd.img-5.11.0-16-generic
lrwxrwxrwx 1 root root 30 May 27 13:12 vmlinuz -> boot/vmlinuz-5.11.0-16-generic
lrwxrwxrwx 1 root root 30 May 27 13:12 vmlinuz.old -> boot/vmlinuz-5.11.0-16-generic

# apt install linux-lowlatency
# ls -l / | grep '> boot'
lrwxrwxrwx 1 root root 36 May 27 13:17 initrd.img -> boot/initrd.img-5.11.0-16-lowlatency
lrwxrwxrwx 1 root root 33 May 27 13:12 initrd.img.old -> boot/initrd.img-5.11.0-16-generic
lrwxrwxrwx 1 root root 33 May 27 13:17 vmlinuz -> boot/vmlinuz-5.11.0-16-lowlatency
lrwxrwxrwx 1 root root 30 May 27 13:12 vmlinuz.old -> boot/vmlinuz-5.11.0-16-generic

Grab a "self-built" kernel
# wget https://kernel.ubuntu.com/~kernel-ppa/mainline/daily/2021-05-26/amd64/linux-image-unsigned-5.13.0-051300rc3daily20210526-generic_5.13.0-051300rc3daily20210526.202105252209_amd64.deb

# wget https://kernel.ubuntu.com/~kernel-ppa/mainline/daily/2021-05-26/amd64/linux-modules-5.13.0-051300rc3daily20210526-generic_5.13.0-051300rc3daily20210526.202105252209_amd64.deb

# dpkg-deb -x linux-modules-5.13.0-051300rc3daily20210526-generic_5.13.0-051300rc3daily20210526.202105252209_amd64.deb linux/
# dpkg-deb -x linux-image-unsigned-5.13.0-051300rc3daily20210526-generic_5.13.0-051300rc3daily20210526.202105252209_amd64.deb linux/
# cp -r linux/lib/modules/5.13.0-051300rc3daily20210526-generic /lib/modules/

# installkernel 5.13.0-051300rc3daily202
10526-generic ./linux/boot/vmlinuz-5.13.0-051300rc3daily20210526-generic ./linux/boot/System.map-5.13.0-051300rc3daily20210526-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc3daily20210526-generic /boot/vmlinuz-5.13.0-051300rc3daily20210526-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc3daily20210526-generic /boot/vmlinuz-5.13.0-051300rc3daily20210526-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc3daily20210526-generic

# ls -l / | grep '> boot'
lrwxrwxrwx 1 root root 36 May 27 13:29 initrd.img -> boot/initrd.img-5.11.0-16-lowlatency
lrwxrwxrwx 1 root root 33 May 27 13:33 initrd.img.old -> boot/initrd.img-5.11.0-16-generic
lrwxrwxrwx 1 root root 33 May 27 13:29 vmlinuz -> boot/vmlinuz-5.11.0-16-lowlatency
lrwxrwxrwx 1 root root 30 May 27 13:29 vmlinuz.old -> boot/vmlinuz-5.11.0-16-generic

and fail.... Let's see what's wrong with my patch.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

aha, my xx-update-initrd-links lost executable bit again. need to fix that up in my packaging.
But also invalidates my previous test a bit.

# installkernel 5.13.0-051300rc3daily20210526-generic ./linux/boot/vmlinuz-5.13.0-051300rc3daily20210526-generic ./linux/boot/System.map-5.13.0-051300rc3daily20210526-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc3daily20210526-generic /boot/vmlinuz-5.13.0-051300rc3daily20210526-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc3daily20210526-generic /boot/vmlinuz-5.13.0-051300rc3daily20210526-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc3daily20210526-generic
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.13.0-051300rc3daily20210526-generic /boot/vmlinuz-5.13.0-051300rc3daily20210526-generic
I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.11.0-16-lowlatency
I: /initrd.img.old is now a symlink to boot/initrd.img-5.11.0-16-lowlatency
I: /vmlinuz is now a symlink to boot/vmlinuz-5.13.0-051300rc3daily20210526-generic
I: /initrd.img is now a symlink to boot/initrd.img-5.13.0-051300rc3daily20210526-generic

all is good.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Redid the test case with initramfs-tools installed and the updated linux-base patch.

Installed generic, links pointed at generic.
Installed lowlatency, old pointed at generic and the current links pointed at lowlatency.
Installed a kernel using installkernel script to /boot, old points at lowlatency and current points at custom installed kernel.

# ls -l /boot/ | grep '>'
lrwxrwxrwx 1 root root 48 May 28 10:02 initrd.img -> initrd.img-5.13.0-051300rc3daily20210526-generic
lrwxrwxrwx 1 root root 31 May 28 10:02 initrd.img.old -> initrd.img-5.11.0-16-lowlatency
lrwxrwxrwx 1 root root 45 May 28 10:02 vmlinuz -> vmlinuz-5.13.0-051300rc3daily20210526-generic
lrwxrwxrwx 1 root root 28 May 28 09:51 vmlinuz.old -> vmlinuz-5.11.0-16-lowlatency

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Testing again, but without initramfs-tools installed, and with kernel-img.conf set to do_initrd = yes and link_in_boot = no

End result is this:

# ls -l /vmlinu* /initrd.img* /boot/initrd.img*
ls: cannot access '/boot/initrd.img*': No such file or directory
lrwxrwxrwx 1 root root 53 May 28 10:30 /initrd.img -> boot/initrd.img-5.13.0-051300rc3daily20210526-generic
lrwxrwxrwx 1 root root 50 May 28 10:30 /vmlinuz -> boot/vmlinuz-5.13.0-051300rc3daily20210526-generic
lrwxrwxrwx 1 root root 33 May 28 10:30 /vmlinuz.old -> boot/vmlinuz-5.11.0-16-lowlatency

initrd.img symlink from / is a dangling one.
/vmlinuz* are correctly updated.
initrd.img.old is not existant.

This confirms that the revised postin.d snippet is working correctly and it doesn't matter if it is ordered before or after generating initrd.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-base - 4.5ubuntu8

---------------
linux-base (4.5ubuntu8) impish; urgency=medium

  * Rewrite xx-update-initrd-links to use linux-update-symlinks. This will
    now make installkernel behaviour match the linux-image-*.postinst
    behaviour exactly with respect to creating & updating vmlinu? and
    initrd.img symlinks in / or /boot. LP: #1929255

 -- Dimitri John Ledkov <email address hidden> Thu, 27 May 2021 10:43:52 +0100

Changed in linux-base (Ubuntu Impish):
status: Confirmed → Fix Released
Mathew Hodson (mhodson)
tags: removed: regression-update
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Fabien, or anyone else affected,

Accepted linux-base into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-base/4.5ubuntu1.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in linux-base (Ubuntu Bionic):
status: Confirmed → Fix Committed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Fabien, or anyone else affected,

Accepted linux-base into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-base/4.5ubuntu3.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in linux-base (Ubuntu Focal):
status: New → Fix Committed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Fabien, or anyone else affected,

Accepted linux-base into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-base/4.5ubuntu5.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in linux-base (Ubuntu Hirsute):
status: New → Fix Committed
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (linux-base/4.5ubuntu3.5)

All autopkgtests for the newly accepted linux-base (4.5ubuntu3.5) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

linux-hwe-5.8/5.8.0-55.62~20.04.1 (amd64)
linux-gcp-5.8/5.8.0-1032.34~20.04.1 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#linux-base

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (linux-base/4.5ubuntu1.6)

All autopkgtests for the newly accepted linux-base (4.5ubuntu1.6) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

linux-oem-osp1/5.0.0-1071.77 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#linux-base

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Fabien Malfoy (fmalfoy) wrote :

Is something going to be done to fix the regressions reported for Bionic and Focal ?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@fmalfoy it was fixed with the 06-04 round of sru updates.

Does the new linux-base from proposed not resolve the reported regressions for you?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Hirsute:
link_in_boot = yes

# dpkg-query -W linux-base
linux-base 4.5ubuntu5.2

# Two regular flavours
# ls -latr /boot/ | grep -- '->' | sort
lrwxrwxrwx 1 root root 25 Jun 23 10:46 vmlinuz.old -> vmlinuz-5.11.0-23-generic
lrwxrwxrwx 1 root root 28 Jun 23 10:46 vmlinuz -> vmlinuz-5.11.0-23-lowlatency
lrwxrwxrwx 1 root root 28 Jun 23 10:49 initrd.img.old -> initrd.img-5.11.0-23-generic
lrwxrwxrwx 1 root root 31 Jun 23 10:48 initrd.img -> initrd.img-5.11.0-23-lowlatency

# selfbuilt
# installkernel 5.13.0-051300rc7-generic image/boot/vmlinuz-5.13.0-051300rc7-generic modules/boot/System.map-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.11.0-23-lowlatency
I: /boot/initrd.img is now a symlink to initrd.img-5.13.0-051300rc7-generic

# ls -latr /boot/ | grep -- '->' | sort
lrwxrwxrwx 1 root root 28 Jun 23 10:46 vmlinuz.old -> vmlinuz-5.11.0-23-lowlatency
lrwxrwxrwx 1 root root 31 Jun 23 10:52 initrd.img.old -> initrd.img-5.11.0-23-lowlatency
lrwxrwxrwx 1 root root 32 Jun 23 10:52 vmlinuz -> vmlinuz-5.13.0-051300rc7-generic
lrwxrwxrwx 1 root root 35 Jun 23 10:52 initrd.img -> initrd.img-5.13.0-051300rc7-generic

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Hirsute:
link_in_boot = no

# dpkg-query -W linux-base
linux-base 4.5ubuntu5.2

# Two regular flavours
# ls -latr / | grep -- '->' | grep boot | sort
lrwxrwxrwx 1 root root 30 Jun 23 10:58 vmlinuz.old -> boot/vmlinuz-5.11.0-23-generic
lrwxrwxrwx 1 root root 33 Jun 23 10:58 initrd.img.old -> boot/initrd.img-5.11.0-23-generic
lrwxrwxrwx 1 root root 33 Jun 23 11:00 vmlinuz -> boot/vmlinuz-5.11.0-23-lowlatency
lrwxrwxrwx 1 root root 36 Jun 23 11:00 initrd.img -> boot/initrd.img-5.11.0-23-lowlatency

# selfbuilt
# installkernel 5.13.0-051300rc7-generic image/boot/vmlinuz-5.13.0-051300rc7-generic modules/boot/System.map-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.11.0-23-lowlatency
I: /initrd.img.old is now a symlink to boot/initrd.img-5.11.0-23-lowlatency
I: /vmlinuz is now a symlink to boot/vmlinuz-5.13.0-051300rc7-generic
I: /initrd.img is now a symlink to boot/initrd.img-5.13.0-051300rc7-generic

# ls -latr / | grep -- '->' | grep boot | sort
lrwxrwxrwx 1 root root 33 Jun 23 11:12 vmlinuz.old -> boot/vmlinuz-5.11.0-23-lowlatency
lrwxrwxrwx 1 root root 36 Jun 23 11:12 initrd.img.old -> boot/initrd.img-5.11.0-23-lowlatency
lrwxrwxrwx 1 root root 37 Jun 23 11:12 vmlinuz -> boot/vmlinuz-5.13.0-051300rc7-generic
lrwxrwxrwx 1 root root 40 Jun 23 11:12 initrd.img -> boot/initrd.img-5.13.0-051300rc7-generic

tags: added: verification-done-hirsute
removed: regression-proposed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Focal:
link_in_boot = yes

# dpkg-query -W linux-base
linux-base 4.5ubuntu3.5

# Two regular flavours
# ls -latr /boot/ | grep -- '->' | sort
lrwxrwxrwx 1 root root 24 Jun 23 11:18 vmlinuz.old -> vmlinuz-5.4.0-78-generic
lrwxrwxrwx 1 root root 27 Jun 23 11:18 initrd.img.old -> initrd.img-5.4.0-78-generic
lrwxrwxrwx 1 root root 27 Jun 23 11:20 vmlinuz -> vmlinuz-5.4.0-78-lowlatency
lrwxrwxrwx 1 root root 30 Jun 23 11:20 initrd.img -> initrd.img-5.4.0-78-lowlatency

# selfbuilt
# installkernel 5.13.0-051300rc7-generic image/boot/vmlinuz-5.13.0-051300rc7-generic modules/boot/System.map-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.4.0-78-lowlatency
I: /boot/initrd.img is now a symlink to initrd.img-5.13.0-051300rc7-generic

# ls -latr /boot/ | grep -- '->' | sort
lrwxrwxrwx 1 root root 27 Jun 23 11:20 vmlinuz.old -> vmlinuz-5.4.0-78-lowlatency
lrwxrwxrwx 1 root root 30 Jun 23 11:23 initrd.img.old -> initrd.img-5.4.0-78-lowlatency
lrwxrwxrwx 1 root root 32 Jun 23 11:22 vmlinuz -> vmlinuz-5.13.0-051300rc7-generic
lrwxrwxrwx 1 root root 35 Jun 23 11:23 initrd.img -> initrd.img-5.13.0-051300rc7-generic

All is good.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

focal:
link_in_boot = no

# dpkg-query -W linux-base
linux-base 4.5ubuntu3.5

# Two regular flavours
# ls -latr / | grep -- '->' | grep boot | sort
lrwxrwxrwx 1 root root 29 Jun 23 13:40 vmlinuz.old -> boot/vmlinuz-5.4.0-78-generic
lrwxrwxrwx 1 root root 32 Jun 23 13:40 initrd.img.old -> boot/initrd.img-5.4.0-78-generic
lrwxrwxrwx 1 root root 32 Jun 23 13:57 vmlinuz -> boot/vmlinuz-5.4.0-78-lowlatency
lrwxrwxrwx 1 root root 35 Jun 23 13:57 initrd.img -> boot/initrd.img-5.4.0-78-lowlatency

# selfbuilt
installkernel 5.13.0-051300rc7-generic image/boot/vmlinuz-5.13.0-051300rc7-generic modules/boot/System.map-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.4.0-78-lowlatency
I: /initrd.img.old is now a symlink to boot/initrd.img-5.4.0-78-lowlatency
I: /vmlinuz is now a symlink to boot/vmlinuz-5.13.0-051300rc7-generic
I: /initrd.img is now a symlink to boot/initrd.img-5.13.0-051300rc7-generic

# ls -latr / | grep -- '->' | grep boot | sort
lrwxrwxrwx 1 root root 32 Jun 23 14:04 vmlinuz.old -> boot/vmlinuz-5.4.0-78-lowlatency
lrwxrwxrwx 1 root root 35 Jun 23 14:04 initrd.img.old -> boot/initrd.img-5.4.0-78-lowlatency
lrwxrwxrwx 1 root root 37 Jun 23 14:04 vmlinuz -> boot/vmlinuz-5.13.0-051300rc7-generic
lrwxrwxrwx 1 root root 40 Jun 23 14:04 initrd.img -> boot/initrd.img-5.13.0-051300rc7-generic

tags: added: verification-done-focal
Revision history for this message
Fabien Malfoy (fmalfoy) wrote :

@xnox
I see that the status for Bionic is still _Fix Committed_ but not _Fix Released_. Am I not understanding this well enough ?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

bionic:
link_in_boot = yes

# dpkg-query -W linux-base
linux-base 4.5ubuntu1.6

# Two regular flavours
# ls -latr /boot/ | grep -- '->' | sort
lrwxrwxrwx 1 root root 26 Jun 23 14:08 vmlinuz.old -> vmlinuz-4.15.0-147-generic
lrwxrwxrwx 1 root root 29 Jun 23 14:08 initrd.img.old -> initrd.img-4.15.0-147-generic
lrwxrwxrwx 1 root root 29 Jun 23 14:10 vmlinuz -> vmlinuz-4.15.0-147-lowlatency
lrwxrwxrwx 1 root root 32 Jun 23 14:10 initrd.img -> initrd.img-4.15.0-147-lowlatency

# selfbuilt
# installkernel 5.13.0-051300rc7-generic image/boot/vmlinuz-5.13.0-051300rc7-generic modules/boot/System.map-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-4.15.0-147-lowlatency
I: /boot/initrd.img is now a symlink to initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic

# ls -latr /boot/ | grep -- '->' | sort
lrwxrwxrwx 1 root root 29 Jun 23 14:10 vmlinuz.old -> vmlinuz-4.15.0-147-lowlatency
lrwxrwxrwx 1 root root 32 Jun 23 14:13 vmlinuz -> vmlinuz-5.13.0-051300rc7-generic
lrwxrwxrwx 1 root root 32 Jun 23 14:14 initrd.img.old -> initrd.img-4.15.0-147-lowlatency
lrwxrwxrwx 1 root root 35 Jun 23 14:14 initrd.img -> initrd.img-5.13.0-051300rc7-generic

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

bionic:
link_in_boot = no

# dpkg-query -W linux-base
linux-base 4.5ubuntu1.6

# Two regular flavours
# ls -latr / | grep -- '->' | grep boot | sort
lrwxrwxrwx 1 root root 31 Jun 23 14:18 vmlinuz.old -> boot/vmlinuz-4.15.0-147-generic
lrwxrwxrwx 1 root root 34 Jun 23 14:18 initrd.img.old -> boot/initrd.img-4.15.0-147-generic
lrwxrwxrwx 1 root root 34 Jun 23 14:20 vmlinuz -> boot/vmlinuz-4.15.0-147-lowlatency
lrwxrwxrwx 1 root root 37 Jun 23 14:20 initrd.img -> boot/initrd.img-4.15.0-147-lowlatency

# selfbuilt
# installkernel 5.13.0-051300rc7-generic image/boot/vmlinuz-5.13.0-051300rc7-generic modules/boot/System.map-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.15.0-147-lowlatency
I: /initrd.img.old is now a symlink to boot/initrd.img-4.15.0-147-lowlatency
I: /vmlinuz is now a symlink to boot/vmlinuz-5.13.0-051300rc7-generic
I: /initrd.img is now a symlink to boot/initrd.img-5.13.0-051300rc7-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.13.0-051300rc7-generic /boot/vmlinuz-5.13.0-051300rc7-generic

# ls -latr / | grep -- '->' | grep boot | sort
lrwxrwxrwx 1 root root 34 Jun 23 14:22 vmlinuz.old -> boot/vmlinuz-4.15.0-147-lowlatency
lrwxrwxrwx 1 root root 37 Jun 23 14:22 initrd.img.old -> boot/initrd.img-4.15.0-147-lowlatency
lrwxrwxrwx 1 root root 37 Jun 23 14:22 vmlinuz -> boot/vmlinuz-5.13.0-051300rc7-generic
lrwxrwxrwx 1 root root 40 Jun 23 14:22 initrd.img -> boot/initrd.img-5.13.0-051300rc7-generic

tags: added: verification-done-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-base - 4.5ubuntu5.2

---------------
linux-base (4.5ubuntu5.2) hirsute; urgency=medium

  * Rewrite xx-update-initrd-links to use linux-update-symlinks. This will
    now make installkernel behaviour match the linux-image-*.postinst
    behaviour exactly with respect to creating & updating vmlinu? and
    initrd.img symlinks in / or /boot. LP: #1929255

linux-base (4.5ubuntu5.1) hirsute; urgency=medium

  * Make the new posinst hook executable (the correct bits were lost when
    adding the scripts via debdiff) (LP: #1877088).
  * Check for update-initramfs being installed before running the postinst
    hook which updates the softlinks (LP: #1928700).

 -- Dimitri John Ledkov <email address hidden> Wed, 02 Jun 2021 09:40:13 +0100

Changed in linux-base (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for linux-base has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-base - 4.5ubuntu3.5

---------------
linux-base (4.5ubuntu3.5) focal; urgency=medium

  * Rewrite xx-update-initrd-links to use linux-update-symlinks. This will
    now make installkernel behaviour match the linux-image-*.postinst
    behaviour exactly with respect to creating & updating vmlinu? and
    initrd.img symlinks in / or /boot. LP: #1929255

linux-base (4.5ubuntu3.4) focal; urgency=medium

  * Check for update-initramfs being installed before running the postinst
    hook which updates the softlinks (LP: #1928700).

linux-base (4.5ubuntu3.3) focal; urgency=medium

  * Make the new posinst hook executable (the correct bits were lost when
    adding the scripts via debdiff) (LP: #1877088).

linux-base (4.5ubuntu3.2) focal; urgency=medium

  [ Stefan Bader ]
  * Add kernel postinst hook to update initrd softlinks to match the kernel
    version targets (LP: #1877088).

 -- Dimitri John Ledkov <email address hidden> Wed, 02 Jun 2021 09:43:06 +0100

Changed in linux-base (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-base - 4.5ubuntu1.6

---------------
linux-base (4.5ubuntu1.6) bionic; urgency=medium

  * Rewrite xx-update-initrd-links to use linux-update-symlinks. This will
    now make installkernel behaviour match the linux-image-*.postinst
    behaviour exactly with respect to creating & updating vmlinu? and
    initrd.img symlinks in / or /boot. LP: #1929255

linux-base (4.5ubuntu1.5) bionic; urgency=medium

  * Check for update-initramfs being installed before running the postinst
    hook which updates the softlinks (LP: #1928700).

linux-base (4.5ubuntu1.4) bionic; urgency=medium

  * Make the new posinst hook executable (the correct bits were lost when
    adding the scripts via debdiff) (LP: #1877088).

linux-base (4.5ubuntu1.3) bionic; urgency=medium

  [ Stefan Bader ]
  * Add kernel postinst hook to update initrd softlinks to match the kernel
    version targets (LP: #1877088).

 -- Dimitri John Ledkov <email address hidden> Wed, 02 Jun 2021 09:44:21 +0100

Changed in linux-base (Ubuntu Bionic):
status: Fix Committed → 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.