Did the kernel get a lot bigger recently?

a year ago by spacemanspiffy to c/archlinux

I have a 500MB boot partition, and I keep only the linux and linux-lts kernels.

Recently I see that the partition only has about 23Mb free.

Is there some recent change which increased the kernel's size significantly?

yardy_sardley 16 points a year ago

Check which linux-firmware-* packages you have installed. Arch recently split the linux firmware into a bunch of separate packages, and made the old package depend on pretty much all of them. So unless you already knew about this and uninstalled the packages you don't need, you likely have a bunch of unnecessary firmware stuffed into your fallback initramfs.

path: 0 19578550, hotness: undefined, score: 16, children: 1
spacemanspiffy 4 points a year ago

I thought I removed linux-firmware-nvidia but I guess not.

sudo pacman -R linux-firmware
sudo pacman -Rns linux-firmware-nvidia

This did the trick, thank you! Cut my fallback.img sizes almost in half!

path: 0 19578550 19620114, hotness: undefined, score: 4, children: 0
Dirk 14 points a year ago

That’s mine.

Stock kernel (only custom loader entries), using systemd-boot. No LTS kernel installed. I assume for LTS this will more or less double.

path: 0 19577243, hotness: undefined, score: 14, children: 0
unknowing8343 4 points a year ago

I had the same issue, breaking the update, and the solution was something along the lines of:

  1. Edit /etc/initramfs-tools/initramfs.conf
  2. Change MODULES=most to MODULES=dep
  3. Update initramfs:
    sudo update-initramfs -u
    

Although I think the cleanest way is to do it with an override config file in initramfs.conf.d, but do a bit of research on this.

I guess that by not including all modules, there is a risk the program forgets one of the modules you needed, but so far it works for me, and images are now a lot lighter.

path: 0 19585347, hotness: undefined, score: 4, children: 2
Starkon 3 points a year ago

hello, do you mean editing the MODULES in /etc/mkinitcpio.conf? since afaik and after searching in the arch wiki and in the arch packages, I couldn't find mention of update-initramfs or /etc/initramfs-tools. This wiki page edits /etc/mkinitcpio.conf.

path: 0 19585347 19586426, hotness: undefined, score: 3, children: 1
unknowing8343 2 points a year ago

Probably, I was going by memory and these filenames are tricky 😅

path: 0 19585347 19586426 19603908, hotness: undefined, score: 2, children: 0
crt0o 3 points a year ago

Also, you can try switching to xz compression, it will reduce the image sizes by a decent amount

path: 0 19587246, hotness: undefined, score: 3, children: 0
PseudoSpock 2 points a year ago

I'm glad you noticed.

path: 0 19664193, hotness: undefined, score: 2, children: 0
Strit 2 points a year ago

I think the initramfs has gotten a lot bigger over the last couple of years. More modules included, more functionality.

path: 0 19584245, hotness: undefined, score: 2, children: 0
Sxan -14 points a year ago

coughRustcough

path: 0 19580659, hotness: undefined, score: -14, children: 5
NichtElias 5 points a year ago

How would that affect file size of the kernel?

path: 0 19580659 19586287, hotness: undefined, score: 5, children: 4
MyNameIsRichard 1 point a year ago

Maybe it compiles to bigger binaries? I've never used Rust, so I have no idea if that's true.

path: 0 19580659 19586287 19587269, hotness: undefined, score: 1, children: 1
spacemanspiffy 5 points a year ago

I think there is probably truth to that, but I don't think its impacting the size of my initramfs in any significant way.

path: 0 19580659 19586287 19587269 19591743, hotness: undefined, score: 5, children: 0
Sxan -7 points a year ago

I don't know. Maybe it doesn't. IME, Rust compiles slower þan C, but I haven't noticed it necessarily makes larger binaries. Þe timing is suspicious, but may be unrelated.

path: 0 19580659 19586287 19592108, hotness: undefined, score: -7, children: 1
StripedMonkey 1 point a year ago

Arch has had rust code in it for months, the timing is only suspicious if you're making it up in your head.

path: 0 19580659 19586287 19592108 19666903, hotness: undefined, score: 1, children: 0
archlinux
archlinux

@lemmy.ml

login for more options
10003
427
82

The beloved lightweight distro

go to feed...