The perfect partition setup for a multibooting system.

Jul 19

( From our Guestblogger Matt McGraw) When sliding, we want to minimize the duplication of data so it makes sense to share a /home partition across all of our installs. That way, whatever OS we boot into, we have access to our locally stored documents, music and photos. The easiest way to do this is to simply create a separate /home partition and point each install there. If you format this /home as FAT32 even Windows can use it. This works well if you use a linux OS and a Windows OS because the same application stores data differently across the different operating systems.  But what if you have multiple Linux OSes installed?

seagate_72002_front

On my machine, I dual boot OpenSuse 12.3 and Xubuntu 13.04 and I keep a spare partition for testing distros or installing Windows 7 (if I have to). My partitions are set up as follows:

/dev/sda1 – Swap

/dev/sda2 – “home” (contains my user/Music, Pictures, Downloads, Documents, Videos directories)

/dev/sda5 – OpenSuse 12.3 / partition

/dev/sda6 – Xubuntu Raring / partition

/dev/sda7 – “testing” partition

Initially, I set up OpenSuse and Xubuntu to mount /dev/sda2 to /home. This seemed like the best way to have access to all my data/media across both OSes. (I use OpenSuse as my “daily driver” and I use Xubuntu for writing and content creation). The problem was, the two OSes used slightly different versions of Chromium and the profile files were corrupting each other.  Chromium for linux stores it’s profile data in a hidden directory under the users home directory.  As I switched back and forth between the two OSes, the slight differences between the versions of Chromium caused problems.  What to do?  At first, I thought I would have to relegate myself to using Chromium on one OS and Firefox or Midori on the other. But, as Knightwise would say, sliding means using the same tools across your platforms. Fortunately, I came up with a fairly elegant solution.

I decided to reinstall everything (I had Arch on my “testing” partition and it was kind of a headache).  I left my /dev/sda2 partition untouched and reinstalled OpenSuse and Xubuntu. For the OpenSuse install, I specified /dev/sda5 as the root partition and for the Xubuntu install, I specified /dev/sda6 as the root partition.  I did not specify a separate partition as /home; instead, I mounted /dev/sda2 as ‘/sharedisk’.  I finished the install as normal and booted into OpenSuse.  Here’s the “linux magic”.  I went into my home folder and deleted my Music, Pictures, Downloads, Documents, Videos directories.  Then, I issued the ln command.  I created symbolic links to /sharedisk/user/Music, Pictures, Downloads, Documents, and Videos in my home folder.  I did the same in Xubuntu and Voila! I had shared data folders across my distros and unique settings directories for each one. I suppose it goes without saying that I used the same username and UID across the distros. This ensures I can access the files in the shared directories.

I hope this idea might help any of you installing multiple distributions on the same machine.

Guestblogger Matt McGraw lives in the beautiful central valley of Northern California.  He is a  a stay at home dad and “family tech support” provider. He has a passion for technology and fatherhood.  His kids are 11, almost 3 and just over 1 years old and he loves taking pictures of them and posting them EVERYWHERE. You can find Matt online atg33kdad.thestrangeland.net, on twitter @sahgeekdad, and on google plus atg33kdad.thestrangeland.net/googleplus. You can also find him on IRC under the handle G33Kdad.

If you also want to be a guestblogger on Knightwise.com ? Send us an email or find us on Googleplus and join the community over at www.knightwise.com/googleplus 

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *