LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 01-17-2007, 04:47 AM   #1
koady
LQ Newbie
 
Registered: Oct 2006
Location: Berlin
Distribution: Ubuntu Edgy, Debian Etch, Sidux
Posts: 13

Rep: Reputation: 0
Post Using a partition for multiple distro home directories


Hi, I have a number of related questions:

(1) I have a multiboot system with WinXP, Ubuntu Edgy (6.10), Debian Etch, and one another distro. At present I have a separate "/home" partition for some of these, but I have read about a more elegant solution which I would like to implement. I want to mount a separate 'ext3' partition to where I can move the contents of the "/home" directory for each linux distro. When moving the "/home" directory I would rename it which would result in a partition with, for e.g.: "/homeUbuntu", "/homeDebian", "/homeLinuxOS1", "/homeLinuxOS2". After this, the idea would be to remove the "/home" directory from each of the OS's and then use a 'symlink' ("ln -s"), naming it "home", to replace the "/home" under each OS "/", and which would point to the "/homeLinuxOS1/user_name" folder, for e.g., with all the config files on the separate ("home data") partition.

Has anyone tried this? Does anyone have any advice? I actually have this working for one distro. Note, this is not a question about sharing a single "/home" directory for multiple systems, but having multiple "/home" config directories on a single "data" partition rather than each on a separate dedicated partition.

It seems to me to be a nice solution to having many partitions (i.e. dedicated to a "/home" partition) as well as allowing for easy adjustment of partitions (adding, removing, changing) as well as installing upgrades and/or new distro's (given that the linux release cycles are currently at 6 months, or more frequent). I moved from micro$oft and my experience with Debian distro's has been excellent and I like to keep them running, or try new releases from time to time, without having to lose all those config files!

(2) Where would be the best place to mount such a partition (as described above)?
E.g.:
"/data" (i.e. a custom mount point in the file system), OR
"/mnt/data", OR
"/media/data" (in Kanotix for e.g. I could only get this to work under "/media/..")

Does it matter where the partition is mounted?

(3) Related to messing around with reinstalling distros, how can I reinstall grub efficiently? I know of two ways: (i) use the LiveCD installation, (ii) boot from LiveCD and use the console to run: "grub" > "root" > "setup".

I want to be able to restore a full image backup of the distro "/" partition and then reinstall grub so that it automatically lists the other bootable systems. Should that be possible, or do I have to edit the "menu.lst" anyway? [Note, I have grub installed to the MBR with on (hd0) with WinXP on (hd0,0)]

Sorry for the long post, but the issues are related. Thanks to anyone who can give me any ideas...

koady
 
Old 01-17-2007, 09:27 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,770

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
I'm getting a headache thinking about this.

Quote:
(1) I have a multiboot system with WinXP, Ubuntu Edgy (6.10), Debian Etch, and one another distro. At present I have a separate "/home" partition for some of these, but I have read about a more elegant solution which I would like to implement. I want to mount a separate 'ext3' partition to where I can move the contents of the "/home" directory for each linux distro. When moving the "/home" directory I would rename it which would result in a partition with, for e.g.: "/homeUbuntu", "/homeDebian", "/homeLinuxOS1", "/homeLinuxOS2". After this, the idea would be to remove the "/home" directory from each of the OS's and then use a 'symlink' ("ln -s"), naming it "home", to replace the "/home" under each OS "/", and which would point to the "/homeLinuxOS1/user_name" folder, for e.g., with all the config files on the separate ("home data") partition.
I think it would be best to leave the /home directories in place in each distro to serve as the mount point for the new /home partition. Just move the contents to the new directories on the new /home partition. Then, within each distro: symlink /homeUbuntu to /home/<username>; symlink /homeDebian to /home/<username>, etc.

Then edit /etc/fstab in each distro to add the new partition and mount point:
/dev/hd? /home ext3 <mount parameters> 1 2

An alternative would be to have a different username in each distro, put their respective /home contents into the new home partition (/home/Ubuntu-user, /home/Debian-user, etc.

Edit /etc/fstab in each distro to add the new partition mounted to /home as described above. Then, when any one of the distros is booted, you would see all of the user directories under /home.

Sounds much easier that way. No need to mess with symlinks.

Last edited by bigrigdriver; 01-17-2007 at 09:31 AM.
 
Old 01-18-2007, 09:12 AM   #3
koady
LQ Newbie
 
Registered: Oct 2006
Location: Berlin
Distribution: Ubuntu Edgy, Debian Etch, Sidux
Posts: 13

Original Poster
Rep: Reputation: 0
Your advice about the more simple solution (use different login names for each linux distro) makes good sense. Is there a reason you suggest this? Just for simplicity? (note: sorry about the headache when reading my post, I could have been a bit clearer describing what my intentions were.) Are you suggesting that there is something problematic about using symlinks in this case? Also, in theory isn't possible to mount a data partition anywhere with the user_name config files, or /home directory on it, and use a symlink to set it up? Thanks for your help.
koady
 
Old 08-18-2007, 01:24 AM   #4
clinto
LQ Newbie
 
Registered: May 2007
Location: Pittsburgh
Distribution: ubuntu, xubuntu, debian
Posts: 8

Rep: Reputation: 0
Don't you love that? Lol Sorry, this is a little late, but I thought I'd point out the way I've done things.

I just made a separate partition using the ext3 filesystem. Then, in each distro, I've created a directory to mount the partition to and edited my fstab so that it would automatically mount to that partition. Instead of saving stuff to different /home partitions, I just access this other partition. Isn't that a lot more simple?

On top of it, you can get the ext2 to ntfs driver for Windows which will allow you to access the ext3 partition, and lets you give it a drive letter. I've nicknamed this partition USV for Universal Share Volume.

When I started out, I thought I could just use one /home partition and share it with all other distros. Doesn't work. Different distros need different directories and files in the /home directory. It causes conflict.

I'm now trying to figure out permissions.

By the way, I have XP Home on one hard drive, then I partitioned a second hard drive to house 3 different distros, Ubuntu, Debian, and I'm in the process of installing Gentoo. Slackware seems pretty interesting. I wanted to put it on my laptop, but my hard drive just died

Last edited by clinto; 08-18-2007 at 01:27 AM.
 
  


Reply

Tags
boot, debian, home, move, multiple, partition


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
Change text in multiple files in multiple directories vivo2341 Linux - General 5 11-27-2006 08:16 PM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
mulit distro /home partition? (KDE | SuSE & Kubuntu) dutler Linux - Distributions 3 05-27-2006 06:18 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 05:25 PM


All times are GMT -5. The time now is 08:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration