Xenial upgrade installs i386 kernel despite amd64 userland

Bug #1586894 reported by Ryan C. Underwood
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

I had a Trusty 14.04 LTS system and used update-manager -d to trigger the release upgrade to Xenial. Everything went fine, but when I rebooted into the kernel 4.4.0-22-generic I was greeted with a stacktrace and an error about not being able to execute /sbin/init on the initrd.

I booted into the old kernel and extracted and compared the initrd's and everything important was the same. I then booted with boot_delay=250 and after a long wait was able to see "request_module: runaway loop modprobe binfmt-464c" messages indicating wrong binary format. Then I looked at the kernel config and noticed that CONFIG_X86_64 was not defined on the upgrade kernel; afterwards, I saw that linux-image-generic:i386 and friends were installed.

After replacing linux-image-generic:i386 and friends with the amd64 variants, all was fine.

Please ensure that if linux-image-generic is installed or replaced, its arch matches the arch of /sbin/init or systemd perhaps?

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ubuntu-release-upgrader-core 1:16.04.14
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
NonfreeKernelModules: openafs
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CrashDB: ubuntu
Date: Sun May 29 21:22:01 2016
JournalErrors:
 Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] failed with exit code 1: Hint: You are currently not seeing messages from other users and the system.
       Users in the 'systemd-journal' group can see all messages. Pass -q to
       turn off this notice.
 No journal files were opened due to insufficient permissions.
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to xenial on 2016-05-30 (0 days ago)
VarLogDistupgradeAptclonesystemstate.tar.gz:
 Error: command ['pkexec', 'cat', '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'] failed with exit code 127: polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
 Error executing command as another user: Not authorized

 This incident has been reported.
VarLogDistupgradeApttermlog: Error: [Errno 13] Permission denied: '/var/log/dist-upgrade/apt-term.log'
VarLogDistupgradeTermlog:

Revision history for this message
Ryan C. Underwood (nemesis-icequake) wrote :
Revision history for this message
Ryan C. Underwood (nemesis-icequake) wrote :

Or just check uname -m and don't install a different arch kernel during the upgrade. :-)

Revision history for this message
Brian Murray (brian-murray) wrote :

In VarLogDistUpgradeMainlog.txt we can see the following:

2016-05-29 11:36:01,240 INFO installing linux metapackage: linux-generic:i386
2016-05-29 11:36:01,241 DEBUG Installing 'linux-generic:i386' (linux metapackage may have been accidentally uninstalled)

The function "_get_linux_metapackage" from DistUpgradeQuirks.py doesn't seem to do any architecture checking.

That being said you seem to have had the amd64 and i386 kernel packages installed before the upgrade. From the Foreign section of VarLogDistupgradeMainlog.txt:

linux-image-4.0.5-040005-generic linux-image-4.4.10-040410-generic:i386

Revision history for this message
Brian Murray (brian-murray) wrote :

See bug 1509305 for some background regarding the "_get_linux_metapackage" function.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Triaged
Revision history for this message
Ryan C. Underwood (nemesis-icequake) wrote :

You're right, I had mistakenly installed that specific kernel image from the kernel ppa, but never booted into it. Is that why it decided to install the i386 metapackage?

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → Medium
tags: added: rls-y-incoming
tags: added: trusty2xenial
tags: added: rls-bb-incoming
removed: rls-y-incoming
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.