What is the recommended size for a Linux /boot partition?

by Tyler Long   Last Updated January 31, 2018 03:00 AM

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?



Answers 8


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, and BIOS limitations).

Update:

The recommended size has been increased to 300 MB-500 MB.

Also see: https://superuser.com/questions/66015/installing-ubuntu-do-i-really-need-a-boot-parition

ewwhite
ewwhite
November 25, 2011 02:12 AM

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
quanta
quanta
November 25, 2011 02:33 AM

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.

Zoredache
Zoredache
November 25, 2011 11:48 AM

It also differs distribution from distribution. For example for Fedora minimum is 250 MB[1] and 500 MB is default and if you plan to (pre)upgrade in the future 500 MB is required[2]. If space is not a problem I would go for 1 GB to prevent shuffling partitions later as I had to do when upgrading recently.

[1] http://docs.fedoraproject.org/en-US/Fedora/16/html/Installation_Guide/s2-diskpartrecommend-x86.html
[2] http://fedoraproject.org/wiki/How_to_use_PreUpgrade#Not_enough_space_in_.2Fboot

Martian
Martian
November 25, 2011 13:07 PM

It's mostly a function of how many kernels you have installed, and the size of their initrds.

For a 3.0 series kernel, initrd runs about 13 MB. For early 2.6 kernels, this was 3.4 MB. So, if you plan on keeping more than a few kernels around, you'll need at least a couple hundred MB.

How much and whether or not this applies to you depends on your use case. If you multi-boot, test kernels, and/or upgrade frequently, you could run out of space on a 100 MB /boot partition quickly. If you don't do any of these things, it's probably going to be sufficient.

There are very few reasons to skimp on storage (it's cheap, BIOS, mount, and bootloader restrictions on blocks are mostly a thing of the past), and I'm seeing a marked growth in kernel resources with time, so the safe bet would be ~250 MB - 1 GB for now. I still generally prefer a separate /boot partition for control and isolation, though this has almost entirely become a matter of taste (RAID devices would be one obvious exception, LVM and encryption as well as noted by others).

Dr. Edward Morbius
Dr. Edward Morbius
June 29, 2012 00:11 AM

I always use 100MB as a rule when I'm building systems. I suppose if you're going to be testing out tons of different kernels (or building your own custom kernels) you may want a larger one, but 100MB is enough for most people. Also, as mentioned, having a separate boot partition is a good idea for a bunch of reasons.

Matthew
Matthew
June 29, 2012 02:16 AM

I just installed Ubuntu 13.10 (Saucy Salamander) with a 105 MB /boot. It installed fine, but after it rebooted I did the updater, and it said that there was not enough space.

It wanted around another 196 MB for the upgrade; it must have been a kernel upgrade or something. So had to reinstall with a bigger /boot. I went for 500 MB, and that seemed to work. It is a good thing it doesn't take long to do a new install :)

Newbie
Newbie
March 24, 2014 01:52 AM

It depends also on how many kernels you want to have available. A normal kernel, a "xen" kernel, a "desktop" kernel and in more than one version really sums up well. I wouldn't go for smaller than 500MB. Resizing a front-positioned partition afterwards takes a lot of time.

If you are creating a virtual machine, a separate (virtual) disk may come in handy for several partitions (/home, /boot, /) if you are not familiar with LVM.

J.M. Stoorvogel
J.M. Stoorvogel
February 04, 2017 20:13 PM

Related Questions


Recommended size of the system partition?

Updated November 26, 2017 15:00 PM


linux + lsblk command

Updated July 04, 2017 20:00 PM