Sharing Swap and Home

Associate
Joined
13 Apr 2007
Posts
961
Location
Belfast, Northern Ireland
I'm something of a Linux noob but for a variety of reasons I'd like to dual boot one of my work laptops with OpenSolaris and OpenSuse.

Is there any way I can use just one partition for Home and one for Swap for both OSes? I realise that the initial setup will be a little fiddly but the convenience of having my Home file in one place would be great.

Any advice would be great...
 
Sharing swap is fine.

Sharing home may cause problems. Applications write user configuration files there. Two instances of, say, Gnome writing to the same directory may result in files being overwritten, inadvertently.

1. You could install with different usernames and end up with e.g. /home/sidethink and /home/knihtedis ( Make sure the second installer doesn't format the home partition! Just choose the mountpoint and keep existing data. )

or if, for some reason, you want to use the same username :

2. You could install Solaris, make a directory called home-solaris, create a symbolic link, copy all files across ( probably best to do it with the OS not running ). Repeat for Suse.

home -----> home-solaris

home -----> home-opensuse



Then, if you wish, a symbolic link out for common data.

home-solaris/data ---> common
home-suse/data ------> common


Any reason why you don't want multiple home partitions?
 
Last edited:
I just presumed it would be more convenient for things that I download or save etc.

How hard would it be to setup a folder location that I can direct all my saved files to for both OSes?
 
How hard would it be to setup a folder location that I can direct all my saved files to for both OSes?

If you go with different usernames :

1. You will have /home/user1 and /home/user2.

2. You then create /home/user1/savedFiles

3. Create a symbolic link like so :

Code:
ln -s /home/user1/savedFiles /home/user2/savedFiles

Now you can test by listing :

Code:
ls -lha /home/user2/savedFiles
total 8.0K
drwxr-xr-x 2 exor exor 4.0K 2009-01-20 12:51 .
drwxr-xr-x 3 exor exor 4.0K 2009-01-20 12:43 ..
lrwxrwxrwx 1 exor exor 32 2009-01-20 12:45 /home/user2/savedFiles -> /home/user1/savedFiles

Code:
ls -lha /home/user2/savedFiles/
total 8.0K
drwxr-xr-x 2 exor exor 4.0K 2009-01-20 12:51 .
drwxr-xr-x 3 exor exor 4.0K 2009-01-20 12:43 ..

If you delete /home/user2/savedFiles, just that symbolic link disappears.
If you delete /home/user2/savedFiles/*, everything in /home/user1/savedFiles disappears.
If you delete /home/user1/savedFiles/*, everything in /home/user1/savedFiles disappears and your symbolic link, /home/user2/savedFiles, points to.... nothing.

Bit tricky to wrap your head around, at first. :p
 
Last edited:
I'd do it eXor's way.

Sharing a single SWAP is standard practice, you don't need to do anything, both OSs will just see the swap.

Sharing home but with 2 different users may sound like a half measure, but it will mean you can easily get files from the other OS as the same /home is always there and mounted, but the separate users will be essential for the .*rc files.

While you're at it, search google for OpenS*, there must be more OSs out there beginning with OpenS that you can have.
 
Another random comment - I do understand that ZFS is a nice feature but its hardly the 'must have' to host my Home partition.

Better for a storage target or virtualization which this evaluation is not about - thanks for the 'advice' though...
 
Another random comment - I do understand that ZFS is a nice feature but its hardly the 'must have' to host my Home partition.
Hardly a random comment. You post on an internet forum asking for advice and I gave my opinion - what else did you expect?!

thanks for the 'advice' though...
"meh" I'll know better next time than waste my time.

not necessarily.. /home could be mounted on a reiser (or other) partion, whilst the rest of the solaris install is on zfs.
AFAIK, Solraris doesn't have resier support.
 
Back
Top Bottom