I've seen some people make a separate partition for /boot. What is the benefit of doing this? What problems might I encounter in the future by doing this?
Also, except for /home and /boot, which partitions can be separated? Is it recommended?
|
I've seen some people make a separate partition for Also, except for |
|||||||||
|
|
This is a holdover from "ye olde tymes" when machines had trouble addressing large hard drives. The idea behind the Technically, you can get away with a single partition and be just fine, provided that you are not using really really old hardware (pre-1998 or so). If you do decide to use a separate partition, just be sure to give it adequate room, say 200mb of space. That will be more than enough for several kernel upgrades (which consume several megs each time). If /boot starts to fill up, remove older kernels that you don't use and adjust your bootloader to recognize this fact. |
|||||||||||||||||||||
|
|
One reason for having a /boot partition is that it allows for things like encrypted /, where the kernel and initrd are loaded from an unencrypted partition and then used to mount the encrypted root partition containing the operating system. It shouldn't matter for general usage however. |
|||||||||||||
|
|
The main reason for the major enterprisey distro's like Red Hat and I think Suse to use a separate /boot is that they use LVM by default and Grub cannot be used to boot from LVM. It is that simple. So if you want to use LVM, and that is a boon, you use a separate /boot. Personally, I think it is good practice to use both LVM and separate partitions for a host of things, like |
|||||||||||||||||
|
|
One final reason, less important than those given, is it can allow the PC to remain bootable if part of the disk is corrupted. The more partitions you have, the easier it will be to simply not mount the partition with the fault. This can be useful sometimes, but usually there's a better way anyway. EDIT: Another point: assuming Linux, using LVM can be a good way to avoid any potential problems, it makes it easy to resize "partitions" and add new space seemlessly. |
|||||
|
|
I think this is more of a personal preference than anything else. Might even be a best-practice. My personal view of /boot is rather read-only based. Once in a while you need to write in there to upgrade your kernel or maybe add another OS in the grubloader. Besides that it's just needed to ... well, boot. So having it in a separate filesystem might help putting it on read-only (might even be some security aspect to it as well). Should it be a separate filesystem? I guess not.. But is it a bad idea? No, not at all! |
|||
|
|
|
In answer to the 'what problems might it cause' part of the question: as with any partitioning there is always a risk that you will come to need more space than you initially allocated. While this is unlikely in the case of |
|||
|
|
|
Unfortunately I'm fresh here so cannot comment the particular answers. Several people have implied that GRUB would not be able to boot from LVM GRUB2 is booting happily from LVM2 without any problem on my home PC for about 1.5 years now. Sweetest thing since sliced bread. Oh, and that is supported by default by the ubiquity (alternative) installer. Try it |
|||||||||||||
|
|
Regarding the second part of the question, it may be useful to place in separate partitions anything that is independent of the current distribution. By also leaving extra space available on the drive, this allows, if necessary in the future, to either install a different distribution, or perform a reinstall of the current one, sharing access to anything that you'd want to see on both. Obviuos candidates for separate partitions are then /usr/local and /home, as well as /root. I personally find it more efficient to create custom partitions, mount them in an arbitrary mountpoint, like /part/data, and then proceed with symlinks, as in:
|
|||
|
|
|
Another reason that I think is not mentioned is that you can use the filesystem type and the configurations that you prefer for |
|||
|
I found it slighly more difficult to boot from the grub prompt when using a separate /boot partition. It seemed that the kernel was on /boot, but the initramfs was on / (separate partition). So it was not clear which partition to use in the grub menu. With all the potential advantages of a separate /boot partition, there is also a risk of having to troubleshoot more than usually in case something bad happens (i.e. run grub-install without running update-grub afterwards :S) |
|||||
|
|
Let me write here just my few of my experiences: Well in my case, I have RAID 1 (1GB only for /boot ) and RAID 5 for rest of disk space. I use grub 2 from debian squeeze and it is fine. Grub 2 doesn't have this limitation anymore like grub 1 did. Nowadays it doesn't matter. This was needed when you had grub version 1, which did not know, how to boot from RAID5, but it knew how to boot from raid 1. And that's the reason why. In my case I use it just for case, I could need it, if something bad happen. Because not everytime you have new LIVE debian or ubuntu in your pocket. Also if something bad happen, I make backup of /boot. Once it saved my install already. I use Linux SW RAID 1 with 3 HDDs and RAID 5 with same HDDs. First 1 GB I use for RAID 1. But if you use LILO or GRUB version 1.98 -> 2, you don't need to have separed /boot partition. |
||||
|
|