Netboot install fails due to linux-image-4.4.0-143-generic.postinst linux-update-symlinks not found

Bug #1820755 reported by Peter
274
This bug affects 50 people
Affects Status Importance Assigned to Milestone
Blue Linux
New
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Xenial
Confirmed
Undecided
Unassigned
linux-base (Ubuntu)
Confirmed
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

Using a netboot install of Ubuntu 16.04 LTS server, the install fails when configuring the kernel. The failure will not let you move on.

This seems to have happened after the release of
https://lists.ubuntu.com/archives/ubuntu-security-announce/2019-March/004803.html

The error logs
Mar 18 17:09:50 in-target: Setting up linux-modules-4.4.0-143-generic (4.4.0-143.169) ...
Mar 18 17:09:50 in-target: ^M
Mar 18 17:09:51 in-target: Setting up linux-image-4.4.0-143-generic (4.4.0-143.169) ...
Mar 18 17:09:51 in-target: ^M
Mar 18 17:09:51 in-target: /var/lib/dpkg/info/linux-image-4.4.0-143-generic.postinst: 50: /var/lib/dpkg/info/linux-image-4.4.0-143-generic.postinst:
Mar 18 17:09:51 in-target: linux-update-symlinks: not found
Mar 18 17:09:51 in-target: ^M
Mar 18 17:09:51 in-target: dpkg: error processing package linux-image-4.4.0-143-generic (--configure):
Mar 18 17:09:51 in-target: ^M
Mar 18 17:09:51 in-target: subprocess installed post-installation script returned error exit status 127
Mar 18 17:09:51 in-target: ^M
Mar 18 17:09:51 in-target: dpkg: dependency problems prevent configuration of linux-modules-extra-4.4.0-143-generic:
Mar 18 17:09:51 in-target: ^M
Mar 18 17:09:51 in-target: linux-modules-extra-4.4.0-143-generic depends on linux-image-4.4.0-143-generic | linux-image-unsigned-4.4.0-143-generic; however:
Mar 18 17:09:51 in-target: ^M
Mar 18 17:09:51 in-target: Package linux-image-4.4.0-143-generic is not configured yet.
Mar 18 17:09:51 in-target: ^M
Mar

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
Jeremy P (jbain) wrote :

I can confirm I'm seeing this as well with a fresh install from the latest 16.04 netboot

Revision history for this message
Lunatine (lunatine-kr) wrote :

I have a same problem too.

It seems to be problem of linux-base package version.
linux-image-4.4.0-143-generic require linux-base 4.5ubuntu1
but netboot installer use a linux-base 4.0ubuntu1 which does not contain below tools.

/usr/bin/linux-update-symlinks
/usr/bin/linux-version
/usr/bin/linux-check-removal

Revision history for this message
Lunatine (lunatine-kr) wrote :

As a temporary measure, the installation failure error was avoided by putting 4.4.0-142 kernel on preseed.cfg

d-i base-installer/kernel/image string linux-image-4.4.0-142-generic

After installing this version 4.04-142, we update the linux-base to 4.5ubuntu1 version at POST stage and upgrade it to 4.4.0-143.

Revision history for this message
Research Computing (rcgop) wrote :

Same problem here.

"d-i base-installer/kernel/image string linux-image-4.4.0-142-generic"
did not work for us. The installer continued to fetch 4.4.0-143.

Revision history for this message
Peter (kzqdnsw4i20a5pz94-peter) wrote :

@ Lunatine (lunatine-lunatine)

The suggested work around does work for us. This helps relieve some pressure until the package can be fixed. Thanks.

Revision history for this message
Jason Pereira (jasondpereira) wrote :

I can confirm adding d-i base-installer/kernel/image string linux-image-4.4.0-142-generic does not work the install will ignore this option and proceed with the install of 143

fresh netinstall of 16.04

Revision history for this message
Joshua Burgess (burgessja) wrote :

Specifying the kernel with d-i base-installer/kernel/image string linux-image-4.4.0-142-generic, after the disk layout and prior to the root user configuration, allowed the install process to continue for us.

Revision history for this message
Daniel Pfankuchen (dpfankuchen) wrote :

We were able to workaround this by adding

d-i base-installer/kernel/image string linux-image-4.4.0-142-generic
d-i base-installer/kernel/override-image string linux-image-4.4.0-142-generic

to the preseed file.

To enable networking we also had to add

d-i pkgsel/include string linux-image-extra-4.4.0-142-generic

Revision history for this message
Research Computing (rcgop) wrote :

Thanks for the tip, dpfankuchen!

We use kickstarts with a few preseed options. Your suggestion helped but installs still die.

"Helped" == deployments now fetch a bunch of 4.4.0-142 packages, but ultimately still fetch linux-image-4.4.0-143* which causes them to die with the same errors quoted above.

