Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i gonna install a fresh ubuntu linux and i'm planning for partitions. as i know instead of having just a / i can separate different directories into partitions like:

  • /boot
  • /home
  • /usr/share
  • /var

now here is my question, which ones do i create a partition for? have in mind that

  • i want to try different distros.
  • i want to be able to installing a fresh linux with losing the less config

i know separating /home is recommended. but some configs are somewhere elese: e.g. /etc/apache2/httpd.conf or some configs in /usr/share/*

or databases are in /var/lib/mysql and apt caches are in /var/cache/

i think best plan should be so that these configs and files are kept during a distro change. doesn't it?

what's your planning when install a fresh linux?

share|improve this question

closed as primarily opinion-based by Olli, Heptite, random Feb 14 at 5:25

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

up vote 1 down vote accepted

If you are trying different distros, then I would place /home on a seperarte partition, and keep the rest on a common partition. You can also share the swap partition. Grub will boot from an extended partition, so you can have a fair number of distibutions running.

Grab the password and shadow entries for your users and place them on the /home partition. You can then sync them across distributions.

Once you settle on a distribution, consider partitioning /, /usr, and /var on seperatate partitions. /boot only needs to be a seperate partition if you are using software raid, or logical volume management for /.

You may need to learn some grub magic to switch distros, depending on how well they handle other distibutions. You can set up options to switch to another distibutions menu file. This may be the easiest way to handle kernel management between distributions.

share|improve this answer
    
Or encrypting /. –  Ignacio Vazquez-Abrams Aug 28 '10 at 4:06

/etc must not be on a separate volume. Other than that, the others are fine.

Myself, I keep /, /home, and /boot on separate volumes, and just backup the system data and configs as needed.

share|improve this answer
    
thanks Ignacio; could you tell me how do you backup and what exactly do you backup? –  Alexar Aug 28 '10 at 17:32
    
I backup /etc and pieces of /var (mostly database) to NAS and/or optical media. Everything else is on /home and so is pulled forwards. –  Ignacio Vazquez-Abrams Aug 29 '10 at 1:58

For files independent on distro, sharing one partition between different distro is helpful, and mostly harmless . I mean /home.

Sharing a common /boot partition is possible, and gives you a more 'unified' grub menu. but you may have to manage the kernels and kernel command lines for eachd distro manually (and keep distro installers from installing the brand new grubs).

but for files only work for one particular distro, like etc, var , I don't regard sharing them between distos a good idea. Some of the files even reside in different directories with different distros.

it may sounds nonsence, that we have to know what and for what the files are , on which sharing them depends.

share|improve this answer

Obviously, you'll want a / for each distro and a /home that is shared between distros. You'll certainly want to share a swap partition. For each distro, /etc and /bin should be located on the respective /.

Additionally, I like to have a separate /var and /tmp. /var is separate so that in case it gets full, for instance from a badly configured program making bloated log files. I make /tmp non-journalling.

You may also want to consider linking files and directories from one partition to another. You really don't want all of your config files in /etc to be shared, but I could possibly see a shared /etc/httpd. Sharing programs between distros probably won't work either for technical reasons.

share|improve this answer

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