Ask Your Question
3

Partitioning for one data partition and multiple Linux installs

asked 2017-07-13 02:47:51 -0600

wolfv gravatar image

updated 2017-08-18 16:19:03 -0600

My home PC is currently running Fedora 25. I will be performing a clean install of Fedora-workstation every 6 or 12 months. I will also be trying other Linux distros.

The following describes how I plan to partition my SSD. Please tell me if you foresee a problem with the way I plan to partition the SSD.

Motivation

My Fedora with Gnome is crashing every 1 to 10 days. Many people report using Fedora for months without crashing. I suspect there is a driver issue with my Intel NUC hardware. Right now I am trying Fedora with LXDE. If that still crashes I will try Ubuntu.

Requirements

Be able to install other Linux distros while leaving the Fedora install intact.
Keep the following data directories on SSD, without future Linux installs erasing them:

~/Documents   2.3 GB
~/Pictures     .2 GB
~/scripts      .0 GB
~/app_configs  .0 GB

The ~/app_configs directory will contain the following application-configuration files, which will be symlinked from all my Linux installs:

/var/spool/cron
~/.config/gtk-3.0/
~/.local/share/nautilus/scripts/
~/.ackrc
~/.bashrc
~/.gitconfig
~/.gitignore_global
~/.spacemacs
~/.vimrc
~/.vimrc_min

The installation steps I plan to use are based on:
https://unix.stackexchange.com/questi... > answer by wag
http://www.makeuseof.com/tag/upgrade-... > comment by Robert B
https://docs.fedoraproject.org/en-US/...
bodhi.zazen's answer below.

Steps for tomorrow's Fedora 26 install

Set up partitions for subsequent Linux installs:

  • Make two backups of 3 data directories: ~/Documents, ~/Pictures, ~/scripts
  • Make two backups of 9 application configuration files for ~/app_configs
  • Use Anaconda manual partitioning to create a custom partitioning layout:
    / (root) (20 GB)
    /data (20 GB)
    /spare (20 GB, for future Linux install)
    swap ( 8 GB, equal to the amount of RAM)

AFTER the system is installed:

  • In installed home ~/.config/user-dirs, redefine folders to data partition, add scripts folder, and comment unused folders Music Videos. That way all Linux installs share the same data partition.
  • Create 9 symlinks from installed home to ~/app_configs folder in data partition. That way there is no problem with synchronizing application configuration files. And always backup the same ~/app_config files no matter which Linux install is running the backup. App config files that will not change can be copied from ~/app_configs folder to the installed home, instead of symlinked e.g. ~/.bashrc, ~/.vimrc
  • System configurations remain in the installed home. That way there is no problem with different system configurations from one distro to the next.

Steps for subsequent Linux installs

  • Make backup of data and app_configs directories.
  • One of the Anaconda options, when picking an existing partition, is not to format it. Tell Anaconda to use the data partition but not to format it. That will keep the data partition intact.
  • Tell Anaconda which partition to install Linux on.
  • Use the same username as before.

AFTER the system is installed:

  • In installed home ~/.config/user-dirs, redefine folders to data partition, add scripts folder, and comment unused folders Music Videos.
  • Create 9 symlinks from installed home to ~/app_configs folder in data ...
(more)
edit retag flag offensive close merge delete

Comments

This setup looks good. However, be sure to backup properly!

Aeyoun gravatar imageAeyoun ( 2017-07-13 08:42:16 -0600 )edit

It seems overly complicated too me. Why reinstall Fedora every 6-12 months? Why not just upgrade? I would just use a common /home for all Linux distros (I know, potential for config conflicts) and just create separate / for each distro. But first and foremost, I would "test try other Linux distros" in a virtualized environment using virt-manager.

florian gravatar imageflorian ( 2017-08-16 16:07:03 -0600 )edit

You make some good points florian. I will try the Fedora 27 upgrade when it is released. Would using a virtual machine be simpler? The rationalizations in the above question are prefixed with "That way".

wolfv gravatar imagewolfv ( 2017-08-17 21:12:43 -0600 )edit

A Virtual Machine (VM) makes things very easy. You can install any operating system "as if it was an app". You test many at the same time without touching the configuration of your actual computer (host system). The easiest way to get started, if you use Gnome, is Gnome Boxes. It is very limited in terms of settings but it's damn simple. Just give it a try.... all you need is an .iso (live or install) from any GNU Linux or other OS. Deleting the VM takes 1 sec, but you test it without any changes to your HDD layout.

florian gravatar imageflorian ( 2017-08-18 14:28:09 -0600 )edit

@florian, After reading about Gnome Boxes, I see what you mean. Gnome Boxes would be a good way to test drive operating systems on top of a host operating system. I will be testing multiple OS because my Fedora 26 with Gnome is crashing every 1 to 10 days. So I don't want to test operating systems on top an operating system that is crashing. I added a Motivation section to the question.

wolfv gravatar imagewolfv ( 2017-08-18 16:17:58 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-07-13 17:00:28 -0600

updated 2017-07-13 17:01:55 -0600

Hard to know what the best solution might be.

Potential problems: 1. The Desktop directory is sort of an exception here. The location is defined in ~/.config/user-dirs.dirs

See https://askubuntu.com/questions/11627... for a brief discussion.

  1. Each system identifies users by UID an not user name. Most distros will by default assign a UID of 1000 to the first user, and 1001 to second, etc.

  2. Depending on distro, there may be some configuration problems if you share a /home

Potential solutions:

  1. Make a /home partition and mount it at /home. This is likely your best option, but it can cause problems across distros.

  2. Make a /data partition, mount it anywhere you like, and copy your user settings with cp or rsync.

  3. Mount your /data partition in a standard location and copy the config files you want to your home.

  • Specify the location of Desktop directory in .config/user-dirs.dirs as say /data/Desktop and /data/Pictures

  • mount/bind your other directories in fstab

    /data/scripts /homeyouruser/scripts none defaults,bind 0 0

and copy config files such as .bashrc, .config/user-dirs.dirs, /vimrc, etc to your new home . I would not bother linking these files they are small size and should be a one-time copy or rsync

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-07-13 02:47:51 -0600

Seen: 622 times

Last updated: Aug 18 '17