LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-28-2010, 11:07 AM   #1
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Rep: Reputation: 16
Need help linking user folders to ntfs folder


Hi everyone;

Not sure if this i the right forum, please let me know if I need to post elsewhere.

First, here are my system specs:

HP DV 2808
250 gig SATA drive
4 gig DDR
Nvidia 7150 mobile
Windows 7
Fedora 12

I have my HP DV2000 laptop configured to dual boot Win 7 and Fedora. What I would like to do is mount the Windows folders, (Documents, Music, etc.) automatically in my Fedora home folders.

I have done/tried the following:

1: identified my partitions:

[root@phoenix]# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x90909090

Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 6375 51097600 7 HPFS/NTFS
/dev/sda3 6375 26644 162816000 7 HPFS/NTFS
/dev/sda4 26645 30401 30178102+ 5 Extended
/dev/sda5 * 26645 26670 204800 83 Linux
/dev/sda6 26670 30401 29972479+ 8e Linux LVM

2: created a mount point:

[bill@phoenix ~]$ mkdir /home/bill/D

3: edited /etc/fstab to include the following:

/dev/sda3 /home/bill/D ntfs defaults,noatime 0 0

4: made a soft link to the folder:

ln -s /home/bill/D/Libraries/Documents /home/bill/Documents

This works, however, it gives me a shortcut to the directory, instead of mounting all of the data in the folder, like I want.

When I try this way:

ln -s /home/bill/D/Libraries/Documents /home/bill

I get the following:

[root@phoenix ~]# ln -s /home/bill/D/Libraries/Documents /home/bill
ln: creating symbolic link `/home/bill/Documents': File exists

Any suggestions?

Thanks

zog
 
Old 03-28-2010, 05:11 PM   #2
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
man mount (in particular the "-bind" option) should help here
 
Old 03-28-2010, 05:41 PM   #3
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Quote:
Originally Posted by zogthegreat View Post
4: made a soft link to the folder:

ln -s /home/bill/D/Libraries/Documents /home/bill/Documents

This works, however, it gives me a shortcut to the directory, instead of mounting all of the data in the folder, like I want.
What means "mounting all of the data in the folder"? and how's different of "giving a shortcut to the directory"?

Quote:
Originally Posted by zogthegreat View Post
When I try this way:

ln -s /home/bill/D/Libraries/Documents /home/bill

I get the following:

[root@phoenix ~]# ln -s /home/bill/D/Libraries/Documents /home/bill
ln: creating symbolic link `/home/bill/Documents': File exists
The "file" _do_ exists. This second command has exactly the same result of the first one, it wants to create a "/home/bill/Documents" soft-link to "/home/bill/D/Libraries/Documents". But because you've already created that "/home/bill/Documents" symlink, the second command fails with "File exists" error
 
Old 03-29-2010, 12:16 PM   #4
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Hi Woodypecker,

Thanks for the tip, here is what I did:

1: Made a mount point in /media;

mkdir /media/d

2: edited my /etc/fstab with the following;

/dev/sda3 /media/d ntfs-3g rw,noatime,umask=0000 0 0

3: ran the following command;

mount --bind /media/d/Libraries/Documents /home/bill/Documents

This work perfectly!

Now my problem is I am trying to make the mount permanent, I have tried to do so with;

mount --make-unbindable /media/d/Libraries/Documents /home/bill/Documents

However, this is what I get as my output;

[root@phoenix ~]# mount --make-unbindable /media/d/Libraries/Documents /home/bill/Documents
mount: wrong fs type, bad option, bad superblock on /media/d/Libraries/Documents,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

So I tried to make a startup script with the following;

#!/bin/bash
# chkconfig: 345 91 19
# description: mount NTFS on startup

case $1 in
*)

echo “Mounting Windows 7 NTFS Filesystem to /media/d”
mount --bind /media/d/Libraries/Documents /home/bill/Documents

esac
exit 0

and the did the following;

cp /opt/ntfs/mntntfs /etc/rc.d/init.d
cd /etc/rc.d/init.d
chmod +x mntntfs
/sbin/chkconfig --add mntntfs

however, I got this error;

[root@phoenix init.d]# /sbin/chkconfig --add mntntfs
service mntntfs does not support chkconfig

Any suggestions?

Thanks

zog

btw, do you know how a can set this up so that the drive icon does not appear on my desktop?

thanks
 
Old 03-29-2010, 12:25 PM   #5
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Found my problem with the script, forgot to save it as a .sh, changed it from mntntfs to mntntfs.sh, work fine now.

Did a temporary fix by using Configuration Editor > Apps > Nautilus > Desktop > Volumes Visible, however, I would just like the "D drive" icon not to show, if I mount other volumes, I would like them to show up on the desktop. Any suggestions?

zog

Last edited by zogthegreat; 03-29-2010 at 12:30 PM.
 
Old 03-29-2010, 12:42 PM   #6
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
SOLVED: Need help linking user folders to ntfs folder

Ok, did some more googling on the problem and found the following:

"Showing volumes (which is what the windows manager, calls them) is an 'all-or-nothing' proposition. Any partition mounted in /media will be displayed if the setting is enabled. You can hide the hard drives by moving the mount point to /mnt or some other folder. Partitions not mounted in /media won't be shown on the Desktop by default. They also will not be shown in Nautilus' Places, you will have to make a shortcut for them."

Made a new mount point in /mnt, edited my /etc/fstab to reflect this change and then the same for the script. Everything working perfectly now!

Thanks again to Woodypecker for the advice.

zog

Last edited by zogthegreat; 03-29-2010 at 02:33 PM.
 
  


Reply



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
Trouble linking 2 folders villumanati Linux - Newbie 2 11-24-2008 10:55 AM
Folder linking in proftpd? Moriya Linux - Newbie 4 05-07-2008 11:21 PM
linking folders war1025 Debian 3 01-15-2007 07:43 PM
Trying to copy a user folder from ntfs hd that is locked. bluedevlx Linux - Security 1 05-18-2005 02:28 PM
Linking Folders into /etc/skel otisthegbs Linux - Software 0 11-24-2003 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration