45

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?

10 Answers 10

40

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

  • 3
    200 MB is the minimum on most modern Linux but I'd increase it to at least 300 MB to avoid the hassle of re-sizing it. – Wernight May 1 '15 at 11:48
  • @josten I could install elementary OS on a single btrfs without further /boot partition or issue. Not sure why you'd say that. – Wernight May 1 '15 at 11:49
  • @josten Ok, some it's more "you might need". Thanks for clarifying. – Wernight May 4 '15 at 9:30
  • I wish I see this answer before my installation - installed Debian 8 with 100MB boot and realized almost half of the boot partition is gone. – Codism Jun 3 '15 at 19:40
  • @ewwhite Where does this recommended size come from? – Tim Jun 4 '15 at 19:00
35

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.

  • Which Live CD do you prefer in these cases? – ewwhite Nov 25 '11 at 12:09
  • 1
    For me the distro of choice is SystemRescueCD and Finnix is another nice one. – Martian Nov 25 '11 at 13:10
  • 9
    You sir, are awesome. – SpacemanSpiff Nov 25 '11 at 13:23
  • 1
    @zoredache I'm installing arch linux on my external hard disk for work purpose, I would like to add live image as you said you did, for rescue, can you please point me any links how to do that? – pahnin Jul 5 '13 at 6:39
  • 3
    @pahnin Here are the instructions I found for doing that: help.ubuntu.com/community/Grub2/ISOBoot (this is probably worth being a question of its own) – Thaeli Feb 19 '14 at 15:22
21

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
  • 2
    I've been surprised relatively recently with a bios that couldn't access above 1023(?) cylinders, too. – Random832 Nov 25 '11 at 7:54
  • 2
    @quanta how 'may be saves a few seconds of boot time'? – Alessandro Pezzato Nov 25 '11 at 13:28
  • 2
    Because usually /boot is at the beginning of the disk, which is usually on the outer sectors has less chances to get fragmented and the path is smaller (less directory reads), it is usually a primary partition (no need to read the logical partition chain). But I doubt that you gain more than 1s. – Mircea Vutcovici Nov 25 '11 at 15:49
7

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

5

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 :)

  • Ubuntu doesn't always remove old kernels after an upgrade. You need to do that yourself. Otherwise it may keep several of them around for a long time. – Matt Mar 24 '14 at 2:38
  • I used the default size on my laptop, which is less than 100Mb. The consequence is that whenever I update, I need to remove the before-previous update, so I always have two versions on my computer. On my new laptop, I'll make /boot 1Gb. On my desktop it's 500Mb, wich seems ok. – Christine Dec 16 '16 at 21:13
4

Modern systems are generally installed with a much larger /boot partition than in the past. The number has just been growing over time.

Consider:

RHEL 5 created a 101 MiB /boot partition.

RHEL 5 Partitioning

RHEL 6 created a 500 MiB /boot partition.

RHEL 6 Paritioning

RHEL 7 also created a 500 MiB /boot partition, but this was changed to 1024 MiB in 7.3, because as the release notes state:

In previous releases of Red Hat Enterprise Linux 7, the default size of the /boot partition was set to 500 MB. This could lead to problems on systems with multiple kernels and additional packages such as kernel-debuginfo installed. The /boot partition could become full or almost full in such scenario, which then prevented the system from upgrading and required manual cleanup to free additional space.

In Red Hat Enterprise Linux 7.3, the default size of the /boot partition is increased to 1 GB, and these problems no longer occur on newly installed systems. Note that installations made with previous versions will not have their /boot partitions resized, and may still require manual cleanup in order to upgrade. (BZ#1369837)

RHEL 7 Partitioning

My current EL7 systems have roughly 200 MiB used in /boot, but I usually don't install kernel-debug packages.

As the Linux kernel continues to grow over time, mostly due to adding hardware device drivers, this recommendation is likely to continue to grow as well.

And again, as noted by others, a /boot partition isn't strictly required anymore for most installations. VMs generally do not need it, for instance, and UEFI booting systems also don't need it (though they have an EFI System partition which must exist and be large enough to hold various UEFI files). A /boot partition is required for some very old legacy systems and for using LUKS full-disk encryption.

3

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).

3
+100

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.

1

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.

0

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.

  • 5
    Current distributions want 200MB+. – ewwhite Jun 29 '12 at 2:20
  • 1
    Update for 2017: May as well make your /boot more like 500MB. 200MB will work, but storage is cheap and having some breathing space will be nice. Use your judgement. – James T Snell Oct 2 '17 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.