scripts icon indicating copy to clipboard operation
scripts copied to clipboard

Discussion about the files in the /boot and initrd

Open ader1990 opened this issue 11 months ago • 5 comments

This PR was opened to have a place where to discuss line by line on the files that we can or cannot remove from the /boot partition and initrd. Or maybe move them into the /usr.

This is a follow up on @pothos suggestion to cut things we do not need: https://github.com/flatcar/Flatcar/issues/1381#issuecomment-1969285023

How the data was compiled:

# Content of the /boot partition for AMD64 built from
# flatcar/scripts commit a842366ed9a2c2b1204a87f8563ef09e2950e5e3
tree -sifF  /boot | sort -k2 -rn
# Main data
$: df | grep '/boot'
/dev/vda1          129039      64135      64905  50% /boot

$: file flatcar_production_image.vmlinuz
flatcar_production_image.vmlinuz: Linux kernel x86 boot executable bzImage, version 6.6.17-flatcar ([email protected]) #1 SMP PREEMPT_DYNAMIC Mon Mar  4 18:50:2A

$: du flatcar_production_image.vmlinuz
56124   flatcar_production_image.vmlinuz

Added another commit with the initrd contents.

How the data was compiled:

bash extract-initramfs-from-vmlinuz.sh flatcar_production_image.vmlinuz vmlinuz
cd vmlinuz/
tree -sifF . | sort -k2 -rn

ader1990 avatar Mar 06 '24 09:03 ader1990

Thanks, we can also discuss the kernel config: https://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_kernel_config.txt

pothos avatar Mar 06 '24 09:03 pothos

My impression is that we should start with the big stuff: find a way to load network firmware and kernel modules, and CPU microcode update from /sysusr/usr/.

pothos avatar Mar 06 '24 10:03 pothos

Thanks, we can also discuss the kernel config: https://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_kernel_config.txt

Added this file for discussion.

ader1990 avatar Mar 06 '24 10:03 ader1990

I will keep in this updated comment a log of the AMD64 /boot partition size history, to have a clear picture on the size increase over time:

# 2024-03-12, Flatcar HEAD https://github.com/flatcar/scripts/commit/89cca15171f0b2424a4c132bb0c2138159b7eb6e
/dev/sda1         129039       59962      69078  47% /boot
# 2024-03-18, Flatcar ALPHA 3913.0.0 https://alpha.release.flatcar-linux.net/amd64-usr/3913.0.0/
/dev/sda1         129039       61753     67287  48% /boot
# 2024-03-25, Flatcar HEAD https://github.com/flatcar/scripts/commit/6ebffa7a4fde3a1b2c8d362b065b35b4ce3a43e4
/dev/sda1         129039       62503     66536  49% /boot

ader1990 avatar Mar 25 '24 11:03 ader1990