update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Incomplete
|
Low
|
Unassigned |
Bug Description
After running 'update-initramfs -u -k $(uname -r)', Linux will not boot. With 'quiet splash' set in grub, it appears to freeze after the 'Loading ramdisk...' message, and if booted in recovery mode, I see the following kernel panic:
Freeing unused kernel memory: 948k
Freeing unused kernel memory: 104K
x86/mm: Chcked W+X mappings: passed, no W+X pages found.
Failed to execute /init (error -2)
Kernel panic - not syncing: No working init found. Try passing init= optin to kernel. See Linux Documentation/
CPU: 6 PID: 1 Comm: swapper/0 Not tainted 4.13.0-16-generic #19-Ubuntu
Hardware name: Dell Inc. OptiPlex 990/0D6H9T, BIOS A07 09/10/2011
Call Trace:
dump_
? rest_init+0xb0/0xc0
panic+0xe4/0x23d
? putname+0x4b/0x50
? rest_init+0xc0/0xc0
kernel_
ret_from_
Kernel Offset: 0x1fc00000 from 0xffffffff8a000000 (relocation range: 0xffffffff80000
---[ end Kernel panic - no syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/
(full screenshot at https:/
Examining the initrd files, here is a good one, as installed by the Ubuntu 17.10 installer:
# file /boot/initrd.
/boot/initrd.
# ls -la /boot/initrd.
-rw-r--r-- 1 root root 50764087 Nov 3 21:02 /boot/initrd.
and here is the file after 'update-initramfs -u -k 4.13.0-16-generic':
# file /boot/initrd.
/boot/initrd.
root@jturner-
-rw-r--r-- 1 root root 50895514 Nov 3 21:01 /boot/initrd.
Good and bad initrds can be downloaded from https:/
After downloading initrd.
kvm -m 1G -kernel /boot/vmlinuz-
(tip obtained from https:/
I've experienced this problem with Ubuntu 17.04 and 17.10 on two separate PCs (both Dell OptiPlex 990s). Ubuntu boots fine initially, until one day I update the kernel or something, and a .deb postinst script calls update-initramfs and trashes that kernel's initrd file. If I run 'update-initramfs -u -k all', all my old initrd files are toast.
The "good" initrd format "ASCII cpio archive (SVR4 with no CRC)" is strange. I'm not getting many google hits on it. None of my other Ubuntu/Debian servers use that format in their initrds.
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: initramfs-tools 0.125ubuntu12
ProcVersionSign
Uname: Linux 4.13.0-16-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.1
Architecture: amd64
Date: Fri Nov 3 21:33:12 2017
InstallationDate: Installed on 2017-08-05 (90 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
PackageArchitec
SourcePackage: initramfs-tools
UpgradeStatus: Upgraded to artful on 2017-10-24 (10 days ago)
Changed in initramfs-tools (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → Low |
Status changed to 'Confirmed' because the bug affects multiple users.