Ask Your Question
1

Resizing /boot: At least 8MB more space needed on the /boot filesystem.

asked 2018-08-31 18:33:10 -0500

ladlelord gravatar image

I think I need to expand my /boot partition. What is the safest way of doing so given an LVM on LUKS partition scheme? The partition scheme is listed at the bottom of this post.

After trying to upgrade my system with sudo dnf upgrade, I get the following error message:

$ sudo dnf upgrade
At least 8MB more space needed on the /boot filesystem.

The output of df -h /boot is

$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1  239M  196M   27M  89% /boot

I have tried deleting old kernels as described in the next link, but the dnf remove command dnf remove $( dnf repoquery --installonly --latest-limit -1 -q )doesn't work: https://ask.fedoraproject.org/en/ques...

NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1                                       259:0    0 238.5G  0 disk  
├─nvme0n1p1                                   259:1    0   250M  0 part  /boot
├─nvme0n1p2                                   259:2    0   144M  0 part  /boot/efi
└─nvme0n1p3                                   259:3    0 238.1G  0 part  
  └─luks-aaaaaaaaaaaaaaaaaaaaaaaaa 253:0    0 238.1G  0 crypt 
    ├─lvg-root                                253:1    0    13G  0 lvm   /
    ├─lvg-swap                                253:2    0    10G  0 lvm   [SWAP]
    └─lvg-home                                253:3    0 215.1G  0 lvm   /home
edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
3

answered 2018-09-01 04:40:18 -0500

I think it is easier to clean up the /boot partition than resizing things. The size should be OK. I am having 3 kernels which make use of ~100MB in /boot including ramdisks. Concerning your command to find old kernels, that should be: dnf repoquery --installonly --latest-limit=-1 -q. First double check the output, then remove stuff.

edit flag offensive delete link more
2

answered 2018-09-01 18:21:59 -0500

abadrinath gravatar image

Apart from cleaning up the /boot partition by removing kernels, you can still resize the LVM partitions by booting up a Live CD. You can use anything you want to resize the partition, with GUIs like gparted or CLI tools using lvresize.

This should be a useful guide: https://unix.stackexchange.com/questi.... It'll work for /boot as well.

edit flag offensive delete link more
1

answered 2018-09-02 02:55:24 -0500

genodeftest gravatar image

Another solution is shrinking the size of your initramfs. If you want to remove kernel modules from initramfs, have a look at man dracut.conf. Basically you'll need a file in /etc/dracut.conf.d/ with a line like this: omit_drivers+=" usb-storage uas ums-* snd soundcore snd-* ". As dracut does not put all kernel modules into your initramfs, you might want to use lsinitrd on a file in /boot/initramfs-4.[…].img before and have a look at all the kernel modules in your initramfs. lsinitrd /boot/initramfs-4.[…].img | less should be enough. Then search for files below usr/lib/modules/ which are the kernel modules present in your initramfs. Please note that removing essential modules might break your boot.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-08-31 18:33:10 -0500

Seen: 565 times

Last updated: Sep 02 '18