Howto auto-mount windows-partitions using /etc/fstab

Hello what do I have to write in the file "/etc/fstab" to get my windows-partition (/dev/sda3) automatically mounted on startup ?

I get this error-message (clicking on the bookmark for the partition in nautilus):

    Error mounting: mount exited with exit code 1: helper failed with:
  Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://ntfs-3g.org/support.html#unprivileged

My fstab looks like this:

> # /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sdb6       /               ext4    errors=remount-ro 0       1
/dev/sda3   /media/Jonas    ntfs    rw,auto,users,nls=utf8,umask=007,gid=46  0  0

# swap was on /dev/sdb7 during installation
UUID=9dcdfad2-4e66-416e-bf68-142afe23fa0b none            swap    sw              0       0

I created the folder /media/Jonas and the partition is /dev/sda3. What did I wrong ?

Solution: After rebooting, it worked well. Strange.


Assume you are sure about: - Your created directory is /media/Jonas (with uppercase J) - Your ntfs partition is /dev/sda3 (you can find this out by issuing sudo blkid)

My fstab uses a simpler form:

/dev/sda3   /media/windows  ntfs    defaults    0   0

You may change your "rw,auto, ...." to "defaults"


I will add a little more info to the subject.

If not installed, I recommend to install ntfs-3g to allow r/w the ntfs partitions.

apt-get install ntfs-3g

Also, to make the install 'device independent', use the UUID received from the blkid utility instead of referencing a physical device.

root:~ blkid
...
/dev/sda1: SEC_TYPE="msdos" LABEL="boot" UUID="140A-14B7" TYPE="vfat" PARTUUID="0009bf4f-01"
/dev/sda2: UUID="f24a4949-f4b2-4cad-a780-a138695079ec" TYPE="ext4" PARTUUID="0009bf4f-02"
/dev/sdb1: LABEL="Western Digital" UUID="1C0EBC7A0EBC4F10" TYPE="ntfs" PARTUUID="0002f5f9-01"
...

then, as usual, create a mounting point, for example \wd and edit /etc/fstab inserting the following line:

..
UUID=1C0EBC7A0EBC4F10  /wd  ntfs-3g  defaults  0 0
..

you can try to mount the new device without reboot with mount -a.

To avoid data corruption, if your need to remove the device, make sure you umount (umount /wd in this sample).