Skip to content

Instantly share code, notes, and snippets.

@dukenmarga
Created September 8, 2023 00:19
Show Gist options
  • Save dukenmarga/ef371c4263fd31d2d268db073b2cb148 to your computer and use it in GitHub Desktop.
Save dukenmarga/ef371c4263fd31d2d268db073b2cb148 to your computer and use it in GitHub Desktop.
Reduce space in /boot when updating kernel openSuse 15

Operating System

Although this apply and proven to openSuse 15, but it is possible to apply this to other operating system.

Issue

When updating kernel to newer version, sometimes the process is halt since we are running out of /boot space. Typical error message is shown below.

installing package kernel-default-5.14.21-150500.55.19.1.x86_64 needs 2MB on the /boot filesystem

Solution

Move all old kernel images to temporary location.

# Check your /boot space disk
$ df -h

$ mkdir /tmp/boot
$ cd /boot
$ sudo mv vmlinu* initrd* /tmp/boot

# Check whether your free space in /boot has been increased
$ df -h

Now you can continue to update your kernel.

Mitigation

  • Increase the space of /boot for new installation (1 GB). But, still there is a possibility to have this issue in the future.
  • Don't separate the partition of /boot. Instead just make it as a part of root /. By removing /boot and rely only on /, it means our hard limit of /boot is determined by the space of /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment