2

Can's get a window's directory to mount due to an apostrophe. The relevant bit of fstab:

# Auto-mount windows drive
UUID=0C1C51021C50E86A /media/windows ntfs defaults 0 0

# Auto-mount the Music folder
/media/windows/Documents\040and\040Settings/Foo\040Name/My\040Documents/My\040Music/Foo's\040Music /home/foo/Music none bind 0 0

Note that I'm using the \040 to escape spaces, but man ascii doesn't (from what I see) have an escape character for a '. I've tried \047 to no avail

Thoughts?

2
  • can you post the output or errors you get when you try mounting that manually as root? sudo mount /home/foo/Music Sep 26, 2012 at 22:15
  • user flagged that they no longer have this computer - closing this for now.
    – fossfreedom
    Sep 29, 2012 at 6:27

2 Answers 2

2

I've used 047 for apostrophe. It worked.

/home/anwar/Anwar\047s\040Pictures /mnt none bind 0 0

I think, you should check the syntax. The folder in my home is "Anwar's Pictures". It is mounted in /mnt.

Check this page.

Your line should be

/media/windows/Documents\040and\040Settings/Foo\040Name/My\040Documents/My\040Music/Foo\047s\040Music /home/foo/Music none bind 0 
2
  • Hm. This works properly when doing mount -a, but at boot it does not work. I did modify your command to make the end 0 0 instead of just one 0
    – Hamy
    Sep 27, 2012 at 18:19
  • Any chance you have the exact line you used? I'm wondering if the late option would help here, but I can't find any documentation on it
    – Hamy
    Sep 27, 2012 at 18:32
-1

Instead of doing this in your fstab file, you can use a symbolic link that will work whenever the windows partition is mounted. You can create that with the following command:

ln -s "/media/windows/Documents and Settings/Foo Name/My Documents/My Music/Foo's Music" /home/foo/Music

Note the double quotes will make the spaces work properly - much simpler than the mount method.

[updated question since using 'bind' as an option with a folder is valid, thanks neon_overload]

3
  • He's using a mount of type bind which is designed to mount a folder rather than a partition. Nonetheless your suggestion for a symbolic link may still be a useful alternative. Sep 26, 2012 at 4:27
  • It may be - I'm under the impression that the symbolic link may have issues with the partition being mounted at boot (I've used symbolic links extensively on one partition, but not as much across partitions). If this isn't the case, would it be better in any way to use one approach over the other?
    – Hamy
    Sep 26, 2012 at 22:12
  • symbolic links (specified by the "-s" option) can cross partitions, though regular "hard" links would have problems with that. Sep 26, 2012 at 22:17

Not the answer you're looking for? Browse other questions tagged .