What is the recommended size for a Linux /boot partition?
What is the recommended size for a Linux /boot
partition?
And is it safe to not have a /boot
partition?
I see some servers don't have a /boot
partition while some servers have a 128 MB /boot
partition. I am a little confused. Is /boot
partition necessary? If it is, how large should it be?
Solution 1:
These days, 100 Megabytes or 200 Megabytes is the norm.
You do not need to have a /boot partition. However, it's good to have for flexibility reasons (LVM, encryption, BIOS limitations).
Edit:
The recommended size has been increased to 300MB-500MB.
Also see: https://superuser.com/questions/66015/installing-ubuntu-do-i-really-need-a-boot-parition
Solution 2:
I tend to create a 1 GB /boot
. I leave a live CD image which has various repair tools in my /boot
. I mostly do this for systems that at the remote sites I support.
With the right configuration, and enough memory, GRUB 2 can boot the image without extracting the contents. A couple of times I have talked remote staff into rebooting the system to the live CD image and starting networking/ssh on a system that was having issues so I could connect and repair things.
This certainly isn't required, or even common.
Solution 3:
What is the recommended size for a Linux
/boot
partition?
The /boot
partition contains the GRUB configuration, the kernel with their System.map, ... I think ~ 100 MB is enough.
And is it safe to not have a
/boot
partition?
Yes. But a separate /boot
partition has some advantages:
- As a rescue partition
- rootfs is on a LVM, RAID, is encrypted, or unsupported by GRUB
- Maybe saves a few seconds of the boot time
Solution 4:
As we have seen quite an increase in linux kernel storage requirements and ever increasing initrds, I nowadays (February 2018) tend to allocate 1 GB of storage for /boot
.
As /boot
is usually the only thing that is not on LVM, it is the only partition you cannot resize easily. Thus "wasting" a few hundred megabytes usually doesn't hurt as bad as a /boot
filesystem that turns out to be too small in maybe 5 or 10 years.