Results 1 to 3 of 3

Thread: Mounting folders on startup

  1. #1
    Join Date
    Oct 2007
    Beans
    4

    Mounting folders on startup

    Hi guys

    Really stupid question, but no amount of googling will help me find the answer (GIGO...). Anyways, I'm using two hdds shared between an Ubuntu and Windows install - one for documents, mounted as /media/Data and one with media (original name of /media/Media. Within these are My Documents, My Music, etc, so I've mounted them using

    Code:
    sudo mount --bind "/media/Media/My Music" "Music"
    sudo mount --bind "/media/Data/My Documents" "Documents"
    ...
    Works a charm, but then the links disappear when I restart.

    So my question is twofold:

    1) Is that the best way to achieve what I want to do?
    2) How do I make it mount automagically? I've tried playing with fstab but it's confusing me...

    Cheers
    Nick

  2. #2
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Mounting folders on startup

    the corresponding fstab entries should look like this:

    Code:
    /media/Media/My\040Music       /home/username/Music        auto    bind 
    /media/Data/My\040Documents    /home/username/Documents    auto    bind

    Quote Originally Posted by man fstab
    If the name of the mount point contains spaces these can be escaped as '\040'.

  3. #3
    Join Date
    Nov 2011
    Beans
    2

    Re: Mounting folders on startup

    Quote Originally Posted by sisco311 View Post
    the corresponding fstab entries should look like this:

    Code:
    /media/Media/My\040Music       /home/username/Music        auto    bind 
    /media/Data/My\040Documents    /home/username/Documents    auto    bind
    I tried the --bind command in /etc/rc.local and it didnt work.
    so thanks so much for this answer! it saved my home mediaserver

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •