LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2009, 12:54 PM   #1
KindOfNeutral
LQ Newbie
 
Registered: Jan 2009
Location: Finland
Distribution: Ubuntu
Posts: 11

Rep: Reputation: 0
Easiest way to share files between two linux installations on same computer?


Hello,

I have had Ubuntu (64bit) on my computer for a couple months and now I would like to add a Zenwalk (32bit) installation. I have /home on a separate partition (on a separate hard disk).

From what I have read, it is not a good idea to share the same user account between two installations. Would it be ok to have the same /home partition for both installations but with different user accounts?

Some files (music and video) I would like to have available to both installations without any duplication. What would be the easiest way to achieve this (without the need to change accounts or type passwords after every boot)?

Any advantage to make a separate partition for the shared media files?

Thank You!
 
Old 05-23-2009, 01:49 PM   #2
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
many method:

method 1: put data at partition /data instead of /home, both linux os mount the data partition as /data
method 2: put photo/music under 1 Linux's /home, and at 2nd Linux's home directory do a symlink 'ln -s' for photo/music to 1st Linux's home
 
Old 05-23-2009, 01:54 PM   #3
Angry_Tommy
LQ Newbie
 
Registered: May 2009
Location: Leeds
Distribution: Gentoo, Arch Linux
Posts: 25

Rep: Reputation: 17
same partition with mounted /home - why not? give it a try ...but same account - maybe, try it. basically it will works for two separate accounts, for example username x1 for your 64bit linux and username x2 for 32bit etc.
 
Old 05-23-2009, 01:56 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,887

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
I haven't gotten around to setting up a seperate data partition yet, but this is what I will try to do when I finally try it.

Set up a seperate data partition, and if you are the only user of that computer, then set the group ownership of the partion to users.

In each distribution you install, add the user name to the users group.

In each distribution you install, give the users group rwx permissions.

Add the data partition to /etc/fstab to mount on boot.

If I'm in error in my thinking, I'll be most happy to learn from the correcting comments added by more experienced Linux users.
 
Old 05-23-2009, 02:37 PM   #5
KindOfNeutral
LQ Newbie
 
Registered: Jan 2009
Location: Finland
Distribution: Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
thanks!

Thank you!

I think I will go with the separate /data partition. Somehow I find that solution most pleasing to my taste - it behaves identically with both installations (and possible new ones in the future).

No wait! Would a /home/data folder be doable? It would also be a symmetric solution!

On the other hand I think one shared /home partition could be enough. Wouldn't have to use any logical partitions. In a post on the Zenwalk forum there was a suggestion to use the same name on all OSs but make diffrent home directories for them:

/home/ubuntu/user1
/zenwalk/user1

This way there would be no unwanted intereference from different installations but accessing everything would be without any permission problems. Would it be easy to rename my present /home/user directory to /home/ubuntu/user1 on a Ubuntu installation that is in use?

Good to know that there is options. Unfortunately they are all good options -so hard to choose The Right One.

Thank you again!
 
Old 05-23-2009, 03:39 PM   #6
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
No, most of these are horrible ideas- stick with one 'data' partition given above- I'll tell you why.

Disk space is a finite commodity, the idea of setting aside a home and a root partition for each distro means that you have smaller partitions for each. Set aside 15 gig for each distro's root, then a mount point for something like /data/ for the data partition with the rest. All that'll be in your home dirs then will be config files.

In /etc/rc.local for each distro, a quick line to set the permissions.

Thats how you do it
 
Old 05-23-2009, 05:53 PM   #7
KindOfNeutral
LQ Newbie
 
Registered: Jan 2009
Location: Finland
Distribution: Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
No, most of these are horrible ideas- stick with one 'data' partition given above- I'll tell you why.

Disk space is a finite commodity, the idea of setting aside a home and a root partition for each distro means that you have smaller partitions for each. Set aside 15 gig for each distro's root, then a mount point for something like /data/ for the data partition with the rest. All that'll be in your home dirs then will be config files.

In /etc/rc.local for each distro, a quick line to set the permissions.

