[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Updating kernels impossible when /boot is getting full



On Sun, Aug 01, 2021 at 03:29:07PM -0700, David Christensen wrote:
> 2021-08-01 13:52:37 root@dipsy ~
> # file /boot/initrd.img-4.19.0-17-amd64
> /boot/initrd.img-4.19.0-17-amd64: gzip compressed data, last modified: Sun
> Jul 25 19:43:38 2021, from Unix, original size 126331392

Your initrd image, *uncompressed*, is smaller than the OP's compressed
images.  That should put to bed any more silly comments about "try
switching from gzip to bzip2 or xz" that we always get whenever someone
makes one of these threads.

(Or... at least, the first CPIO archive in your initrd image is that size.
And maybe you've only got one.  You appear not to have any microcode
in yours.  But other people will generally not have just one.)

> # gunzip -c /boot/initrd.img-4.19.0-17-amd64 | cpio -i -d -H newc
> --no-absolute-filenames
> 246741 blocks

That may not extract the full content of the initrd.  It only reads
one of the concatenated CPIO archives.  Also, the first archive may not
be gzipped.  Also also, hard-coding the input archive format is weird;
I'd prefer to let cpio auto-detect it.

To get a full listing, either use "lsinitramfs -l", or write a command
that reads *all* of the CPIO archives, not just the first one.  I'd
advise using lsinitramfs -l, because it'll be a lot easier.


Reply to: