Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: automatically mount ntfs drives

  1. #11
    Join Date
    Jul 2011
    Location
    now Iran
    Beans
    98
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: automatically mount ntfs drives

    and the uuid:

    /dev/sda5: LABEL="New Volume" UUID="EA72E0A172E0742B" TYPE="ntfs"
    /dev/sda6: LABEL="New Volume" UUID="A4B812A2B81272D2" TYPE="ntfs"
    /dev/sda7: UUID="eee99285-60cf-4f36-8840-1f3c2e43e464" TYPE="swap"
    /dev/sda8: UUID="2673d4b5-31cb-4f8a-8374-0b189b1b0602" TYPE="ext4"

  2. #12
    Join Date
    Sep 2008
    Beans
    277
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: automatically mount ntfs drives

    I would suggest:

    1) Backup /etc/fstab (just in case):

    Code:
    sudo cp /etc/fstab /etc/fstab_backup
    2) edit fstab:

    Code:
    gksu gedit /etc/fstab
    and add the following two lines at the end:

    Code:
    /dev/sda5 /home/your_user_name/WindowsDisk1 ntfs rw,user,umask=007,uid=0,gid=46,nls=utf8 0 1
    
    /dev/sda6 /home/your_user_name/WindowsDisk2 ntfs rw,user,umask=007,uid=0,gid=46,nls=utf8 0 1
    NOTE:
    * Replace "your_user_name" with your actual user name. Of course, you can change the directory names for the mount points to whatever you like.
    * Backing up the data in the partitions before doing this is perhaps not strictly necessary, but it doesn't hurt either.
    * EDIT: as oldfred said below, "uid=1000,gid=1000" will give your user ownership of all files in the mounted partition. With "uid=0, gid=46", the owner will be root. Choose what suits your needs best.

    Hope this helps, good luck
    Last edited by Orange_and_Green; November 30th, 2011 at 05:59 PM.
    鳴かぬなら鳴かせてみようホトトギス

    I love you Aki

  3. #13
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: automatically mount ntfs drives

    These will provide the additional detailed steps:
    HowTo Mount NTFS Partitions Read Write in Ubuntu & Kubuntu
    http://ubuntu.swerdna.org/ubuntfs.html
    Auto mount NTFS Partition
    http://ubuntuforums.org/showpost.php...6&postcount=10

    Entry in fstab is like this with your UUID & mount you made above:
    Window_names prevents the use of invalid windows characters:
    (which are the nine characters ” * / : < > ? \ | and those whose code is less than 0×20)
    UUID=66E4DC83E4DC56C1 /media/Data ntfs defaults,uid=1000,windows_names,umask=000 0 0
    What this will do is mount the partition with owner = root but with read / write permissions ( umask=007 ) granted to all local login users ( gid=46 ).
    /dev/sda2 /media/windows ntfs defaults,nls=utf8,umask=007,gid=46,windows_names 0 0
    EDIT: If you prefer to be the owner then you can also go with this:
    /dev/sda2 /media/windows ntfs defaults,nls=utf8,umask=007,uid=1000,windows_names 0 0
    Hide windows mount with noauto:
    /dev/sda2 /Windows/sda2 ntfs defaults,noauto,umask=777 0 0

    # use whatever names make sense
    sudo mkdir /media/windowssda5
    sudo mkdir /media/windowssda6

    sudo cp /etc/fstab /etc/fstab.backup
    gksudo gedit /etc/fstab
    # put in your entries with your UUID (preferred or /dev/sdX paths)
    # You can copy & paste this into your fstab or adjust paramaters to suit
    Code:
    UUID=EA72E0A172E0742B /media/windowssda5 ntfs defaults,nls=utf8,umask=007,gid=46,windows_names 0 0
    UUID=A4B812A2B81272D2 /media/windowssda6 ntfs defaults,nls=utf8,umask=007,gid=46,windows_names 0 0
    Last edited by oldfred; November 30th, 2011 at 05:52 PM.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.




  4. #14
    Join Date
    Jun 2011
    Beans
    304

    Re: automatically mount ntfs drives

    What should be the options in fstab entry if I want to execute some bash script files from ntfs or fat32 partition?

  5. #15
    Join Date
    Sep 2008
    Beans
    277
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: automatically mount ntfs drives

    Quote Originally Posted by rng View Post
    What should be the options in fstab entry if I want to execute some bash script files from ntfs or fat32 partition?
    umask=0077, rest as in the posts above
    鳴かぬなら鳴かせてみようホトトギス

    I love you Aki

  6. #16
    Join Date
    Jun 2011
    Beans
    304

    Re: automatically mount ntfs drives

    And for fat32 partition, I can replace 'ntfs' with 'vfat'. Is that right?

  7. #17
    Join Date
    Sep 2008
    Beans
    277
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: automatically mount ntfs drives

    Quote Originally Posted by rng View Post
    And for fat32 partition, I can replace 'ntfs' with 'vfat'. Is that right?
    Basically yes, except that for vfat you have to use "utf8" instead of "nls=utf8". Also, for FAT32, you might want to add "shortname=mixed, codepage=850" for short name support.
    鳴かぬなら鳴かせてみようホトトギス

    I love you Aki

  8. #18
    Join Date
    Jul 2011
    Location
    now Iran
    Beans
    98
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: automatically mount ntfs drives

    At last I find a way, I install PYSDM and make both of drives "default"

Page 2 of 2 FirstFirst 12

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
  •