Thats how you do it
If I understand you correctly, you suggest that installations do not need a separate home partition? The reason for a separate home partition is that if the need arises for a re-installation, the configuration files for different applications would survive. Only the root partition would be rewritten. I agree that a separate root and home partition for each distro would make a lot of partitions. I do not really consider that option.

Now my first hd (160GB) have four partitions: three about equal-sized partitions (ext3), the first of them contains Ubuntu and the others are currently empty - and a 5GB swap. 50GB for every root partition is maybe too much but at least I don't have to worry about installing too many programs or about fragmentation.

The second hd (1TB) have two about equal-sized partitions, the first have the home partition of Ubuntu and second is empty.

first option: Make a big data partition on the second partition of the second hd - shrinking the first partition. The first partition could serve as a home for every distro. Data partition will be mounted to /data on every distribution.

Second option: Remove the second partition of the second hard drive, enlarge the first partition to contain both the home directory of every distribution and all data files - make the files accessible from every distro in some other way.

When having a common home directory there is two options to keep the configuration files separate: 1) Use different user name on every distro, 2) use the same name but assign different directory for the user in every distro.

This is how I understand the options currently.
 
Old 05-23-2009, 06:05 PM   #8
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 2,281

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
With a common home partition, you still need individual /home/<user> directories, because the users home directory holds all the user config files. I believe it's insane, and impossible to use common /home, when working with full gui desktop environments.
 
Old 05-23-2009, 06:12 PM   #9
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
No installation needs a seperate home partition- the config files are negligible really, losing them is an inconvenience; so long as the data is safe. You could easily get away with less than half those for root partitions, but like you say, its good to have that wiggle room.

Why not have the entire terrabyte disk for data and set the spare on the first disk as encrypted space. There would be comparatively little encrypted space (especially along side the terrabyte) but hey, just save it for really critical stuff for now.

But seriously? You're making this too complex- don't worry about seperate home partitions over their own disk, or one home partition with different usernames, why make it so hard for yourself? No distro needs (or even insists upon I believe) its own home partition, so leave these for the distro specific configs and have a data partition.

Worried about loss of convenience this way? Cool, script a solution to take all unhidden files in the home partition on logout and move them.

But really? Forget this whole shared home partition/directory idea- its messy and ugly, its not the unix way
 
Old 05-23-2009, 06:44 PM   #10
KindOfNeutral
LQ Newbie
 
Registered: Jan 2009
Location: Finland
Distribution: Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AwesomeMachine View Post
With a common home partition, you still need individual /home/<user> directories, because the users home directory holds all the user config files. I believe it's insane, and impossible to use common /home, when working with full gui desktop environments.
Yes, different directories for different users is needed, that I understand. Is there any problem having all user-directories (for different distros) in a common /home partition? I'm a newbie so I don't understand what difficulties would follow from this. The /home directory should not have any configuration files, only the /home/<user> directories have the configuration files of their users.
 
Old 05-23-2009, 06:58 PM   #11
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
The problem is that there are various configuration files in your home directory (/home/username) that aren't always compatible between distros even through they may have the same name. This is where the difficulties arise.

Have a look at "ls -la ~/" sometime to see how many hidden files there are (the ones starting with a period are hidden).

You are correct that there is nothing much in /home aside from a bunch of user directories, and it's these that have the configs.
 
Old 05-23-2009, 07:52 PM   #12
KindOfNeutral
LQ Newbie
 
Registered: Jan 2009
Location: Finland
Distribution: Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
No installation needs a seperate home partition- the config files are negligible really, losing them is an inconvenience; so long as the data is safe.
Yes, its only an inconvenience. But we might differ a little in our personalities: I am lazy and have great appreciation for thing staying the way I set them. Of course some of the data is more important.

Quote:
Originally Posted by jamescondron View Post
Why not have the entire terrabyte disk for data and set the spare on the first disk as encrypted space. There would be comparatively little encrypted space (especially along side the terrabyte) but hey, just save it for really critical stuff for now.
I probably don't need encryption. A backup for critical stuff in case of hard drive failure is a good idea, although a have a separate computer and usb flash drives for that.

