You are not logged in.

#1 2024-03-01 09:46:44

mettall
Member
Registered: 2023-04-15
Posts: 8

[SOLVED] The /boot partition is almost full - 96% used

Hello folks,
I have installed my Archlinux back in 2015 following the installation guide at that time. It's a laptop with UEFI and dual booting with another proprietary OS.
At that time it was suggested to have a /boot partition with size about 250 MB. My boot partition is 256.9MB. But since then the content of the /boot partition has grown a lot.

After one of the updates about a month ago, I've started to receive a message in Gnome that my /boot partition is almost full on each start of the laptop.

So the file system of the boot partition is vfat. The boot partition is the first partition in the disk, after that i have the root partition - / which is ext4. After that there are another partitions...

Here is the size of the contents in the boot partition:

$du -ahd 1
13M	./vmlinuz-linux
69M	./initramfs-linux.img
124M	./initramfs-linux-fallback.img
13M	./grub
28M	./EFI
2.0K	./System Volume Information
246M	.

As we can see, initramfs-linux-fallback.img takes about the half of the size of the partition.
In the EFI directory there are some files related to the proprietary OS, so moving the /boot to the root / partition is not an option I guess.

My questions are:

- If I ignore the issue and carry on, What are the chances that I end up in unbootable system in the future?
- Is it possible to extend the boot partition? The last time that I've tried to mess up with the GPT table i just wiped out the whole disk...
- If there is such method, are the partitions going to keep the same UUIDs ?
- Is there a way to minimize the size of the initramfs-linux-fallback.img file? Or just to entirely disable the generation of the fallback image file ?
- Is it possible to transfer only the initramfs files to the  root / partition? Something like a symlink that does not get overwritten on each update of the system?

Last edited by mettall (2024-03-01 22:34:27)

Offline

#2 2024-03-01 14:21:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,892

Re: [SOLVED] The /boot partition is almost full - 96% used

The biggest increase last month will have been the inclusion of nvidia GSP firmware in the fallback image if using the kms hook. The easiest to avoid that is drop the kms hook and instead explicitly list the graphics modules you actually need in the MODULES= line if you aren't using nouveau: https://wiki.archlinux.org/title/Kernel … _KMS_start

As for your questions

  • The kernel is only growing with time and increased HW support so chances are you'll only eek out a few more years at best, unbootable system is stil somewhat far off, and if you don't have a direct need for it and aren't often changing bootup-critical HW, you could disable the generation of the fallback image (which would mandate you'd use a live disk to regenerate the image should you ever been in the mentioned situation)

  • Generally yes, a bit more involved if you have to shrink and move any following partitions/filesystems (and you're advised to have backups regardless, you don't want a power failure in the middle of such an operation), but from a pure "possibility" stand point, absolutely possible. I strongly suggest you use a GParted Live Disk for that though, since chance for human error when handling sector sizes yourself are very high

  • If you just extend/move existing partitions, those will remain the same yes

  • As mentioned above, yes: just remove the fallback from the corresponding /etc/mkinitcpio.d/*.preset file: See the last paragraph in https://wiki.archlinux.org/title/Mkinit … odule_XXXX

  • That would also be possible, assuming your disk is not encrypted GRUB can read your initramfs directly from the root partition. To do that you'd mount your current "/boot" to e.g. /efi (don't forget to update fstab) and then copy over the initramfs and vmlinuz files to the now empty /boot directory on your root partition, then reinstall grub sio it knows to pick up kernels from the / partition and regenerate it's config, see e.g. https://bbs.archlinux.org/viewtopic.php … 1#p2152421

Last edited by V1del (2024-03-01 15:23:07)

Offline

#3 2024-03-01 22:34:10

mettall
Member
Registered: 2023-04-15
Posts: 8

Re: [SOLVED] The /boot partition is almost full - 96% used

Man, I was hoping for at least one solution but you provided a whole plethora of solutions.

The solution that you provided actually worked out. I removed the 'kms' from the hooks and the size of the images has dropped significantly. Here is the size of the contents in the /boot partition:

13M	./vmlinuz-linux
29M	./initramfs-linux.img
57M	./initramfs-linux-fallback.img
13M	./grub
28M	./EFI
2.0K	./System Volume Information
139M	.

I haven't included the nvidia things to the modules part in /etc/mkinitcpio.conf because i don't really use the nvidia card. I have bumblebee with bbswitch that turns off the nvidia card so less issues there. The intel's GPU is enough.

Also i would like to thank you for the answers of my questions. If I end up with the same issue in the next few years I'll definitely know where to start looking for solutions.

Offline

#4 2024-03-22 08:53:55

Tabs
Member
Registered: 2015-02-01
Posts: 11

Re: [SOLVED] The /boot partition is almost full - 96% used

Thanks @V1del for this solution. On my side removing the kms hook and adding nvidia to the modules did not change the size of the initramfs. This is probably not surprising as, from what I understand, these are just two different ways to load the same modules from the iniramfs.

My solution was to add the `-S kms` flag to the `fallback_options` of the `/etc/mkinitcpio.d/linux.preset` file, which gave something like:

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
#Skiping kms for fallback cause it make a too big image for unneeded nvidia modules
fallback_options="-S autodetect,kms"

This way the size of the fallback image is more reasonable while the default image still contains nvidia modules.

Offline

Board footer

Powered by FluxBB