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


Groups > linux.debian.user > #228935

Re: Size of initrd

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Size of initrd
Date Mon, 23 Nov 2020 06:20:01 +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>
X-Original-To debian-user@lists.debian.org
X-Mailbox-Line From debian-user-request@lists.debian.org Mon Nov 23 05:12:46 2020
Old-Return-Path <pdkcox@cox.net>
X-Amavis-Spam-Status No, score=-6.652 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -5.5
Authentication-Results cox.net; auth=pass (PLAIN) smtp.auth=pdkcox@cox.net
X-Authority-Analysis v=2.4 cv=UpCmi88B c=1 sm=1 tr=0 ts=5fbb44bc a=kkeJ8LlWWq7dYbO4WG5cmA==:117 a=kkeJ8LlWWq7dYbO4WG5cmA==:17 a=kj9zAlcOel0A:10 a=9BK4zySPHo085vrJzYEA:9 a=CjuIK1q_8ugA:10
Reply-To debian-user@lists.debian.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.10.1 (2018-07-13)
X-Cmae-Envelope MS4xfO1q+NtMVqZOJnK+LChg8tHuyeABt25ePei8z+jFzKhpEp5gneysGwP5xBbJQYO85Nm5ltOvf/mTIECfMYMmWpJLDe+/eh99+oKfR84vU7IZI5PFyck8 b0xPOBhVpeW3TlkBQKA/rBSzkad6SqFwSgPZIfWXNWxLTpahpgB/nWzga9e7oPcPJwNzplwNKwZrSLvfBVp2wkuhIarl3ufgewPawqYpEOXsdKgpruZoaxDU /yYSR0YpxmpvEYSqgK04HeBBXUjXQCZ9FcjIEHWmLYA=
X-Mailing-List <debian-user@lists.debian.org> archive/latest/769348
List-ID <debian-user.lists.debian.org>
List-URL <https://lists.debian.org/debian-user/>
List-Archive https://lists.debian.org/msgid-search/20201123051226.GA7786@axis.corp
Approved robomod@news.nic.it
Lines 53
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Sun, 22 Nov 2020 23:12:26 -0600
X-Original-Message-ID <20201123051226.GA7786@axis.corp>
X-Original-References <jwvmtzav6l3.fsf-monnier+gmane.linux.debian.user@gnu.org> <20201121210306.GA5598@tuxteam.de> <jwvwnycn0un.fsf-monnier+gmane.linux.debian.user@gnu.org>
Xref csiph.com linux.debian.user:228935

Show key headers only | 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