4

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?

9

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.

  • So what exactly is BIOS and UEFI? I've heard of them, but I do not understand at all what they are, and the wikipedia links are not the most beginner-friendly. – Rohan Feb 20 '16 at 7:06
  • @Rohan When a PC boots, it first runs some code that's in a flash memory on the motherboard. This code is traditionally called BIOS. The BIOS initializes some hardware and then loads some code (the bootloader that comes with the operating sysetm) from a disk. There are two mechanisms for this loading: the legacy BIOS mechanism, and UEFI. Legacy BIOS loads the first 512 bytes of the first disk and executes it, it's the job of the OS bootloader to do the rest. UEFI can read a FAT filesystem, so it can do the job of a simple OS bootloader. – Gilles Feb 20 '16 at 14:07
  • So UEFI is like another bootloader? I thought it was replacement to BIOS. – Rohan Feb 20 '16 at 19:24
  • @Rohan Both. BIOS is a bootloader (it's the bootloader that comes with the hardware, as opposed to e.g. Grub or LILO which are bootloaders that come with the OS). – Gilles Feb 20 '16 at 19:32

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.