19

As separate /home partition helps in easy reinstallation/upgrade. Does having /boot help while dualbooting with windows? I mean is it useful for normal desktop/notebook users or it is advanced technique that need to be deployed in servers?

24

[The information in this answer about GRUB2 and LVM is largely due to Jan's efforts; originally this answer was severely in error, and Jan deserves credit for the improvements I have made. -Eliah]

When not using LVM, a separate /boot partition is primarily useful for ensuring that the files necessary for booting are close enough to the beginning of the drive, when the / partition is itself not at the beginning of the drive. For example, you might want to put your linux-swap partition very near the beginning of the drive, since on some drives data near the beginning of the drive is potentially accessed more quickly. Then you could have a small /boot partition, followed by your linux-swap partition, followed by the / partition (then followed by other separate partitions if you have them, such as /home).

For quite some time, this has been largely unnecessary, because with newer BIOSes, you can usually boot a system whose boot files are in a partition far from the beginning of the disk. Still, there is very little disadvantage to doing so (unless you make /boot so small that it fills up--it should probably be about 250 MiB), so many people who partition manually still do this.

Older boot loaders like LILO themselves had limitations that made separate /boot partitions helpful, as Jan points out.

When using LVM, if your / partition is on the LVM, it used to be necessary to have a separate /boot partition. In such a configuration, the /boot partition is not be a partition of the LVM, but rather a partition on the disk before the LVM starts. This is because boot loaders could not read files from an LVM. So you could never boot into your system on the LVM if it didn't have a separate /boot partition (see this and this for details).

The ability to read files from an LVM was added with GRUB2, which means that all recent versions of Ubuntu (Ubuntu 9.10 Karmic Koala and later) have it. So with proper configuration you can have your entire Ubuntu system in an LVM without a separate /boot partition. See this page for details about how to configure this. (In fact, the only currently supported Ubuntu release that uses the original GRUB instead of GRUB2 is Ubuntu 8.04 LTS Server; every other non-EoL release--10.04 LTS, 10.10, 11.04, and 11.10--uses GRUB2.)

If you're using LVM but not for your Ubuntu system drive, just for a storage drive, or for some part of your system (perhaps for /home) but not /, then a separate /boot partition is not necessary, even if you are using an old (pre-GRUB2) system.

In summary, a separate /boot partition is largely a matter of personal preference for systems that do not use LVM, whereas an older system installed on an LVM might need one.

  • 3
    This is correct, however slightly outdated. Recent versions of grub2 can read /boot from a LVM volume. wiki.archlinux.org/index.php/GRUB2#LVM (Link to Arch Wiki, not sure which version of Ubuntu would ship a recent enough version of grub.) – Jan Nov 6 '11 at 17:56
  • @Jan Thanks for the info--I have edited my answer to reflect this. If you can suggest further improvements, please comment further or, if you prefer, please feel welcome to edit my answer yourself. – Eliah Kagan Nov 6 '11 at 18:09
  • @Jan Regarding which versions of Ubuntu ship new enough GRUB to do away with /boot for LVM...according to gnu.org/software/grub/manual/grub.html#Changes-from-GRUB-Legacy, it looks like all versions of GRUB2 are capable of this. So that would include any recent version of Ubuntu. I'll edit my post again to reflect this. – Eliah Kagan Nov 6 '11 at 18:13
  • Question: Is any of this relevant if all of your hard drives are SSDs? In that case, since the drive has no disks, there really isn't an ideal place (beginning of the drive) to store a boot or swap partition, is there? – user447607 Feb 26 '16 at 12:08
8

/boot exists for technical and historic reasons.

The boot loader (grub or lilo) must be able to access its own files, the Linux kernel and the initial ramdisk. Those files are placed in /boot.

Early version of lilo could only access some subset of the HDD, would only understand a limited number of filesystems (practically only ext2), and required the filesystem to reside on a primary or logical partition (i.e. no md RAID or LVM). Therefore, it became common practice to have a small /boot partition.

Modern versions of grub are much more flexible, and, therefore, in many cases a separate partition for /boot is no longer required.

For dual booting Linux and Windows, /boot is irrelevant (although I like to use the boot partition's boot sector for the boat loader.) However, when dual booting different Linux installation, it's common to share /boot.

-1

You can a should also use a single /boot partition when installing multiple distributions ( as well as a single swap partition ). None of those distributions own 100% of the /boot info so /boot should not be in any partition of a single distribution.

  • 1
    I don’t agree. Having single /boot for multiple distributions would cause problems when updating kernels or GRUB. – Melebius Oct 3 '16 at 10:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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