Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #63242
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#894294: Comment in the source of unmkinitramfs is ambiguous |
| Date | 2019-02-04 03:50 +0100 |
| Message-ID | <xnCuB-3Af-1@gated-at.bofh.it> (permalink) |
| References | <vyinf-33d-7@gated-at.bofh.it> <vyinf-33d-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
[Multipart message — attachments visible in raw view] - view raw
On Wed, 28 Mar 2018 21:18:54 +0900 Osamu Aoki <osamu@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.
Back to linux.debian.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#894294: Comment in the source of unmkinitramfs is ambiguous Osamu Aoki <osamu@debian.org> - 2018-03-28 14:30 +0200 Bug#894294: Comment in the source of unmkinitramfs is ambiguous Ben Hutchings <ben@decadent.org.uk> - 2019-02-04 03:50 +0100
csiph-web