• Size of boot partition and initrd sizes

    From Riccardo Mottola@21:1/5 to All on Wed May 19 10:40:01 2021
    Hello,

    I am in the process of updating, including the latest kernel (which
    probably will not work, but who knows).

    Originally, I reserved about half a gigabyte, which became effective
    473M for my boot parittion and up to now it has been plenty

    /dev/sda1       473M  382M   68M  85% /boot

    Now, every time I try to regenerate initrd,  initramfs-tools dies with
    not enough space.

    So I checked here:
    -rw-r--r-- 1 root root 169K Apr  1 12:48 /boot/config-5.12.0-rc5+
    -rw-r--r-- 1 root root 163K Dec 17 06:31 /boot/config-5.9.0-5-sparc64-smp lrwxrwxrwx 1 root root   31 May 19 00:15 /boot/initrd.img -> initrd.img-5.10.0-6-sparc64-smp
    -rw-r--r-- 1 root root 316M Apr  1 13:20 /boot/initrd.img-5.12.0-rc5+ -rw-r--r-- 1 root root  22M Mar 11 21:14
    /boot/initrd.img-5.9.0-5-sparc64-smp
    lrwxrwxrwx 1 root root   22 May 19 00:54 /boot/initrd.img.old -> initrd.img-5.12.0-rc5+
    -rw-r--r-- 1 root root 3.3M Apr  1 12:48 /boot/System.map-5.12.0-rc5+ -rw-r--r-- 1 root root   83 Dec 17 06:31
    /boot/System.map-5.9.0-5-sparc64-smp
    -rw-r--r-- 1 root root  13M Apr  1 15:34 /boot/vmlinux-5.12.0-rc5+
    -rwxr-xr-x 1 root root  16M Dec 17 06:31 /boot/vmlinux-5.9.0-5-sparc64-smp lrwxrwxrwx 1 root root   28 May 19 00:15 /boot/vmlinuz -> vmlinux-5.10.0-6-sparc64-smp
    lrwxrwxrwx 1 root root   19 May 19 00:54 /boot/vmlinuz.old -> vmlinux-5.12.0-rc5+


    I noticed that my old initrd.img was 22M... and the new one is 316M!
    since initramfs creates a back up copy, it does not find.

    Why is it now more than 10 times lager? what makes up this size? I
    wonder if it is due to new kernel or does initramfs depend on selected packages...
    What does get put in in in the ramfs, maybe something I can trim?

    Thanks,
    Riccardo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Riccardo Mottola on Wed May 19 11:00:02 2021
    On 5/19/21 10:30 AM, Riccardo Mottola wrote:
    So I checked here:
    -rw-r--r-- 1 root root 169K Apr  1 12:48 /boot/config-5.12.0-rc5+
    -rw-r--r-- 1 root root 163K Dec 17 06:31 /boot/config-5.9.0-5-sparc64-smp lrwxrwxrwx 1 root root   31 May 19 00:15 /boot/initrd.img -> initrd.img-5.10.0-6-sparc64-smp
    -rw-r--r-- 1 root root 316M Apr  1 13:20 /boot/initrd.img-5.12.0-rc5+ -rw-r--r-- 1 root root  22M Mar 11 21:14 /boot/initrd.img-5.9.0-5-sparc64-smp
    lrwxrwxrwx 1 root root   22 May 19 00:54 /boot/initrd.img.old -> initrd.img-5.12.0-rc5+
    -rw-r--r-- 1 root root 3.3M Apr  1 12:48 /boot/System.map-5.12.0-rc5+ -rw-r--r-- 1 root root   83 Dec 17 06:31 /boot/System.map-5.9.0-5-sparc64-smp
    -rw-r--r-- 1 root root  13M Apr  1 15:34 /boot/vmlinux-5.12.0-rc5+ -rwxr-xr-x 1 root root  16M Dec 17 06:31 /boot/vmlinux-5.9.0-5-sparc64-smp lrwxrwxrwx 1 root root   28 May 19 00:15 /boot/vmlinuz -> vmlinux-5.10.0-6-sparc64-smp
    lrwxrwxrwx 1 root root   19 May 19 00:54 /boot/vmlinuz.old -> vmlinux-5.12.0-rc5+


    I noticed that my old initrd.img was 22M... and the new one is 316M! since initramfs creates a back up copy, it does not find.

    Why is it now more than 10 times lager? what makes up this size? I wonder if it is due to new kernel or does initramfs depend on selected packages...
    What does get put in in in the ramfs, maybe something I can trim?

    That -rc5+ is a custom-built kernel, not a Debian kernel. You should tune your kernel
    a bit not to include everything in your initrd image and have some modules resides
    under /lib/modules only.

    If I remember correctly, you can configure below /etc/initramfs-tools which modules to
    include in your initrd.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)