LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Primary partition (https://www.linuxquestions.org/questions/linux-newbie-8/primary-partition-844833/)

jschiwal 11-17-2010 06:38 PM

A separate /boot partition is needed if you use LVM or RAID. The kernel needs to be used to access the other partitions on an LVM or RAID volume.

A separate /home partition makes clean upgrades, or distro changes easy. By not formatting the old /home partition, you can retain your old files. I will rename my $HOME directory just before a reinstall, and move files I want to keep from the old directory to the new one.

Separate partitions can be mounted with different mount options. This is more often done for servers, to enhance security. For example:
A server will have a separate partition for /tmp and /usr/tmp. This allows mounting with the noexec, nosuid, and nodev. This helps enhance security, because these directories are world writable.

A server will have a separate partition for /var/log/. If an attacker can fill up the /var/log/ directory, the rest of the filesystem still has free space.

The /boot, /etc, /lib directories can be mounted read-only. Look in the Linux Filesystem Standard on which directories can be static. Mounting them read-only helps protect servers from having files modified.

brianL 11-17-2010 06:53 PM

I'm still a relative newbie, and I haven't delved into LVM or RAID. There's a hell of a lot of interesting stuff to learn!

GazL 11-17-2010 07:11 PM

Quote:

Originally Posted by brianL (Post 4162460)
I'm still a relative newbie, and I haven't delved into LVM or RAID. There's a hell of a lot of interesting stuff to learn!

And just when you think you're getting the hang of it all, someone goes and invents something new! ;)

hilyard 11-17-2010 07:17 PM

Yeah! Great discussion , people. Thanks to all!

brianL 11-18-2010 05:05 AM

Quote:

Originally Posted by GazL (Post 4162476)
And just when you think you're getting the hang of it all, someone goes and invents something new! ;)

My problem is I'm too easily distracted. I'll start reading up about something, then something else grabs my attention. So I end up knowing a bit about lots of things, but a lot about nothing. If that makes any sense. :)

i92guboj 11-18-2010 05:22 AM

Strictly speaking, you don't even need a partition for /. Just mkfs /dev/sda instead of /dev/sda1. Linux doesn't need a "partition". It only needs an fs to live into.

So, the lesser number of required partitions to run linux is exactly zero.

Some individual apps might get confused though, but that's their problem, not linux's problem.

You don't even need a swap partition, nowadays the kernel bypasses the fs when working with swap, so there's no penalty derived from having the swap space inside a file living in, let's say, /myswapfile.img

There are lots of situations where having separate partitions help, though. For example, having a single /boot partition allows for fancy things like sharing your kernel amongst distros (in most cases there's really no point in having a different kernel for each, they all are linux, and it eases a lot of work), or when you want encryption. You will also needs a separate boot partition probably when your boot loader doesn't support the fs you use for /, that happens with newer fs's usually.

Having a separate /home eases the rare cases when you have to reinstall or update your OS.

You can have as many separate partitions as you want, using different fs's. The question here is are you looking for a solution for a problem or are you looking for a problem for your solution? ;)


All times are GMT -5. The time now is 05:32 PM.