Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Giant initrd.iso files -- why?  (Read 3007 times)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.397
    • Land of the Buckeye
[EN] Giant initrd.iso files -- why?
« on: 2024/08/03, 22:51:55 »
Today I updated one of my laptops and I was surprised to see an error message saying that there was not enough space available in /boot to install the new 6.10.3 kernel. There were two kernels already installed, so I used kernel-remover to remove the older one, and afterward the full-upgrade finished correctly. I looked in /boot and I was surprised to see that the initrd.img files were each 117+ MB in size. On two other siduction systems the initrd.img files are 36-39 MB in size, and there is no problem upgrading to a new kernel when there are already two kernels installed. System details below -- you can see that /boot is a little over 1 GB in size.

This is not a problem I have ever seen, and google is not helping find the solution.

Anyone have any idea? Thanks in advance.

Code: [Select]
System:
  Kernel: 6.10.3-1-siduction-amd64 arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 5.27.11 Distro: siduction 22.1.2 Masters_of_War -
    kde - (202303151559)
Machine:
  Type: Laptop System: System76 product: Oryx Pro v: oryp8
    serial: <superuser required>
  Mobo: System76 model: Oryx Pro v: oryp8 serial: <superuser required>
    UEFI: coreboot v: 2021-09-23_b9b0e89 date: 09/23/2021
Battery:
  ID-1: BAT0 charge: 56.4 Wh (99.5%) condition: 56.7/70.7 Wh (80.3%)
CPU:
  Info: 8-core model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    cache: L2: 10 MiB
  Speed (MHz): avg: 898 min/max: 800/4600 cores: 1: 800 2: 983 3: 1075
    4: 1006 5: 800 6: 1123 7: 800 8: 800 9: 1028 10: 966 11: 800 12: 800 13: 800
    14: 987 15: 800 16: 800
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GA104M [GeForce RTX 3070 Mobile / Max-Q] driver: nouveau
    v: kernel
  Device-3: Bison BisonCam NB Pro driver: uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 24.1.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915
    resolution: 1920x1080~144Hz
  API: EGL v: 1.5 drivers: iris,nouveau,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.3 vendor: intel mesa v: 24.1.5-3
    renderer: Mesa Intel UHD Graphics (TGL GT1)
Audio:
  Device-1: Intel Tiger Lake-H HD Audio driver: snd_hda_intel
  Device-2: NVIDIA GA104 High Definition Audio driver: snd_hda_intel
  API: ALSA v: k6.10.3-1-siduction-amd64 status: kernel-api
  Server-1: PipeWire v: 1.2.2 status: active
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi driver: iwlwifi
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: enp36s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb type: USB
  Report: hciconfig ID: hci0 rfk-id: 0 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: <filter>
