You are not logged in.

#1 2010-10-13 15:43:36

AquaBoogie
Member
Registered: 2010-08-09
Posts: 20

Arch and Ubuntu - Shared /home directory

I've attempted to install Arch more than a few times, with my last few attempts being fairly successful. I've learned quite a bit in the process (my reason for playing around with Arch), but in the end I've always gotten frustrated and gone running back to Ubuntu. I need a fully operational system so that I can get my schoolwork done, but I would like to ease my way out of Ubuntu and play around with Linux more. I've decided I'd like to set up a dual boot so that I have Ubuntu as a stable system and Arch to play around with. Eventually I'd like to be using Arch 100% of the time, but until I get all the loose ends tied together and get over the learning curve, I could fall back on Ubuntu. Also, if/when an update breaks my system, I've always got a working Ubuntu system just in case.

Currently I have a fresh install of Ubuntu 10.04, with separate partitions for /boot and /home. My HDD is partitioned like so:
sda1 - /boot
sda2 - swap area
sda3 - Logical Partition
        - sda5 - / (Ubuntu 10.04)
        - sda6 - empty (I plan on using this as / for Arch)
sda4 - /home

My plan is to share the /home directory between Arch and Ubuntu, and possibly the /boot partition. I've read that many use a /data partition or something similar for their files because .config files in a shared /home directory often conflict with each other. How worried about this should I be? Would you recommend this, or advise against it? I know I will have to do a bit of tinkering to get all the permissions right, but I don't mind taking this extra time if I have a fully operational system to fall back on. I can just take my time and use Arch as an educational project instead of rushing to make everything work so I can get my English paper done on time.

I'm also considering sharing the /boot partition between both distros, possibly with a separate directory for each distro. I'm not familiar with GRUB2, so I've got a bit of reading to do to figure out how to edit menu entries. Do I have to install a bootloader in the / directory of the Arch installation, or could I use GRUB2 which is already installed to the MBR?

If you think my partition table doesn't make sense, speak up! I still don't completely understand why /boot would be on a separate partition, but many people do it claiming better performance. I'm willing to start from scratch to get everything partitioned right for a dual boot that will work well. 

I hope it's clear what I'm trying to do here. Is there anything I am forgetting to take into account? A better or simpler way to accomplish what I am trying to do?

I have a massive pile of homework that I need to take care of before I can play around with Arch. If I'm lucky, I'll be able to mess around with this tonight.

Thanks for your advice!

Offline

#2 2010-10-13 16:51:23

rabid_works
Member
Registered: 2010-08-15
Posts: 45

Re: Arch and Ubuntu - Shared /home directory

You mainly just need to worry about permissions. As you say, you can use a /data  partition with system links to Ubuntu and Arch's /root partitions. This is a pretty simple solution that seems to work well. Another option is to create different user names - but the same user ids (UID) - and create a common group with the same group id  (GID) that both usernames belong to. You can then give all the relevant permissions to the usergroup, and then add the "grpid" option to fstab. I've done this in the past and never had any permission errors because of it (although I no longer bother with dual booting, personally).  Of course, the grpid option is only valid on ext2, ext3, and ext4 filesystems (to the best of my knowledge). Have a look at:

man mount

for futher information on the grpid function. A quick search on google comes back with plenty of info on all this as well.

Offline

#3 2010-10-13 17:01:12

Texas
Member
From: Dallas, Texas
Registered: 2010-09-10
Posts: 131

Re: Arch and Ubuntu - Shared /home directory

I would make a partition for your "real" data (songs, docs, pics, etc.) and mount it as /data on both machines.  Do not make a separate /home partition on either installation.  Then you will have a /home on each system on the / partition.  This way, /home just has app settings like "/home/username/.config/.openbox".  Your data is elsewhere.  You can install as many distros as you wish each with its own home, and still have acces to your data.

Offline

#4 2010-10-13 17:41:46

AquaBoogie
Member
Registered: 2010-08-09
Posts: 20

Re: Arch and Ubuntu - Shared /home directory

Texas wrote:

