Im trying to set up my computer to dual boot Vista and Ubuntu, but in a trickier way this is my partition set-up:
<Vista (NTFS)> <Data (NTFS)> <Linux (ext3)> <swap (swap)>
Basically I would like both Vista and Ubuntu (using ntfs-3g) to have access to my data partition, which will serve as my central storage space for my files. The trick is, I want Linux to treat the data partition as its /home directory so that all default save directories for applications and everything revert to my data partition instead of the root volume. I know there are some guides on the net, but I found them to be confusing. Could someone walk me through this?
Some of the guides I found.
http://www.funtoo.org/en/articles/linux/partitioning/1/
http://ubuntu.wordpress.com/2006/01/29/move-home-to-its-own-partition/
http://www.go2linux.org/how-to-move-home-directory-to-another-partition
http://linuxmint.com/wiki/index.php/Move_home_to_its_own_partition
Thanks for any help!
-
I'm not sure if that's a great idea. NTFS doesn't support the same user permissions and such that are necessary for Linux... that being said, it's not a terribly difficult procedure. The first thing you want to do is get your data partition up and mounting automatically under Linux. You have to do all the next steps as root, or use sudo in front of the commands. Have it mount at /media/data or whatever. Next step is to "cp -a /home/* /media/data" and make sure everything copies. I would then suggest doing "mv /home /oldhome" and then "mkdir /home". Then you go into your fstab, and put a line in that'll be something similar to this: "/dev/sda2 /home ntfs-3g defaults, auto 0 1". That will mount your sda2 partition as the /home directory. If all goes to plan, a reboot will have you using the data partition as your /home. I'm assuming, going off of your partition list above that sda2 is the partition that's currently the data partition. If it's not, adjust accordingly.
Be careful doing this... there's nothing protecting the files under Windows, so you could EASILY nuke your system configuration. Keep the oldhome directory around... if something breaks, you should be able to boot into Recovery Mode under ubuntu, and then do the reverse of what we did above... remove or comment out the line in /etc/fstab (a # in front of the line comments it out), and then "rmdir /home" and "mv /oldhome /home".
I can't guarantee you it'll work... it's an interesting experimentIf it's going to work, the steps I gave you are how you would do it, and how you would fix it if it doesn't work.
Post back if you have any problems! -
I'll try that out. Thanks!
-
Well that didn't work out well... for some reason Ubuntu failed to find my home directory; needless to say, the OS got hosed in record time. I followed these directions but I suspect I did something wrong along step 1) or 4).
1) Get Data partition to mount automatically.
Shouldn't it mount automatically after I first do step two?
2) Mount Data partition at media/Data ;
sudo mkdir /media/Data
sudo mnt -t ntfs /dev/sda2 /media/Data
Question: What does the -t do? Also, do I use the "ntfs" or "ext3"?
3) Copy the /home folder to the newly mounted folder (which resides in the sda2 partition)
sudo cp -a /home/username /media/Data
Question: Don't I need to copy over symbolic links and all that stuff?
4) sudo mv /home /oldhome
Question: Which home folders do these two folders above refer to?
5) sudo mkdir /home
Question: Why are we doing this, out of curiousity?
6) Open fstab, add the following:
/dev/sda2 /home ntfs-3g defaults, auto 0 1
Could step 6) have been the problem? -
Sorry.
-
Damn, bc, to think I feel clever just getting any Linux system up and running at all! LOL
Good luck with this. -
I'll try again tomorrow, too tired of Ubuntu tonight. -
Just noticed your User Title: excellent.
Sudo install Gentoo because I'm too damn dumb
/Runs off to Sudo install (I hope!) Slackware along with Suse/Ubuntu -
sudo mkdir /home
Where do I make this /home folder? Can you explain the purpose of this command in greater detail?Wow this is making me feel like an idiot.
So this step lets Ubuntu find the /home folder by looking under sda2?
My problem began when I logged in, receiving an error stating something to the effect of "/home not found, trying to log in as root." When that failed, I couldn't login at all.
EDIT: I think I found something in this guide (the part that uses the same command as step 5):
http://ubuntu.wordpress.com/2006/01/29/move-home-to-its-own-partition/
It might explain the purpose of recreating the /home directory. Basically you're recreating the /home folder that was copied to the other partition, but then you are mounting the partition under the /home folder. Is that correct? So, in the end how many mountpoints are created in this setup? Three? -
Exactly. And you should only be "creating" one mountpoint, /home.
And when you "mkdir /home", that makes the folder "home" under the root "/" of the system. Hence, "/home". You can reference any folder specifically by starting it with / ("cd /etc/X11/" and whatnot). -
do this:
Code:sudo ln -s /media/Data /home
-
Solarex, sorry I think the symbolic link is a horrible kludge and not the right way to go about creating a new /home filesystem.
The creation of a temporary mount point such as /mnt/newhome and then the manual mount of a new partition on to that mount point is supposed to be temporary, because the mount is only there so that data can be copied from the original /home directories to the /mnt/newhome directories.
Once the /home data has been copied, the new partition should be umounted.
It also worries me that much of this activity is being performed with the system running in a multi-user mode, which is not such a great idea from a data integrity point of view if you have any users logged in and updating files in their home directories! -
-
-
Me, I would have 4 partitions, Vista NTFS, Linux EXT3, /Home EXT3, /Data NTFS
EDIT...the above won't work because of /Swap....maxxed at 4 partitions....you can share off your Vista partition in Linux, same thing -
Could someone summarize the instructions please? I really appreciate your help, but I'm lost again.
Also, after moving the /home folder to /old_home, none of my applications start, which, I think, means that I need to invoke a permanent root command (ie, switch to root instead of just using it). What command has this function? -
1. What partitions do you have? To list them type the following (note: -l is a minus sign followed by a lowercase 'L':
Code:sudo fdisk -l
Code:mount
Code:cat /etc/fstab
Moving /home to its own partition
Discussion in 'Linux Compatibility and Software' started by Bog, Mar 17, 2008.