Permanently mounting a USB HD problem

May 08, 2020 5 Replies

I have a 160Gb spinning disk in a USB enclosure attached to my pi4. I can mount it temporarly by: sudo mount -t vfat /dev/sda1



When I run blkid to get the UUID, I get: /dev/sda1: LABEL="sda1" UUID="**********" TYPE="ntfs" PTTYPE="dos" PARTUUID="**********"



What exactly do I enter in the /ect/fstab file. I've just tried the UUID with the = and quotes etc, but I am getting parse errors when running sudo mount -a.



Thanks


Are you sure its a vfat disk? blkid seems to be telling you that is ntfs

More to the point, what format do you *want* it to be and how are you intending to use it?

IOW, do you want to use it to transfer data from Windows to the Pi or vice versa, or are you going to reformat it as ext4 and use it as the Pis main storage?

Martin | martin at Gregorie | gregorie dot org

Copying from one of my fstab files the format should be:

PARTUUID=xxxxxxx /mountpoint filesystemtype auto,nofail,defaults

no quotes, no spaces between the options, the nofail prevents boot hanging if the external drive isn't plugged in. This should solve the parse errors. You will still need to determine the actual filesytemtype to mount. That should however be a different error.

MArtin

Thanks, that did it. I was using the UUID as well as the PARTUUID , along with quotes. Doh!

I think I use UUID, without quotes, successfully, it's not mounted at the moment so I didn't post.

As a matter of interest, I found ntfs performance slow, and switched to ext4. I think it was slow writing.

UUID=2be84ecd-556e-488c-a832-67c49114a06c / ext4 discard,nodira time,noatime,errors=remount-ro 0 1

Is a typical line from an fstab.

"I guess a rattlesnake ain't risponsible fer bein' a rattlesnake, but ah puts mah heel on um jess the same if'n I catches him around mah chillun".

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required