I would make a partition for your "real" data (songs, docs, pics, etc.) and mount it as /data on both machines.  Do not make a separate /home partition on either installation.  Then you will have a /home on each system on the / partition.  This way, /home just has app settings like "/home/username/.config/.openbox".  Your data is elsewhere.  You can install as many distros as you wish each with its own home, and still have acces to your data.

That makes alot of sense. However, I like the way /home is set up as far as convenience. I suppose this is a minor thing to worry about, but I like being able to find my data in /home. Also, I like the "Places" drop down menu in GNOME where I can go directly to my music, videos, documents, etc. Is there a way to create a symbolic link to folders on my /data partition so that my /home folder appears to work the same way, even though my data files reside on a separate partition? Just to clarify, I'd like to be able to click on Music, for example, within my home directory, and have my music files displayed inside ~/Music, even though they do not reside on the same partition as ~/. Make sense?

Offline

#5 2010-10-13 18:03:33

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Arch and Ubuntu - Shared /home directory

ln -s /path/to/music/on/other/partition ~/Music

Offline

#6 2010-10-13 19:05:29

Kosmonavt
Member
Registered: 2010-02-15
Posts: 100

Re: Arch and Ubuntu - Shared /home directory

Why it's bad to store data on separate /home/partition - a lot of programs doesn't like writing their config files into ~/.config/ and leave it in ~/. So configs and user stuff get mixed. This problem has been discussed here some months ago, and using something like /mnt/data/ for common things might be a kind of solution (unfortunately, can't find exact link).

Offline

#7 2010-10-13 23:35:52

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Arch and Ubuntu - Shared /home directory

If you share your ~/ directory (ie. same usernames on both distros) you'll start hitting versioning bugs with software that changes its config files over different versions. Its quite annoying, and easiest to just totally avoid by using different usernames (or setting one of the users to have a non-default home directory.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2010-10-14 03:35:12

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Arch and Ubuntu - Shared /home directory

Yup - I wholly agree with the last few posters - and I _always_ do it that way as well and never have had problems. dot-files (and there are just too many of them - tend to clutter up your home - and they are not always portable between distros. What I do is having a seperate /work-partition - something like this:

cd ~
for d in documents downloads music pictures templates videos; do
ln -s /work/users/$d $d
done

Personally, since I'm the only one using my computers, the /work/users/*-directories are all 'rwx' for all ... but you could use the gid-aspect as well ...

Offline

#9 2010-10-14 06:14:40

AquaBoogie
Member
Registered: 2010-08-09
Posts: 20

Re: Arch and Ubuntu - Shared /home directory

I've been playing around with symbolic links, and I don't think I'm on the right path. Instead of creating a symbolic link, could I mount the contents of /data in ~/? I realized that if I'm dealing with symbolic links, if I add a file inside /data it doesn't appear in the link. Unless I'm doing something wrong...

My goal is to have these files appear in two places at the same time, so that it appears to reside in ~/, although it is on another partition. Is this possible/realistic?

Last edited by AquaBoogie (2010-10-14 06:16:42)

Offline

#10 2010-10-14 20:11:38

Rad3k
Member
From: Poland
Registered: 2009-05-09
Posts: 36

Re: Arch and Ubuntu - Shared /home directory

AquaBoogie wrote:

I've been playing around with symbolic links, and I don't think I'm on the right path. Instead of creating a symbolic link, could I mount the contents of /data in ~/? I realized that if I'm dealing with symbolic links, if I add a file inside /data it doesn't appear in the link. Unless I'm doing something wrong...

My goal is to have these files appear in two places at the same time, so that it appears to reside in ~/, although it is on another partition. Is this possible/realistic?

Hi there.
I know it's possible, but quite complicated. You could use some kind of unioning file system (e.g. aufs) to mount both your data and dot files in your home dir. But this also has its limitations - probably all newly created files (both the dot ones and normal ones) would end up in one branch. I don't know if aufs has an option to write into separate branches based on filename pattern.

EDIT:
With those symlinks, you're probably not doing anything wrong. It just works that way - the only links you get are the ones that you manually create.

Last edited by Rad3k (2010-10-14 20:15:19)

Offline

Board footer

Powered by FluxBB