Quote:
Originally Posted by jamescondron View Post
But seriously? You're making this too complex- don't worry about seperate home partitions over their own disk, or one home partition with different usernames, why make it so hard for yourself? No distro needs (or even insists upon I believe) its own home partition, so leave these for the distro specific configs and have a data partition.

Worried about loss of convenience this way? Cool, script a solution to take all unhidden files in the home partition on logout and move them.

But really? Forget this whole shared home partition/directory idea- its messy and ugly, its not the unix way
Actually, when I first installed Ubuntu, it did not make a separate home partition. Many people, on a (Finnish) forum that I read, recommended having a separate home partition, so I did make one.

I'm a little confused now: When installing the next distro (Zenwalk) and choosing the existing home partition for home partition, it will not wipe the partition clean of the Ubuntu files or anything like that?

I don't find the shared home partition idea messy: It is the normal way with the exception that the users are from different distros instead of the same one. I'm interested only if there is some complications to be expected with this arrangement.

Your advice is appreciated although I find myself reluctant to it.

(Btw: I apologize for my english skills and hope that haven't misunderstood anything or failed in communicating my thoughts. I have written in this thread more in English than I have in the preceding ten years. I'm thankful for the spell checker.)

Last edited by KindOfNeutral; 05-23-2009 at 07:56 PM.
 
Old 05-24-2009, 06:59 AM   #13
Tom6
Member
 
Registered: May 2009
Posts: 116

Rep: Reputation: 16
Quote:
Originally Posted by KindOfNeutral View Post
From what I have read, it is not a good idea to share the same user account between two installations.
Lol, from what i have read this is exactly wrong. It's great to have the same username on different distros installed on their own partitions all using the same /home partition. All your existing settings would then be automatically used by the other distros using the same packages. There is some advantage to having different settings for radically different distros but in these cases it would be fairly easy to use different packages for the same functionality, eg use Firefox in Ubuntu but BonEcho in your puplet. Bad example because BonEcho (or is it SeaMonkey?) is the default browser in puppy even when they say 'FireFox' whereas Ubuntu just has proper Firefox as it's default web-browser. On a tiny distro a lighter web-browser such as BonEcho, Seamonkey etc seems preferable anyway

Anyway while it's good to have a separate partition for /home and for linux-swap it's generally better to avoid splitting a drive up into too many small partitions that may each then have a little wasted space that would only be useful if it was all lumped together. 15Gb for a puppy install seems excessive as the basic install only needs 1 or 2 Gb? A bloated distro like Ubuntu will need at least 15Gb if you want to have room to install stuff and try things out but Puppy should work well with a lot less space, especially if you have a separate /home

Good luck and regards from
Tom
 
Old 05-24-2009, 07:43 AM   #14
KindOfNeutral
LQ Newbie
 
Registered: Jan 2009
Location: Finland
Distribution: Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tom6 View Post
Lol, from what i have read this is exactly wrong. It's great to have the same username on different distros installed on their own partitions all using the same /home partition. All your existing settings would then be automatically used by the other distros using the same packages. There is some advantage to having different settings for radically different distros but in these cases it would be fairly easy to use different packages for the same functionality, eg use Firefox in Ubuntu but BonEcho in your puplet. Bad example because BonEcho (or is it SeaMonkey?) is the default browser in puppy even when they say 'FireFox' whereas Ubuntu just has proper Firefox as it's default web-browser. On a tiny distro a lighter web-browser such as BonEcho, Seamonkey etc seems preferable anyway
Lol, there seems to be lot of differing opinions to be heard. Your solution demands the use of different applications in different distros. I wouldn't like to be restricted in that way.

Quote:
Originally Posted by Tom6 View Post
Anyway while it's good to have a separate partition for /home and for linux-swap it's generally better to avoid splitting a drive up into too many small partitions that may each then have a little wasted space that would only be useful if it was all lumped together. 15Gb for a puppy install seems excessive as the basic install only needs 1 or 2 Gb? A bloated distro like Ubuntu will need at least 15Gb if you want to have room to install stuff and try things out but Puppy should work well with a lot less space, especially if you have a separate /home
You are right. I have now about 50GB for every distro - clearly more than enough. Maybe I will reduce their sizes and leave a little empty space for the future. Although I hope I don't end installing more than a couple distributions - 2 or 3 alternatives for normal daily use and 1 with a realtime kernel for music creation.

