PDA

View Full Version : [ubuntu] /home mounten to ext2 filesystem in a file on a ntsf network drive


abebakker
June 26th, 2009, 02:38 AM
I want to mount my /home directory to a NTFS partition on my windows 2003 server.
So this is what I have done .

I created a fie on my NTFS share and created a Linux Filesystem within the file:

cd /path/to/windows2003/share
dd if=/dev/zero of=linuxfilesystem bs=4096 count=10000000
sudo mkfs linuxfilesystem

Then I mounted it as my newhome

sudo mkdir /mnt/newhome
sudo mount -o loop /path/to/NAS/storage/linuxfilesystem /mnt/newhome


I copied the data from /home to /mnt/newhome



cd /home/
find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/

And set the right security.

chown -R username:username /home/username
chmod 644 /home/username/.dmrc
chmod 644 /home/username/.ICEauthority

Then I modified the FSTAB file:

gksu gedit /etc/fstab
Wijzig het mountpoint van /home
# Entry for /dev/sda7 :
/path/to/windows2003/share/linuxfilesystem /home ext2 loop 0 0


sudo mount –a

So far so good. But if I reboot the PC he says that he can't find my /home directory.
When I logon to a failsafe terminal and do a Sudo mount -a, logoff and logon again everything works fine.

Why does the /home directory not mount automatic on boot?