0

The /boot partition keeps getting filled up during updates how am I able to reduce the size of / and then increase /boot by 5GB?

df -h

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         24G     0   24G   0% /dev
tmpfs            24G     0   24G   0% /dev/shm
tmpfs            24G 1009M   23G   5% /run
tmpfs            24G     0   24G   0% /sys/fs/cgroup
/dev/sda2       414G  115G  278G  30% /
/dev/sda1       227M  179M   33M  85% /boot
/dev/loop0      3.9G   31M  3.6G   1% /tmp
tmpfs           4.8G     0  4.8G   0% /run/user/0

fdisk -l

Disk /dev/sda: 483.2 GB, 483183820800 bytes, 943718400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009d882

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      489471      243712   83  Linux
/dev/sda2          489472   881219583   440365056   83  Linux
/dev/sda3       881219584   943718399    31249408   82  Linux swap / Solaris

Disk /dev/loop0: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

ls -lh /boot

total 169M
-rw-r--r--. 1 root root 150K Feb  3 16:10 config-3.10.0-1160.15.2.el7.x86_64
-rw-r--r--. 1 root root 150K Apr  8 21:55 config-3.10.0-1160.24.1.el7.x86_64
-rw-r--r--. 1 root root 150K Apr 28 23:53 config-3.10.0-1160.25.1.el7.x86_64
drwxr-xr-x. 3 root root 1.0K Nov 28  2020 efi
drwxr-xr-x. 2 root root 1.0K Nov 28  2020 grub
drwx------. 5 root root 1.0K May 23 20:08 grub2
-rw-------. 1 root root  57M Nov 28  2020 initramfs-0-rescue-f3cb1ccc379c452b9142cf76a8d73cba.img
-rw-------. 1 root root  18M Mar  4 01:05 initramfs-3.10.0-1160.15.2.el7.x86_64.img
-rw-------. 1 root root  20M Apr 19 00:03 initramfs-3.10.0-1160.24.1.el7.x86_64.img
-rw-------. 1 root root  11M May  7 10:25 initramfs-3.10.0-1160.24.1.el7.x86_64kdump.img
-rw-------. 1 root root  18M Jun 11 21:41 initramfs-3.10.0-1160.25.1.el7.x86_64.img
-rw-------. 1 root root  11M Jun 11 21:41 initramfs-3.10.0-1160.25.1.el7.x86_64kdump.img
drwx------. 2 root root  12K Nov 28  2020 lost+found
-rw-r--r--. 1 root root 314K Feb  3 16:10 symvers-3.10.0-1160.15.2.el7.x86_64.gz
-rw-r--r--. 1 root root 314K Apr  8 21:55 symvers-3.10.0-1160.24.1.el7.x86_64.gz
-rw-r--r--. 1 root root 314K Apr 28 23:53 symvers-3.10.0-1160.25.1.el7.x86_64.gz
-rw-------. 1 root root 3.5M Feb  3 16:10 System.map-3.10.0-1160.15.2.el7.x86_64
-rw-------. 1 root root 3.5M Apr  8 21:55 System.map-3.10.0-1160.24.1.el7.x86_64
-rw-------. 1 root root 3.5M Apr 28 23:53 System.map-3.10.0-1160.25.1.el7.x86_64
-rwxr-xr-x. 1 root root 6.5M Nov 28  2020 vmlinuz-0-rescue-f3cb1ccc379c452b9142cf76a8d73cba
-rwxr-xr-x. 1 root root 6.5M Feb  3 16:10 vmlinuz-3.10.0-1160.15.2.el7.x86_64
-rwxr-xr-x. 1 root root 6.5M Apr  8 21:55 vmlinuz-3.10.0-1160.24.1.el7.x86_64
-rwxr-xr-x. 1 root root 6.5M Apr 28 23:53 vmlinuz-3.10.0-1160.25.1.el7.x86_64
  • `/boot` should not grow that fast. In my 20+ year experience it had never need more than 200Mb of space. Probably, you forget to remove and clean old kernel and initramfs? Show `ls -lh /boot`. – Nikita Kipriyanov Jun 26 '21 at 07:16
  • Perhaps I have not done that for sure I will check but the idea of doing that manually every few months is not ideal verses just giving it more space unless that causes issues. – Harmonytalk Jun 26 '21 at 07:21
  • 1GB is sufficient for the foreseeable future, but 250M was too small when the system was first installed. How did this happen? XFS filesystems cannot be shrunk. That means you are going to have to reinstall the system to fix this problem, and you need to be sure that it does not happen again. See also [further discussion of the size of /boot](https://serverfault.com/a/894893/126632). – Michael Hampton Jun 26 '21 at 07:46

0 Answers0