PDA

View Full Version : problem moving /home



pavelthesecond
26th May 2008, 03:53 PM
I currently have fedora installed onto a single partition and I wanted to move the /home to a second partition. I'm already using that second partition as a shared drive between fedora and vista hence the reason for two entries in the fstab file.

After reading half a dozen guides here is what I did:


mount /dev/mapper/nvidia_jbbjcefbp4 /mnt/data -t ntfs-3g -rw -o umask=0000
init 1
cd /home
cp -ax * /mnt/data/fedoraHome
mv /home /oldHome
mkdir /home
mount --bind /mnt/data/fedoraHome /home

then I added the following two lines to fstab:


/dev/mapper/nvidia_jbbjcefbp4 /mnt/data ntfs-3g rw,defaults,umask=0000 0 0
/mnt/data/fedoraHome /home bind defaults,bind 0 0


after I restart fedora flashes between the login screen with no usernames listed on it, and the console. Only thing I can do is turn it off. I rebooted into runlevel 3 and checked that /home does indeed mount properly. Any ideas why its not working?

thanks,
Pavel

A.Serbinski
26th May 2008, 04:19 PM
What could possibly have possessed you to use ntfs?



You're remounting a subtree of an ntfs as your linux home directory. The two filesystems do NOT share file permissions, which I will assume is the cause of the failure.

You have two choices to resolve this problem;
1) reformat the partition using a proper filesystem, like ext3 (windoze can use ext2/3 http://www.fs-driver.org/),
or 2) create a second partition on the fakeraid device and use a proper filesystem, like ext3.

pavelthesecond
26th May 2008, 04:41 PM
i used ntfs because i duel boot with windows and it seemed easier to get fedora to read an ntsf partiton then the other way around. I've tried fs-driver but so far its not mounting my original linux partition (and running mountdiag says it could not find out why).

I'm the only user on this machine so can't I just tell linux to ignore the permissions and mount anyway?

stevea
26th May 2008, 04:47 PM
Check the file ownership of the various home directories (ls -l //mnt/data/fedoraHome)
I may be wrong but I don't think the ntfs via ntfs-3g supports compatible ownership and permissions w/ Linux.

The ntfs-3g man page says
Access Handling and Security
By default, files and directories are owned by the effective user and group of the mounting
process and everybody has full read, write, execution and directory browsing permissions.
If you want to use permissions handling then use the uid and/or the gid options together
with the umask, or fmask and dmask options.
--
So as I read it the entire volume has ONE uid and one gid based on mount parameters. You cannot use that for a /home directory. The Linux pam modules will, by default, prevent a login unless the new user owns his home directory.

Also fwiw I'd suggest you access ext2/3 from Windows for a shared partition. There are several ext2ifs
for Windows. In my experience the ext2ifs work vary well - the ext2's appear as normal Windows partitions and all the utilities and exporer features work with these.

stevea
26th May 2008, 04:52 PM
http://ubuntuforums.org/showthread.php?t=358241
http://ext2fsd.sourceforge.net/

pavelthesecond
26th May 2008, 05:15 PM
ok thanks for the help. I will try to reformat my shared partition into ext3 and move /home to there.