Mixed compression initrds partially work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Updated description:
The kernel supports loading multiple initrds, like: [cpio microcode, gzip initrd.img].
Appending yet another initrd after that only works for selected compressions, not all of them. I'm not sure if this is a bug or a feature request.
So for example, this works: [cpio microcode, xz initrd.img, gzip extra.img]
And this doesn't: [cpio microcode, lz4 initrd.img, gzip extra.img]
To reproduce:
Get vmlinuz and initrd.img from an eoan daily build and put them in a directory.
Create a compressed extra.img:
# date > date.txt
# echo date.txt | cpio -oH newc | gzip > extra.img
Concatenate them:
# cat initrd.img.original extra.img > initrd.img
Boot them:
# kvm -m 512 -kernel vmlinuz -initrd initrd.img -append rdinit=/bin/sh
Then inside kvm:
# ls /date.txt
The date.txt file doesn't exist when initrd.img is lz4, while it appears if it's xz.
`dmesg | grep -i initramfs` reports:
Trying to unpack rootfs image as initramfs...
Initramfs unpacking failed: Decoding failed
description: | updated |
description: | updated |
description: | updated |
summary: |
- Concatenated lz4 initrds don't work + Mixed compression initrds partially work |
description: | updated |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1840945
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.