LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I got a question about boot partitions... (https://www.linuxquestions.org/questions/linux-newbie-8/i-got-a-question-about-boot-partitions-782785/)

trist007 01-17-2010 12:13 PM

I got a question about boot partitions...
 
I've always been confused about this issue of boot partitions. In the past when I install linux I usually have 2-3 partitions.

1. Main OS partition mounted on /
2. Storage partition mounted on /home
3. Swap partition

Why and when would I need to have a boot partition? Even if I dual boot two OSs, I just make one more partition for that other OS.

So what's the purpose of a boot partition?

DavidMcCann 01-17-2010 12:36 PM

The main reason for a boot partition (and the only one I can remember!) is that GRUB is a bit fussy about partitioning. If you use logical volume management, this is too complex for the booting process, so /boot must be on a separate partition. GRUB also had trouble with ext4 when it first arrived, so a separate /boot was needed in ext2 or ext3 format.

irishbitte 01-17-2010 12:39 PM

Generally speaking it is good practice on a machine that is used as a server type system to have a /boot partition. Like all partitions, the main purpose of having a partition for the /boot files is to prevent other services from overwriting the files in the partition. For example, in a case where there are a pile of logfiles growing due to buggy code or badly configure services, it may be necessary to put the log directory /var/log into it's own partition.

Consider the situation where everything is on one partition. It is likely that you will have difficulties at some stage with some piece of software going where it shouldn't. Partitions are a good way to engage in preemptive damage limitation. Another useful aspect of partitions is for backup purposes.

trist007 01-17-2010 12:42 PM

Ok so all the boot paramters like lilo.conf, the vmlinuz image and config would be on the boot partition?

Also yeah, I'm confused about LVMs. I've never used them except once on Fedora. What's their advantages/disadvantages?

chrism01 01-17-2010 05:11 PM

There's an LVM HOWTO here http://tldp.org/HOWTO/LVM-HOWTO/
Basically, you can add lots of physical disks (each disk called a pv = physical volume) into a pool (vg = volume group).
You can then divide the vg into 1 or more lvs (logical volumes), so you don't need to worry if the disks are different sizes/makes (unlike RAID).
Handy way to just keep adding disks and expanding space, but tricky if any part breaks.
Definitely require regular backups...

onebuck 01-17-2010 05:14 PM

Hi,

The big deal with having a '/boot' was when the hdd had a cylinder count greater than '1024'. We would create a separate '/boot' partition on the hdd <1024. Now that 'lilo' & 'Grub' can handle cylinder counts >1024 this is no longer an issue.

Another advantage was to have multiple installs or kernel images for the system residing in the '/boot' that way there would be no conflicts between the installs.

Now a lot of people wanting to use Grub2 with ext4 which can cause conflicts. To avoid the conflict you can create a 'ext2' filesystem on the device for the '/boot' when using 'Grub2'.

:hattip:


All times are GMT -5. The time now is 03:25 PM.