Drives:
  Local Storage: total: 1.36 TiB used: 65.74 GiB (4.7%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 500GB
    size: 465.76 GiB
  ID-2: /dev/nvme1n1 vendor: Western Digital model: WDS100T2B0C-00PXH0
    size: 931.51 GiB
Partition:
  ID-1: / size: 58.76 GiB used: 11.99 GiB (20.4%) fs: ext4 dev: /dev/nvme0n1p3
  ID-2: /boot size: 1007.9 MiB used: 266.8 MiB (26.5%) fs: ext2
    dev: /dev/nvme0n1p4
  ID-3: /boot/efi size: 511 MiB used: 288 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 388.96 GiB used: 53.49 GiB (13.8%) fs: ext4
    dev: /dev/nvme0n1p5
Swap:
  ID-1: swap-1 type: partition size: 8 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme0n1p2
Sensors:
  System Temperatures: cpu: 60.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 5037
Info:
  Memory: total: 32 GiB note: est. available: 31.21 GiB used: 3.68 GiB (11.8%)
  Processes: 380 Uptime: 0m Shell: Bash inxi: 3.3.35
 
Code: [Select]
dibl-oryxpro:/boot$ ls -la
total 258708
drwxr-xr-x  5 root root      4096 Aug  3 16:27 .
drwxr-xr-x 21 root root      4096 Aug  3 15:57 ..
-rw-r--r--  1 root root    297938 Jul 27 06:30 config-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root    297938 Aug  3 09:04 config-6.10.3-1-siduction-amd64
drwx------  3 root root      4096 Dec 31  1969 efi
drwxr-xr-x  5 root root      4096 Aug  3 15:47 grub
-rw-r--r--  1 root root 117578526 Jul 31 12:50 initrd.img-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root 117578885 Aug  3 16:27 initrd.img-6.10.3-1-siduction-amd64
drwx------  2 root root     16384 Dec  1  2023 lost+found
-rw-r--r--  1 root root    147744 Jan  7  2024 memtest86+x64.bin
-rw-r--r--  1 root root    148992 Jan  7  2024 memtest86+x64.efi
-rw-r--r--  1 root root   5791904 Jul 27 06:30 System.map-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root   5792744 Aug  3 09:04 System.map-6.10.3-1-siduction-amd64
-rw-r--r--  1 root root   8450560 Jul 27 06:30 vmlinuz-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root   8454656 Aug  3 09:04 vmlinuz-6.10.3-1-siduction-amd64
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.996
Re: Giant initrd.iso files -- why?
« Reply #1 on: 2024/08/03, 23:14:38 »
dpkg -l | grep firmware

As an alternative, you can do

Code: [Select]
echo MODULES=dep > /etc/initramfs-tools/conf.d/10-modules
After that do
Code: [Select]
update-initramfs u -k all
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.397
    • Land of the Buckeye
Re: Giant initrd.iso files -- why?
« Reply #2 on: 2024/08/03, 23:48:23 »
Code: [Select]
dibl-oryxpro:~$ dpkg -l | grep firmware
ii  amd64-microcode                                          3.20240116.2+nmu1                                       amd64        Platform firmware and microcode for AMD CPUs and SoCs
rc  b43-fwcutter                                             1:019-11                                                amd64        utility for extracting Broadcom 43xx firmware
ii  firmware-amd-graphics                                    20240709-1                                              all          Binary firmware for AMD/ATI graphics chips
ii  firmware-ath9k-htc                                       1.4.0-108-gd856466+dfsg1-1.5                            all          firmware for AR7010 and AR9271 USB wireless adapters
ii  firmware-atheros                                         20240709-1                                              all          Binary firmware for Qualcomm Atheros wireless cards
ii  firmware-bnx2                                            20240709-1                                              all          Binary firmware for Broadcom NetXtremeII
ii  firmware-bnx2x                                           20240709-1                                              all          Binary firmware for Broadcom NetXtreme II 10Gb
ii  firmware-brcm80211                                       20240709-1                                              all          Binary firmware for Broadcom/Cypress 802.11 wireless cards
ii  firmware-carl9170                                        1.9.9-399-gcd480b9-1.2                                  all          firmware for AR9170 USB wireless adapters
ii  firmware-intel-graphics                                  20240709-1                                              all          Binary firmware for Intel iGPUs and IPUs
ii  firmware-intel-misc                                      20240709-1                                              all          Binary firmware for miscellaneous Intel devices and chips
ii  firmware-iwlwifi                                         20240709-1                                              all          Binary firmware for Intel Wireless cards
ii  firmware-libertas                                        20240709-1                                              all          Binary firmware for Marvell wireless cards
ii  firmware-linux                                           20240709-1                                              all          Binary firmware for various drivers in the Linux kernel (metapackage)
ii  firmware-linux-free                                      20240610-1                                              all          Binary firmware for various drivers in the Linux kernel
ii  firmware-linux-nonfree                                   20240709-1                                              all          Binary firmware for various drivers in the Linux kernel (metapackage)
ii  firmware-marvell-prestera                                20240709-1                                              all          Binary firmware for Marvell Prestera ASIC devices
ii  firmware-mediatek                                        20240709-1                                              all          Binary firmware for MediaTek and Ralink chips for networking, SoCs and media
ii  firmware-misc-nonfree                                    20240709-1                                              all          Binary firmware for various drivers in the Linux kernel
ii  firmware-myricom                                         20240709-1                                              all          Binary firmware for Myri-10G Ethernet adapters
ii  firmware-netxen                                          20240709-1                                              all          Binary firmware for QLogic Intelligent Ethernet (3000 and 3100 Series)
ii  firmware-nvidia-graphics                                 20240709-1                                              all          Binary firmware for Nvidia GPU chips
ii  firmware-qlogic                                          20240709-1                                              all          Binary firmware for QLogic HBAs
ii  firmware-realtek                                         20240709-1                                              all          Binary firmware for Realtek wired/Wi-Fi/BT adapters
ii  firmware-ti-connectivity                                 20240709-1                                              all          Binary firmware for TI Connectivity Wi-Fi and BT/FM/GPS adapters
ii  firmware-zd1211                                          1:1.5-11                                                all          binary firmware for the zd1211rw wireless driver
ii  fwupd-amd64-signed                                       1:1.6+1                                                 amd64        Tools to manage UEFI firmware updates (signed)
ii  intel-microcode                                          3.20240531.1+nmu1                                       amd64        Processor microcode firmware for Intel CPUs
ii  ipxe-qemu                                                1.0.0+git-20190125.36a4c85-5.1                          all          PXE boot firmware - ROM images for qemu
ii  ovmf                                                     2024.05-1                                               all          UEFI firmware for 64-bit x86 virtual machines

That looks like a lot!

Code: [Select]
root@dibl-oryxpro:/home/don# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-6.10.3-1-siduction-amd64
I: The initramfs will attempt to resume from /dev/nvme0n1p2
I: (UUID=cb64f575-fb18-481e-8175-615fd634b387)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-6.10.2-1-siduction-amd64
I: The initramfs will attempt to resume from /dev/nvme0n1p2
I: (UUID=cb64f575-fb18-481e-8175-615fd634b387)
I: Set the RESUME variable to override this.
root@dibl-oryxpro:/home/don# cd /boot
root@dibl-oryxpro:/boot# ls -la
total 168452
drwxr-xr-x  5 root root     4096 Aug  3 17:44 .
drwxr-xr-x 21 root root     4096 Aug  3 15:57 ..
-rw-r--r--  1 root root   297938 Jul 27 06:30 config-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root   297938 Aug  3 09:04 config-6.10.3-1-siduction-amd64
drwx------  3 root root     4096 Dec 31  1969 efi
drwxr-xr-x  5 root root     4096 Aug  3 15:47 grub
-rw-r--r--  1 root root 71303039 Aug  3 17:44 initrd.img-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root 71526307 Aug  3 17:44 initrd.img-6.10.3-1-siduction-amd64
drwx------  2 root root    16384 Dec  1  2023 lost+found
-rw-r--r--  1 root root   147744 Jan  7  2024 memtest86+x64.bin
-rw-r--r--  1 root root   148992 Jan  7  2024 memtest86+x64.efi
-rw-r--r--  1 root root  5791904 Jul 27 06:30 System.map-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root  5792744 Aug  3 09:04 System.map-6.10.3-1-siduction-amd64
-rw-r--r--  1 root root  8450560 Jul 27 06:30 vmlinuz-6.10.2-1-siduction-amd64
-rw-r--r--  1 root root  8454656 Aug  3 09:04 vmlinuz-6.10.3-1-siduction-amd64

initrd.img files decreased to 71+ MB, vs. 117 MB. So, 60% of the former size.

This is very helpful, @towo!  Good evening to you.
« Last Edit: 2024/08/03, 23:54:12 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.996
Re: Giant initrd.iso files -- why?
« Reply #3 on: 2024/08/03, 23:52:38 »
The biggest firmware is firmware-nvidia-graphics, but i would suggest, remove all firmwares, you don't need.
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline michaa7

  • User
  • Posts: 2.388
Re: Giant initrd.iso files -- why?
« Reply #4 on: 2024/08/04, 13:29:34 »
If I understand correctly the siduction/debian initrd is build with as many modules as are needed to fit for a wide range of use cases.

But as a user you may want to limit the initrd to what you really need. So, if you set /etc/initramfs-tools/initramfs.conf from
Code: [Select]
MODULES=most
to
Code: [Select]
#MODULES=most  geändert auf / changed to
MODULES=dep
and update your initrd.img by issuing
Code: [Select]
update-initramfs -u -k allit will built your initrd.img to what you need based on the neccessary modules for your system.

On my system the initrd.img shrunk from 114M to 22M.
« Last Edit: 2024/08/05, 02:22:44 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.397
    • Land of the Buckeye
Re: Giant initrd.iso files -- why?
« Reply #5 on: 2024/08/04, 13:56:50 »
...
 So, if you set /etc/initramfs-tools/initramfs.conf from
Code: [Select]
MODULES=most
to
Code: [Select]
#MODULES=most  geändert auf / changed to
MODULES=dep
and update your initrd.img by issuing
Code: [Select]
update-initramfs -u -k allit will built your initrd.img to what you need based on the necessary modules for your system.

....

This is an excellent tip!

Das ist ein ausgezeichneter Tipp!

Thank you.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline selynauynas

  • Newbie
  • Posts: 2
Re: Giant initrd.iso files -- why?
« Reply #6 on: 2024/08/06, 14:15:06 »
Hi,

I think you should try to the large size of the initrd.img files could be due to additional modules or drivers being included. You might want to regenerate the initrd.img files using `update-initramfs -u` to potentially reduce their size. If the issue persists reviewing the initramfs configuration or comparing it with your other systems might provide further insights.

Thanks