0

I installed Ubuntu 16 on a server with 500MB /boot partition. After three months now, my zabbix alerted the /boot is used more than 80%.

I'm aftaid that /boot is used 100% and makes the server stop. So I'd like to ask you what I can do now?

I red the Ubuntu official doc why /boot is sometimes needed. My server is not old but the vender haven't released the compatibility with Ubuntu officially yet. I'd like to try remove /boot partition but I'd like to expand the volume first if I/Ubuntu can.

Here is my server disk usages.

$ df -h
Filesystem                Size  Used Avail Use% Mounted on
udev                      7.8G     0  7.8G   0% /dev
tmpfs                     1.6G  9.6M  1.6G   1% /run
/dev/sda5                 380G   29G  332G   8% /
tmpfs                     7.9G  948K  7.9G   1% /dev/shm
tmpfs                     5.0M     0  5.0M   0% /run/lock
tmpfs                     7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/sda1                 453M  341M   85M  81% /boot

Or are there unneccessory files in /boot? I don't know how to decide it.

$ ll /boot
Totla 332M
drwxr-xr-x  4 root root 3.0K 2016-09-13 11:27:02 .
drwxr-xr-x 26 root root 4.0K 2016-09-13 13:20:01 ..
-rw-------  1 root root 3.7M 2016-04-19 07:21:29 System.map-4.4.0-21-generic
-rw-------  1 root root 3.7M 2016-05-13 08:55:58 System.map-4.4.0-22-generic
-rw-------  1 root root 3.7M 2016-06-09 06:39:50 System.map-4.4.0-24-generic
-rw-------  1 root root 3.7M 2016-06-24 21:03:30 System.map-4.4.0-28-generic
-rw-------  1 root root 3.7M 2016-07-13 10:59:43 System.map-4.4.0-31-generic
-rw-------  1 root root 3.7M 2016-07-28 06:28:16 System.map-4.4.0-34-generic
-rw-------  1 root root 3.7M 2016-08-12 04:58:49 System.map-4.4.0-36-generic
-rw-r--r--  1 root root 1.2M 2016-04-19 07:21:29 abi-4.4.0-21-generic
-rw-r--r--  1 root root 1.2M 2016-05-13 08:55:57 abi-4.4.0-22-generic
-rw-r--r--  1 root root 1.2M 2016-06-09 06:39:50 abi-4.4.0-24-generic
-rw-r--r--  1 root root 1.2M 2016-06-24 21:03:30 abi-4.4.0-28-generic
-rw-r--r--  1 root root 1.2M 2016-07-13 10:59:43 abi-4.4.0-31-generic
-rw-r--r--  1 root root 1.2M 2016-07-28 06:28:16 abi-4.4.0-34-generic
-rw-r--r--  1 root root 1.2M 2016-08-12 04:58:49 abi-4.4.0-36-generic
-rw-r--r--  1 root root 185K 2016-04-19 07:21:29 config-4.4.0-21-generic
-rw-r--r--  1 root root 186K 2016-05-13 08:55:57 config-4.4.0-22-generic
-rw-r--r--  1 root root 186K 2016-06-09 06:39:50 config-4.4.0-24-generic
-rw-r--r--  1 root root 186K 2016-06-24 21:03:30 config-4.4.0-28-generic
-rw-r--r--  1 root root 186K 2016-07-13 10:59:43 config-4.4.0-31-generic
-rw-r--r--  1 root root 186K 2016-07-28 06:28:16 config-4.4.0-34-generic
-rw-r--r--  1 root root 186K 2016-08-12 04:58:49 config-4.4.0-36-generic
drwxr-xr-x  5 root root 1.0K 2016-09-13 11:22:51 grub
-rw-r--r--  1 root root  35M 2016-05-14 00:35:50 initrd.img-4.4.0-21-generic
-rw-r--r--  1 root root  35M 2016-05-31 17:08:59 initrd.img-4.4.0-22-generic
-rw-r--r--  1 root root  35M 2016-06-10 15:11:17 initrd.img-4.4.0-24-generic
-rw-r--r--  1 root root  11M 2016-09-13 11:27:05 initrd.img-4.4.0-24-generic.new
-rw-r--r--  1 root root  35M 2016-06-28 07:03:14 initrd.img-4.4.0-28-generic
-rw-r--r--  1 root root  35M 2016-07-15 11:28:54 initrd.img-4.4.0-31-generic
-rw-r--r--  1 root root  35M 2016-08-10 03:18:30 initrd.img-4.4.0-34-generic
-rw-r--r--  1 root root  35M 2016-09-13 11:23:01 initrd.img-4.4.0-36-generic
drwx------  2 root root  12K 2016-05-14 00:03:27 lost+found
-rw-------  1 root root 6.7M 2016-04-19 07:21:29 vmlinuz-4.4.0-21-generic
-rw-------  1 root root 6.7M 2016-05-13 08:55:57 vmlinuz-4.4.0-22-generic
-rw-------  1 root root 6.7M 2016-06-09 06:39:50 vmlinuz-4.4.0-24-generic
-rw-------  1 root root 6.8M 2016-06-24 21:03:30 vmlinuz-4.4.0-28-generic
-rw-------  1 root root 6.8M 2016-07-13 10:59:43 vmlinuz-4.4.0-31-generic
-rw-------  1 root root 6.8M 2016-07-28 06:28:16 vmlinuz-4.4.0-34-generic
-rw-------  1 root root 6.8M 2016-08-12 04:58:49 vmlinuz-4.4.0-36-generic

Does anybody give me an advise?

kujiy
  • 111

3 Answers3

1

I referred here and it reduced over 100MB on /boot. Thanks.

root@sv:~# apt-get autoremove

root@sv:~# df -h
Filesystem                Size  Used Avail Use% Mounted on
/dev/sda1                 453M  215M  211M  51% /boot
kujiy
  • 111
1

It looks to be more trouble than it's worth to include the 453M of /boot into /. You could just unmount /boot, and remount it temporarily under /mnt, say make a directory /mnt/boot. Then, just copy everything under /mnt/boot into /boot (which is now a part of your 380G root). Comment out the line for /boot in /etc/fstab, and see it that solves your problem. I doubt you'd have a problem with unmounting /boot from a running system, but if you do, you can always boot from a live-media and do the copy and edit that way.

ubfan1
  • 17,838
0

Since apt-get autoremove doesn't reduce the usage well, I found another solution.

purge-old-kernels --keep 1 -y

I've used this command over a year and it's been working well so far.

kujiy
  • 111