Boot Partition Size

hci

Verified User
Joined
Jun 15, 2004
Messages
372
I messed up and installed with a 200MB boot partition on Centos 7. Is that going to mess anything up? Backing up and restoring this box took many hours too.
 
Hello,

Just make sure to clean it from time to time from old kernels and you should not face any issue with it.

Or do not mount it at all and use /boot from root partition.
 
What if I update yum.conf with installonly_limit=2 following directions here?

https://www.question-defense.com/2014/05/13/centos-remove-old-kernels

With 2 kernels I should never exceed 200M right? I have honestly never had to roll back a kernel. I have had updates break things but it was never the kernel.

Just not looking forward to pain of reinstall.

Why are the kernel-tools, tools-libs and headers installed? They seem to take up space on /boot

# rpm -qa |grep kernel
kernel-tools-3.10.0-327.36.3.el7.x86_64
kernel-tools-libs-3.10.0-327.36.3.el7.x86_64
kernel-headers-3.10.0-327.36.3.el7.x86_64
kernel-3.10.0-327.el7.x86_64
kernel-3.10.0-327.36.3.el7.x86_64
 
Last edited:
Hey, you'd better know. I have no information about your server: how do you install kernel, how much space does it require, how often you reboot your server, do you always reboot your server after kernel upgrade.

I really don't know whether or not package-cleanup will detect OS versions currently running, as it might happen so that you're booted into 2-3+ kernel behind... Actually never used it before, and already tested 3 servers to check the case (they are in the latest kernel).

I have:

Code:
/dev/vda1       194M   77M  108M  42% /boot

on my own server, and I hardly can remember any issue with placing default kernels for CentOS 6 , and I install them from rpm packages.

If you're really afraid to run into an issue with disk space:

1. create /boot~new
2. sync /boot to /boot~new
3. unmount /boot
4. rename /boot~new to /boot
5. update /etc/fstab no to mount /boot
6. reboot the server.

That's it.
 
As for package-cleanup here is what I've found out (nice to learn nee things):

Code:
[root@server ~]# rpm -qa | grep kern | sort
[B]kernel-3.10.0-327.28.2.el7.x86_64[/B]
kernel-3.10.0-327.28.3.el7.x86_64
kernel-3.10.0-327.36.1.el7.x86_64
kernel-3.10.0-327.36.2.el7.x86_64
kernel-3.10.0-327.36.3.el7.x86_64
kernel-headers-3.10.0-327.36.3.el7.x86_64
kernel-tools-3.10.0-327.36.3.el7.x86_64
kernel-tools-libs-3.10.0-327.36.3.el7.x86_64

[root@server ~]# uname -a
Linux server.example.net 3.10.0-[B]327.28.2.el7.x86_64[/B] #1 SMP Wed Aug 3 11:11:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@server ~]# package-cleanup --oldkernels --count[B]=5[/B]
Loaded plugins: etckeeper, fastestmirror
No old kernels to remove

[root@server ~]# package-cleanup --oldkernels --count[B]=4[/B]
Loaded plugins: etckeeper, fastestmirror
[B]Not removing kernel 3.10.0-327.28.2.el7 because it is the running kernel[/B]
No old kernels to remove

[root@server ~]# package-cleanup --oldkernels --count[B]=3[/B]
Loaded plugins: etckeeper, fastestmirror
[B]Not removing kernel 3.10.0-327.28.2.el7 because it is the running kernel[/B]
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-327.28.3.el7 will be erased
--> Finished Dependency Resolution

So it should be safe to use the tool.
 
And by the way all those kernels take 260M in /boot. Please note, no kernel-debug installed.
 
Do I really need more then two kernels? The running kernel and the latest kernel I think would do.

These are all installed in KVM on Proxmox. Wandering how hard it would be to expand boot but again I am afraid I may break something in process.

Thank you for your help by the way.
 
>>>no kernel-debug installed

What is kernel debugging? Heard something about I should uninstall dracut?
 
Just updated CentOS Linux release 7.3.1611 (kernel 3.10.0-514.2.2.el7.x86_64) with XFS.

Before:

Code:
[root@server ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda2        30G  1.7G   29G   6% /
devtmpfs        235M     0  235M   0% /dev
tmpfs           245M     0  245M   0% /dev/shm
tmpfs           245M   13M  233M   6% /run
tmpfs           245M     0  245M   0% /sys/fs/cgroup
/dev/vda1       240M  194M   30M  87% /boot
tmpfs            49M     0   49M   0% /run/user/1000
[root@server ~]#

After:

Code:
[root@server ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda2        30G  1.9G   28G   7% /
devtmpfs        235M     0  235M   0% /dev
tmpfs           245M     0  245M   0% /dev/shm
tmpfs           245M  4.3M  241M   2% /run
tmpfs           245M     0  245M   0% /sys/fs/cgroup
tmpfs            49M     0   49M   0% /run/user/1000
[root@server ~]#

Check:

Code:
[root@server ~]# cat /etc/fstab


#
# /etc/fstab
# Created by anaconda on Thu Mar 31 20:21:36 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=122b8647-9c02-4ea4-85ff-c4c5a95997e3 /                       xfs     defaults        0 0
#UUID=18e3548b-f0dc-4fa2-bc0a-4bcb8af2529f /boot                   ext4    defaults        1 2
[root@server ~]#

Uptime:

Code:
[root@server ~]# uptime
 11:51:37 up 5 min,  1 user,  load average: 0.02, 0.33, 0.22
[root@server ~]#

Reboots:

Code:
[root@server ~]# last reboot -3
reboot   system boot  3.10.0-514.2.2.e Wed Dec 14 11:45 - 11:52  (00:06)
reboot   system boot  3.10.0-514.2.2.e Tue Dec 13 01:52 - 11:44 (1+09:51)
reboot   system boot  3.10.0-327.36.3. Sun Nov 27 00:37 - 01:51 (16+01:14)


wtmp begins Fri Apr  1 02:28:37 2016
[root@server ~]#
 
Back
Top