如何减少 / 的大小并增加 /boot (CentOS7)

如何减少 / 的大小并增加 /boot (CentOS7)

更新期间分区/boot不断被填满,我怎样才能减少其大小/然后再增加/boot5GB?

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 /启动

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

相关内容