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

241,644

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.

Solution 5

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

Share:
241,644

Related videos on Youtube

Tyler Liu
Author by

Tyler Liu

Updated on September 18, 2022

Comments

  • Tyler Liu
    Tyler Liu over 1 year

    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?

  • Random832
    Random832 over 12 years
    I've been surprised relatively recently with a bios that couldn't access above 1023(?) cylinders, too.
  • ewwhite
    ewwhite over 12 years
    Which Live CD do you prefer in these cases?
  • Martian
    Martian over 12 years
    For me the distro of choice is SystemRescueCD and Finnix is another nice one.
  • SpacemanSpiff
    SpacemanSpiff over 12 years
    You sir, are awesome.
  • Alessandro Pezzato
    Alessandro Pezzato over 12 years
    @quanta how 'may be saves a few seconds of boot time'?
  • Mircea Vutcovici
    Mircea Vutcovici over 12 years
    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.
  • pahnin
    pahnin almost 11 years
    @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?
  • Thaeli
    Thaeli over 10 years
    @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)
  • hookenz
    hookenz about 10 years
    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.
  • Wernight
    Wernight about 9 years
    @josten I could install elementary OS on a single btrfs without further /boot partition or issue. Not sure why you'd say that.
  • Wernight
    Wernight about 9 years
    @josten Ok, some it's more "you might need". Thanks for clarifying.
  • Codism
    Codism almost 9 years
    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.
  • Tim
    Tim almost 9 years
    @ewwhite Where does this recommended size come from?
  • Christine
    Christine over 7 years
    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.
  • lahjaton_j
    lahjaton_j about 7 years
    Just today after getting /boot full, I would definitely recommend more than 200MB. Of course you can manually remove old kernels but from a sysadmin point of view that is a bad thing.
  • ewwhite
    ewwhite about 7 years
    This question/answer is from 2011.
  • Meroje
    Meroje over 6 years
    I frequently run in to Ubuntu Server machines with their tiny /boot partitions full, causing various issues. I can easily recover, but it does both me that apt will screw itself up by installing new kernels until /boot is full and then all of apt is in a broken state. Again, an easy, fix, but just feels.. Microsofty..
  • Meroje
    Meroje over 6 years
    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.
  • Unencoded
    Unencoded almost 6 years
    This is old but gold, what a superb idea!
  • hanshenrik
    hanshenrik over 4 years
    @JamesTSnell btw had an Ubuntu 16.04 installation run out of disk space on 200MB /boot after ~3 years of updates and new kernels - apparently Ubuntu 16.04 update system is not good at cleaning up old kernels. right now /boot is sitting at 240MB there.. and it was quite the hassle fixing it, having to move everything in boot elsewhere, then delete the boot partition, then resize the root partition, then re-create the boot partition then having to move everything back then making sure the new boot partition had the boot flag blah blah blah
  • Meroje
    Meroje over 4 years
    @hanshenrik - I've fixed that problem may times. You don't HAVE to resize your /boot, but doing so will let you change how long will pass before it comes up again. It's definitely quite annoying and I'm not sure if there's a proper solution to having it manage itself.
  • Gabriel Staples
    Gabriel Staples almost 4 years
    "a separate /boot partition has some advantages"...Note that a separate, non-encrypted /boot partition is also required when doing a LUKS-encrypted installation where all root (/) contents are on the LUKS-encrypted partition.
  • Gabriel Staples
    Gabriel Staples almost 4 years
    Tested 9 Aug. 2020: the Ubuntu 20.04 installer gave my boot partition exactly 732.00 MiB, so, if I was doing this manually today, I'd just give it 1 GiB and call it good. See my answer here: serverfault.com/a/1029458/357116.
  • Mike Macpherson
    Mike Macpherson about 2 years
    Indeed, I have a server with 250MB and forever having issues with it running out of space. Over the years the shipping initrd images have bloated to now be over 50MB (in 2022), so that 250MB partition, once you also factor in a MEMTest image and a vmlinuz, you have enough space for 3 kernels. When your distribution wants to change them every month, that's not much breathing space at all. Recommendation would be 500MB, or 1GB