Linux – Does /boot need to be mounted on a separate primary partition

bootlinuxpartition

I dual boot Windows 7 with Linux Mint. However, Windows 7's partition layout takes up all the primary partitions, leaving me with the option of one more primary partition or many more logical partitions. So, I went with logical. However, I am just reading that /boot should be mounted on a separate primary partition, but I mount the whole root directory on a logical partition. My Linux Mint operates seemingly fine, but might this be problematic?

Best Answer

Linux doesn't care where /boot is. In fact, Linux itself doesn't access /boot at all except when updating its contents. Only the bootloader accesses /boot.

In most setups, it is unnecessary to put /boot on a separate partition. There are downsides to separating out /boot: it's more complicated, it uses up an entry in the partition table, it could run out of spaceā€¦ The only reason to split out /boot is if it's necessary to make the system bootable.

With older PCs, it used to be often necessary to have a small /boot partition at the beginning of the disk. This was due to BIOS limitations. The BIOS is the system software that's in the computer's flash memory and that loads the operating system from the hard disk. Older BIOS generations tended to be incapable of reading from the whole disk. The last few BIOS generations before UEFI, and UEFI, have no such limitations, so these days you can mostly forget about those, but you'll still find tutorials that date back from the limited BIOS era (as well as people who were educated to make a separate /boot partition for that reason and aren't aware that it isn't relevant anymore).

Another reason to have a separate /boot partition is if your root partition uses some mechanism that your bootloader doesn't support. For the most part, like BIOS limitations, this is an obsolete concern: Grub (the standard PC bootloader) supports most of the filesystems and partition types that Linux supports.

On UEFI systems, it's possible to put the kernel image on the EFI partition. Then you have a separate boot partition, but it isn't a Linux-specific boot partition, it's a system-wide boot partition.

The main reason to have a separate /boot partition these days is if you encrypt the system partition. The code that knows how to perform the decryption is in the kernel (or in the initrd/initramfs), so the kernel (and initrd/initramfs) needs to be in unencrypted storage. Even if the bootloader supported the encryption mechanism, you'd need to enter the password twice, once for the bootloader and one for Linux itself (or else there would have to be a mechanism to communicate that password, which would be pretty hard to do without exposing the password more widely than it should).

Note that this answer applies to PC computers. Other types of computers boot in a different way and may or may not need the kernel to be in a special place.

Related Question