Quote:
Originally Posted by Tom6 View Post
Good luck and regards from
Tom
Thank you. After this thread I'm starting to settle on the solution that jamescondron suggested: No separate home partitions at all - only one big data partition to be mounted in every distro to /data.

Thanks to everyone!
 
Old 05-24-2009, 07:44 AM   #15
Tom6
Member
 
Registered: May 2009
Posts: 116

Rep: Reputation: 16
Again the old problem of "Good to know that there are options. Unfortunately they are all good options -so hard to choose The Right One." Of course there is only 1 Right Way to do anything in linux and that's your own. In my case i usually find that the best way is my neighbours way, until we both swap styles and then i find my old way was better after all In England we have a saying "The grass is always greener on the other side"

Also the comment "(Btw: I apologize for my english skills ..." was funny because your english skills are better than most people that live around where i live! (i live in england)

Your "50GB for every root partition is maybe too much but at least I don't have to worry about installing too many programs or about fragmentation." is spot on. 50Gb for a root partition is hugely excessive, linux programs tend to be a lot smaller by sharing any common element (such as if 2 programs need access to the same library or codec) rather than just installing a new one each time. This is one reason why linux uses less Ram, it doesn't need multiple instances of the same things open filling up space. Oh and don't worry about fragmentation ever again now you're in linux. Linux writes stuff to the drives a lot more intelligently and doesn't suffer from fragmentation. Windows is awful about security and fragmentation which is why Windows users (including myself when i use Windows as i do sometimes) constantly suffer from problems with both. I would recommend 15Gb at most for each distro's root and then lump all the rest of the drive-space together as one huge /home to be shared by all the distros in the same way they all share the tiny linux-swap partition.

I see that people are saying it's a bad idea to use the same configuration files (what i have refered to as settings or preferences) for different distros but mostly i find that different distros that may have a problem tend to use different packages anyway. I admit i haven't used most of the distros mentioned above and haven't used different puppy or pupets much but the distros i have used; Ubuntu, Wolvix (Hunter & Cub), sliTaz, Kongoni and stuff don't seem to cause conflicts in the way is feared above - indeed they seem to benefit from sharing the same config files. If i find a distro "just doesn't work" on a machine it's often easier just to copy the xorg.conf from a distro that does work and of course copying my old menu.lst ()or large chunks of it) from one distro to the nextis a handy way to kep my boot menu looking the way i like it. I guess i could create a 100Mb partition for /boot but my way works better for me

Hope this helps. Lol, there are countless different ways of organising linux distros and hopefully we each think our own way is the best. I think we can all agree that while we can see potential problems with anyone else's way we could just as easily point out good advantages of anyone else's way too. Certainly any of the suggestions from people above have clear merits. It's worth noting that having set things up one way it's often reasonably easy to change things around a bit later, sometimes it can be tough but possible. I think another thing we can agree on is that it's practically impossible to do anything sensible or interesting with Windows even just with 1 physical drive but that as soon as Windows has a second drive to play with it becomes much more difficult whereas linux allows /home and the linux swap partitions to be on the second drive easily with the performance increases that will inevitably bring but try shifting the Windows equivalents to the 2nd drive needs some highly skilled (and inevitably doomed) registry tweaking.

Lol, have fun and enjoy experimenting around with linux )
Welcome in to linux-land
Regards from
Tom
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to share the swap partition between two installations if I hibernate? Stuart Morrow Linux - Desktop 10 12-02-2014 07:17 PM
Easiest way to share files between two Linux machines anti.corp Debian 5 01-19-2006 04:31 PM
Can't copy files from an SCO Unix System V computer to a Linux computer gnppapas Linux - General 2 11-27-2004 01:39 PM
How to build a network/share files with and XP Computer??? aktiwers Linux - Networking 1 06-03-2004 07:14 AM
easiest way to share internet on a modem ranixlb Linux - Networking 1 05-16-2002 04:36 AM


All times are GMT -5. The time now is 11:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration