On Wed, 28 Mar 2018 21:18:54 +0900 Osamu Aoki <os...@debian.org> wrote: > Source: initramfs-tools > Version: 0.130 > Severity: wishlist > > The line 56-59 of unmkinitramfs goes: > > # There may be a prepended uncompressed archive. cpio > # won't tell us the true size of this so we have to > # parse the headers and padding ourselves. This is > # very roughly based on linux/lib/earlycpio.c > > The claim "cpio won't tell us the true size of this ..." doesn't have > any explicit reference to substantiate its claim while my uneducated > simple use of cpio telling me the true file size without the tailing > garbage ;-) > > For example: > > $ cpio -i -t </initrd.img >/dev/null > 48 blocks > > So the uncompressed cpio file size is 512*48 BYTES. With some simple > experimentation with cpio, I realize cpio always create file size in > multiple of 512 bytes and it treat 512 bytes as a block. I can extract > tailing basic initrd image file as subinitrd.img with: > > $ dd if=/initrd.img of=subinitrd.img bs=512 skip=48 > > At least on my recent Debian system, this subinitrd.img is a nicely > extracted gzipped cpio archive. [...]
This code started life in bug #717805 and you can see there that various people found different behaviour. Ben. -- Ben Hutchings If you seem to know what you are doing, you'll be given more to do.
signature.asc
Description: This is a digitally signed message part