Revision history for this message
Guillaume Penin (guillaume-penin) wrote :

Hi,

We are also affected by this bug.

Adding linux-meta in the loop because a simple solution could be to now add a tighter dependency on the linux-image-4.4.0-*-generic package, that means linux-base (>= 4.5ubuntu1~16.04.1).

Changed in linux-meta (Ubuntu):
status: New → Confirmed
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in linux (Ubuntu Xenial):
status: New → Confirmed
Changed in linux-base (Ubuntu Xenial):
status: New → Confirmed
Revision history for this message
Peter Steenbergen (psteenbergen) wrote :

We are also experience this bug. All automated provisioning is not possible at the moment on our platform. Tried the above workarounds but non of them worked.

Revision history for this message
Kevin Puetz (puetzk) wrote :

The missing linux-update-symlinks script seems like it's supposed to come from linux-base, which appears to exist with the same version number (4.5ubuntu1~16.04.1), yet different contents, in xenial (no linux-update-symlinks) and xenial-updates. It appears that this is because 4.5ubuntu1 is getting picked up from xenial-security, but the packages.ubuntu.com filelist isn't showing this; xenial actually seems to debootstrap 4.0, not 4.5ubuntu1~16.04.1.

https://packages.ubuntu.com/xenial/all/linux-base/filelist
https://packages.ubuntu.com/xenial-updates/all/linux-base/filelist
https://launchpad.net/ubuntu/xenial/+source/linux-base

So I *think* (just from first bit of this research, not from actually trying a fix) it might as simple as the linux-base dependency in linux-image-4.4.0-143 needing a version constraint >= 4.5, to force apt to upgrade linux-base first. That certainly seems appropriate in any case, as the script it's planning to call isn't in 4.0 package. The upgraded package is seemingly available (from security or from xenial-updates), but there's no constraint telling apt it must seek it out, and what it already has meets the stated dependency so it's just proceeding with it.

As far as workarounds this theory might suggest, I'm not sure if there's a way to get d-i to include xenial-updates in the debootstrap sources so it would just get it the newer one in the first place (which would also avoid the redundancy of downloading/installing old versions and then immediately upgrading it). I had hoped that using `d-i pkgsel/upgrade safe-upgrade` might be another way to get it to install the upgraded linux-base before proceeding to the kernel, but it doesn't happen early enough.

SGray (sorna-job)
Changed in linux-base (Ubuntu Xenial):
status: Confirmed → Fix Released
assignee: nobody → SGray (sorna-job)
assignee: SGray (sorna-job) → nobody
Revision history for this message
Kevin Puetz (puetzk) wrote :

Some more info: from http://changelogs.ubuntu.com/changelogs/pool/main/l/linux-base/linux-base_4.5ubuntu1~16.04.1/changelog, it looks like the actual cutoff would be Depends: linux-base (>= 4.1)

On the question of workarounds, that confirms why pkgsel/upgrade didn't work, it's all in the base-installer udeb. The only hook point between apt-get update (where the new linux-base would be discovered) and the kernel (which currently assumes it's already installed) is the post_install_hooks call at https://salsa.debian.org/installer-team/base-installer/blob/master/debian/bootstrap-base.postinst#L188, which invokes scripts in /usr/lib/post-base-installer.d: https://salsa.debian.org/installer-team/base-installer/blob/master/library.sh#L265. And I find nothing in those hooks that would preseed can control.

So I'm not finding any way around it except a fixed kernel package with the right (versioned) Depends on linux-base.

Revision history for this message
Kevin Puetz (puetzk) wrote :

I finally came up with a workaround that can be done in a preseed.cfg (until this can be fixed properly in the kernel image)

d-i preseed/early_command string echo -e "#!/bin/sh\napt-install linux-base" > /usr/lib/post-base-installer.d/99-bug1820755; chmod +x /usr/lib/post-base-installer.d/99-bug1820755

In other words, have the early command (which runs before base-installer) set up another post-base-installer callback hook, to upgrade linux-base. Since base-installer runs its post_install_hooks between apt_update and install_kernel, this can pick up the linux-base from xenial-updates, which will let the kernel install succeed.

Seems to work for me and ends up with everything at the right versions in the end. That seems better than trying to hold back the linux-image-4.4.0-143-generic, which would leave you vulnerable to USN-3910-1 .

Revision history for this message
Kevin Puetz (puetzk) wrote :

I just found https://bugs.launchpad.net/ubuntu/xenial/+source/linux/+bug/1820419 - seems like the same root cause and linux-image-4.4.0-145-generic mentioned there (in -proposed) worked as I had hoped above (it has a version check on the Depends: linux-base, which pulls in the needed script from xenial-updates

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.