A lot of people recommend a separate ext2 boot partition with around 100MB space for Linux installations. What is the significance of this separate boot partition.
2 Answers
Ok i think this is close to a myth specially that nowdays distros tend to update the kernels a lot during the stable cycle and not remove the old ones. Which means if you have 2 kernels (or even one) it will fill out 100MB including the grub installation and initrd. The real advice to do a /boot partition was because the bootloaders don't work well with some filesystems like xfs or btrfs.
Nowdays on modern Linux distros ext2, ext3 and ext4 are equally supported so it means you can use one of them. The use of the /boot partition makes sense if you want to use other filesystems besides ext* or you want to preserve your Kernel images between several root partitions (/). If you decide to use /boot partition i strongly advice to fill it with around 1GB.
-
2How comes your kernels are that huge? My kernels are all around 4.5MiB + 11MiB initramfs. That means in 100MiB you can store six kernels including initramfs. I don't see any reason to keep more than one or at most two old kernels on the disk. If you really need to switch to a very old kernel, restore it from the backup.– MarcoSep 6, 2012 at 8:28
-
It depends of what you put on initrd and on the bzImage. With so many disk space on hard drives nowdays i recommend more than 100MB. ls -lah /boot/ total 70M– lmedinasSep 7, 2012 at 9:27
-
It depends, exactly. If you want to save space and don't need much the initramfs has a few MiB. If you are like me and don't care about space and build the initramfs with all bells and whistles then you end up with 10 - 20 MiB. There's one exception: When you do a build with debugging symbols you'll easily surpass 100 MiB. But that was not the ordinary user scenario I was describing in my anser. A developer knows how much space is necessary and how to partition the hard drive.– MarcoSep 7, 2012 at 9:35
-
Every time I remove an old kernel in my VM at work (Ubuntu 12.04) it frees about 150MB. Right now my kernels in my personal Ubuntu 16.04 are ~6.8MB and initrd images are ~36MB. The /boot size is 150MB– phuclvJan 8, 2017 at 13:43
-
100MB is likely too small for Ubuntu. As of Ubuntu 20.04
initrd.img
is 70MB, and the kernel itself is 12MB. I recommend/boot
being large enough to hold at least three kernels (and their correspondinginitrd
s) simultaneously. I use a 500MB/boot
.– mpbSep 13, 2020 at 21:00
This it debatable, it depends on the context.
On simple desktop installations or laptops it didn't make much sense the last years, in my opinion. It was easier to use just one system partition. On linux routers (using BIOS) I also don't use a separate boot partition.
If your system uses UEFI, then a separate boot partition is mandatory again (EFI system partition), but ext2 is not a good choice, I would recommend FAT.
A valid case is if you use a boot manager that cannot boot from your root file system then a separate boot partition makes sense and ext2 is most likely to be supported.