Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #228935

Re: Size of initrd

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Size of initrd
Date 2020-11-23 06:20 +0100
Message-ID <BecqB-1TO-1@gated-at.bofh.it> (permalink)
References <BdHd7-7WI-5@gated-at.bofh.it> <BdIiR-nY-1@gated-at.bofh.it> <BebXz-1uF-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun 22 Nov 2020 at 23:46:54 (-0500), Stefan Monnier wrote:
> >> I have two machines with very similar setups: both running Debian i386
> >> testing, they actually come from the same install done years ago
> >> and were cloned at some point in time.
> >> 
> >> One of the has /boot/initrd.img files that take about 15MB while the
> >> other has /boot/initrd.img files that take about 30MB (in both cases,
> >> they are compressed with `lzma`).
> >> 
> >> Any idea what this difference could come from (or how I could try and
> >> track it down) and how I could fix the size to be more like 15MB?
> >
> > The initramfs is a compressed cpio archive (of the initial file
> > system at boot time).
> 
> Duh!  Indeed, even `file` tells me that.
> It turns out that the bigger one says it's an "ASCII cpio archive",
> whereas the smaller one says it's an LZMA compressed file.
> 
> So apparently the issue is that while I configured "lzma" on both
> machines in /etc/initramfs, one of the two machines maybe doesn't have
> `lzma` installed?
> 
> > You can inspect it like so:
> >
> >   gunzip < /boot/initrd.img-4.19.0-10-amd64 | cpio -it | less
> 
> The "smaller" archive (the one that got compressed) gives me the kind of
> listing I expected (except I see a lot of X11-related crap in there, it
> looks like some kind of "boot splash screen" code got in there even
> I thought I had all that disabled),
> but oddly the "bigger" archive gives me a much smaller list:
> 
>     % cpio -vt < yuca-initrd.img-5.9.0-2-686-pae  
>     drwxr-xr-x   2 root     root            0 Aug 20 08:00 kernel
>     drwxr-xr-x   2 root     root            0 Aug 20 08:00 kernel/x86
>     drwxr-xr-x   2 root     root            0 Aug 20 08:00 kernel/x86/microcode
>     drwxr-xr-x   2 root     root            0 Aug 20 08:00 kernel/x86/microcode/.enuineIntel.align.0123456789abc
>     -rw-r--r--   1 root     root      3692544 Aug 20 08:00 kernel/x86/microcode/GenuineIntel.bin
>     7214 blocs
>     % l yuca-initrd.img-5.9.0-2-686-pae
>     -rw-r--r-- 1 monnier users 24421797 nov 21 14:51 yuca-initrd.img-5.9.0-2-686-pae
>     %
> 
> How come the archive weighs in at 24MB when it doesn't even contain 4MB
> of data?

Use unmkinitramfs. It appears you've only looked at the first archive,
the early one, which gets the kernel into shape. The second, main one
is the big one.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Size of initrd Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-21 21:00 +0100
  Re: Size of initrd <tomas@tuxteam.de> - 2020-11-21 22:10 +0100
    Re: Size of initrd Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-23 05:50 +0100
      Re: Size of initrd David Wright <deblis@lionunicorn.co.uk> - 2020-11-23 06:20 +0100
        Re: Size of initrd Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-24 00:40 +0100
          Re: Size of initrd <tomas@tuxteam.de> - 2020-11-24 10:20 +0100
            Re: Size of initrd Greg Wooledge <wooledg@eeg.ccf.org> - 2020-11-24 14:00 +0100
              Re: Size of initrd Curt <curty@free.fr> - 2020-11-24 15:40 +0100
            Re: Size of initrd Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-24 16:00 +0100
      Re: initrd inspection (was: Size of initrd) Felix Miata <mrmazda@earthlink.net> - 2020-11-23 07:40 +0100
        Re: initrd inspection (was: Size of initrd) <tomas@tuxteam.de> - 2020-11-23 09:50 +0100
          Re: initrd inspection Sven Hartge <sven@svenhartge.de> - 2020-11-23 12:30 +0100
            Re: initrd inspection <tomas@tuxteam.de> - 2020-11-23 13:00 +0100
              Re: initrd inspection Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-24 00:40 +0100
    Re: Size of initrd Curt <curty@free.fr> - 2020-11-23 14:00 +0100
      Re: Size of initrd Curt <curty@free.fr> - 2020-11-23 14:30 +0100
      Re: initrd inspection (was: Size of initrd) Felix Miata <mrmazda@earthlink.net> - 2020-11-23 18:30 +0100
    Re: Size of initrd Greg Wooledge <wooledg@eeg.ccf.org> - 2020-11-23 14:20 +0100
      Re: Size of initrd <tomas@tuxteam.de> - 2020-11-23 16:20 +0100
  Re: Size of initrd David Wright <deblis@lionunicorn.co.uk> - 2020-11-21 22:40 +0100
  Re: Size of initrd Andy Smith <andy@strugglers.net> - 2020-11-21 22:50 +0100
    Re: Size of initrd David Wright <deblis@lionunicorn.co.uk> - 2020-11-22 00:10 +0100

csiph-web