@xnox, thank you, in #3 I was testing date.img as a plain cpio without 
compression,
while with your updated lz4/xz commands, it appears that when date.img matches 
the compression of initrd.img, then it works fine.

So the problem only happens when mixed compressions are used.

Btw, the reason I was trying that, is that in the new version of the
"ltsp" netbooting package, we send all the netbooting code as an
additional initrd.

So if we can't use mixed compressions, we'll need to provide a different
initrd for each image/chroot/vm/live-cd that the ltsp sysadmin will want
to netboot.

If the plans to default to lz4 initramfs are cancelled, then ltsp will
work anywhere with a single initrd, from jessie and 16.04 to buster and
hopefully 20.04. :)

Otherwise... where should we hunt the bug? In the kernel decompression
code, or in mkinitramfs?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1840945

Title:
  Concatenated lz4 initrds don't work

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Concatenating multiple initrds works fine with gzipped initrds.
  (microcode+gzip+gzip) => the kernel properly decompresses that

  With lz4, it can't decompress anything after the first lz4:
  (microcode+lz4+whatever) => it doesn't decompress whatever.

  To reproduce:
  Get vmlinuz and initrd.img from an eoan daily build and put them in a 
directory.
  Create an lz4 (or gzip or uncompressed cpio, it doesn't matter):
  # date > date.txt
  # echo date.txt | cpio -oH newc | lz4 > date.img
  Concatenate them:
  # cat initrd.img.original date.img > initrd.img
  Boot them:
  # kvm -m 512 -kernel vmlinuz -initrd initrd.img -append rdinit=/bin/sh

  Then inside kvm:
  # ls /date.txt

  The additional file doesn't exist.

  `dmesg | grep -i initramfs` reports:
  Trying to unpack rootfs image as initramfs...
  Initramfs unpacking failed: Decoding failed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1840945/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to