1

There are questions similar to this one, but I am not an expert Unix user so I really don't wanna try and break /etc/fstab while doing this. Here's what blkid tells me about my hard drive:

/dev/sda1: LABEL="X" UUID="9C4A70404A7018EA" TYPE="ntfs" PARTUUID="7d4613d7-01"

I always mount my drive at /media/pi/X, it is formatted in NTFS and I need both read and write permissions on it. The drive's UUID is 9C4A70404A7018EA and my useridis 1000. I know this post is very redundant, but I really cannot mess this up.

I've read this post from askubunto.com, so I know that a common setup is of this kind:

UUID=<uuid> <pathtomount> <filesystem> defaults 0 0

However, I do not understand some parts and would rather play it safe. Thanks in advance.

6
  • Have you installed ntfs-3g, because you will need that to write to the disk? Commented Jan 12, 2020 at 12:25
  • Yeah, since there's no native support I had to install it early on.
    – zeval
    Commented Jan 12, 2020 at 12:42
  • What is your OS? if it is Raspbian, why are you looking on an Ubuntu site? have you seen this Raspberrypi.org document?? Commented Jan 12, 2020 at 12:49
  • I am running Raspbian, figured it wouldn't be so different. Thanks for the link. I already knew that I was just looking for confirmation on how the new line at /etc/fstab would have to be formatted. Thanks again.
    – zeval
    Commented Jan 12, 2020 at 17:39
  • @MichaelHarvey Buster does not need ntfs-3g installed to write to it, it can be done with the stock image/install. Commented Feb 9, 2020 at 17:15

2 Answers 2

2

I know you are trying to replace an automount.

fstab is confusing, the documentation for mount is somewhat clearer.

If you are happy with the way automount works I suggest you let your system automount, then issue the mount command and copy the settings.

The following is a line from my fstab. I use noauto and manually mount, but if you want to mount on boot you should use nofail

UUID=4AF49046F4903663       /mnt/SeagateNTFS     ntfs   rw,noauto,relatime,umask=22,uid=0,gid=0,nls=utf8    0   0

I would recommend against mounting in /media which is (ab)used by automount.

PS I rarely use NTFS, and you should probably use ntfs-3g if planning to write.

2
  • I have to say, I formatted my USB external hard drive to ext4 to take complete advantage of the RPI4's USB-3 and gigabit Ethernet capability. Using NTFS it was woefully slow as a shared drive using Samba, but with ext4 I can get transfer speeds of 900 to 1000 Mbit/sec. Commented Jan 13, 2020 at 12:23
  • Thank you that's actually really well explained. I like the way auto-mount works, and I am indeed planning on writing on the drive, so should I replace ntfs-3g with ntfs in the line? Using nofail instead of noauto exactly where noauto is? Also, is it okay to use the rest of your line exactly as it is? Thank you!
    – zeval
    Commented Jan 13, 2020 at 12:28
2

This is the line in my /etc/fstab for a Toshiba Canvio 1 TB usb drive. Your UUID and mount points will be different.

UUID=A0027BBF027B994C /media/pi/Toshiba ntfs-3g defaults,auto,umask=000,users,rw,nofail 0 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.