LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   move /home to ntfs partition (https://www.linuxquestions.org/questions/linux-general-1/move-home-to-ntfs-partition-830499/)

mackissack 09-05-2010 03:39 PM

move /home to ntfs partition
 
So, this is the issue...

There was a Toshiba Satellite notebook with XP I decided to install
Fedora 13 in dual boot mode.
So, I booted with Gparted and shrunk the Windows XP partition to just 24 GB.
Then I set up partitions for Linux this way
/boot, ext4 256 MB
/, ext4 16 GB
/home, ntfs 176 GB
swap, 8 GB
I intentionally left about 8 GB left just in case

Then I proceeded to install Fedora 13.
I used the customized mode to use the already set up partitions and keep Windows XP.
At the moment of setting the mounting points, fine with /boot, / and swap. But Anaconda wouldn't accept mounting point for /home.
I went on anyway.

Fedora got set up and run smoothly.
However, /home resided in / with only 10 GB left.
And the /home partition could be seen as a separate disk with its 176 GB.
This is /etc/fstab:

#
# /etc/fstab
# Created by anaconda on Sun Sep 5 05:46:26 2010
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=ec5da2b5-2253-4ead-ae9f-aeb99c3f4f53 / ext4 defaults 1 1
UUID=1840e453-6359-4f0e-807d-d3ef87977738 /boot ext4 defaults 1 2
UUID=22919f7a-cbb5-40ba-b88d-0b4ca0c51eb4 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0


Now, my goal.
Send native Fedora /home currently in / to the /home ntfs partition so I can share both Windows XP My Documents files and my user files.
By the way, Windows recognizes that ntfs partition and called it E:\

Any suggestion? It will be joyfully appreciated.

acid_kewpie 09-05-2010 04:09 PM

why would you ever want to put your /home on a non-posix compliant filesystem?? that's a *really* bad idea. You can't set file ownerships correctly, permissions... it's really horrible. just have a separate location, e.g. /shared or /home/user/shared for that mountpoint.

mackissack 09-05-2010 11:27 PM

Quote:

Originally Posted by acid_kewpie (Post 4088888)
why would you ever want to put your /home on a non-posix compliant filesystem?? that's a *really* bad idea.

Didn't know that. Thank you.
1st, I made the /home partition to separate data from system so I can upgrade OS without affecting data.
2nd, what is another way of sharing the /home partition with Windows to have one same place for personal files?

I have been studying and read Windows doesn't recognize ext4 partitions.
But Fedora seems not to recognize ntfs partitions either.
So, how to solve it?

acid_kewpie 09-06-2010 02:52 AM

Well the old school answer would be to use a fat32 partition, but fedora these days can read ntfs really quite well with the ntfs-3g driver (I think). I recently got a new laptop and in the process of nuking Win7 and installing FC13 the Fedora live CD picked up all the windows partitions just fine. So you can have a common area for data, but this should not just be /home completely. Fedora will create the ~/Documents, ~/Downloads stuff and they certainly can live wherever you want.

djsmiley2k 09-06-2010 02:57 AM

What I used to do was have a windows section mounted within my home as ~/windows
which was where I dropped files between the two systems.

Code:

mkdir ~/windows
mount -t ntfs-3g /dev/windowsDrive /home/$user/windows

and then simply access it this way.

xmarvelous 09-15-2010 06:35 AM

Quote:

Originally Posted by acid_kewpie (Post 4088888)
why would you ever want to put your /home on a non-posix compliant filesystem?? that's a *really* bad idea.

I don't think so. I'm using this setup for over 6 months now without any problems. If you are not completely paranoid about setting custom permissions for every single file in your home folder the NTFS-3G driver does a terrific job by now. absolutely suitable for a single user system.

I wrote a tutorial on how to set it up:
http://www.marvelous.at/?p=148

i92guboj 09-15-2010 11:11 AM

If you don't have big security concerns sure it's possible. I'd try the reverse though, and use ext3 on Windows.

In any case, remember that ntfs3g allows file names containing characters that are not legal in at least some versions of Windows (like ':'), so if you use non-conventional file names and Windows fails to open some files you know what the problem is.

To do this you just have to copy the contents from the actual /home into your ntfs partition, then mount that partition at /home. Then just modify /etc/fstab so it is mounted automatically at boot time. You will have to read the ntfs3g man page(s) and make sure you set the right options, security will probably be an issue in one or another way.

xmarvelous 09-16-2010 02:38 AM

Quote:

Originally Posted by i92guboj (Post 4098379)
In any case, remember that ntfs3g allows file names containing characters that are not legal in at least some versions of Windows (like ':')

in recent NTFS-3G versions there is a mount option called 'windows_names' to deal with this issue.

http://www.tuxera.com/community/ntfs-3g-manual/

i92guboj 09-16-2010 02:40 AM

Quote:

Originally Posted by xmarvelous (Post 4099120)
in recent NTFS-3G versions there is a mount option called 'windows_names' to deal with this issue.

http://www.tuxera.com/community/ntfs-3g-manual/

Wonderful, if that really works I guess I can finally phase out my file name checker script. Thanks for the pointer.

xmarvelous 09-17-2010 04:47 AM

Quote:

Originally Posted by i92guboj (Post 4098379)
I'd try the reverse though, and use ext3 on Windows.

NTFS-3G exceeds all Ext2 drivers for windows (Ext2fsd & Ext2IFS) by far in terms of stability and reliability. NTFS-3G even supports partially journaling. In my opinion ext2/3 on Windows is the risky way.

mackissack 09-18-2010 11:58 AM

Quote:

Originally Posted by xmarvelous (Post 4098117)
I don't think so. I'm using this setup for over 6 months now without any problems.

I wrote a tutorial on how to set it up:
http://www.marvelous.at/?p=148

Thank you, xmarvelous.
That's what I was looking for.
I am studying your tutorial.

Now I am getting acquainted with these UUIDs and so.
I actually reinstalled the system asigning /boot, /, /var, /tmp, /usr and /home to their own partitions. Works OK.
This was the array:
/boot, 256 MB
/, 1 GB
/var, 12 GB
/tmp, 2 GB
/usr, 8GB
/home, ext4 rest of the disk
I did this to prove the mounting points.

Now I have to redesing the ext4 /home partition I created in this new installation and apply your suggestions.

Quote:

Originally Posted by xmarvelous (Post 4098117)
If you are not completely paranoid about setting custom permissions for every single file in your home folder the NTFS-3G driver does a terrific job by now. absolutely suitable for a single user system.

What do you mean by that of custom permissions for every file?

xmarvelous 09-19-2010 03:34 AM

Quote:

Originally Posted by mackissack (Post 4101871)
What do you mean by that of custom permissions for every file?

I'm just saying that you can only set permissions for all files within the filesystem globally at mount time.

Usually you want to restrict permissions of certain files. For instance it would be a bad idea to let other users read your private keys in ~/.ssh. So maybe you want to set these files rwx------. Further that would mean that the rest of your home folder has the same permissions as well and is therefore not accessible by any other user.

You just have to think about that very carefully if your machine is accessed by multiple users.


All times are GMT -5. The time now is 09:30 AM.