Jump to content

Hello!

 

So I am setting up a home media server for my house using USB flash drives on a Raspberry Pi running Raspbian and Samba. It uses 2 USB drives, but the partitions on the 2nd USB drives are not auto-mounting. What are the mount and auto-mount commands?

 

Thanks in advance.

if day == Friday:

  Celebrate()

Link to comment
https://linustechtips.com/topic/1195663-auto-mount-drives-in-linux/
Share on other sites

Link to post
Share on other sites

23 minutes ago, AndrewCam100 said:

Hello!

 

So I am setting up a home media server for my house using USB flash drives on a Raspberry Pi running Raspbian and Samba. It uses 2 USB drives, but the partitions on the 2nd USB drives are not auto-mounting. What are the mount and auto-mount commands?

 

Thanks in advance.

what distro is on the raspberry pi? are the usb drives ntfs?

Link to post
Share on other sites

13 hours ago, AndrewCam100 said:

I use Raspbian. And the drives are NTFS.

The easy thing would be to try and see if you can install the gnome disk utility. Try sudo apt install gnome-disk-utility in terminal. If that works you can just use that to auto mount the drive. Assuming you get it installed just open up disks. Find your usb in the list and select it > click the gear icons > find Edit Mount Options > if you don't see mount at system startup checked and everything is grayed out just turn off User Session Defaults than check box mount at system startup.

 

The other option is edit your /etc/fstab folder. This step is a bit more complicated. If you have any problems you can try the raspberry pi forums I'm sure they would be able to help better.

first you can use findmnt to find your drive, it should look something like /dev/sdb1 than you can use whatever editor is available to you like nano or vim (they might require install if it's not there by default.)

You will need to add a line to the file. It should follow this type of format, so this is an example

#<file system> <mount point> <type> <options> <dump> <pass>

/dev/sdb1 /mnt/MyUsb auto nosuid,nodev,nofail,x-gvfs-show 0 0

you can substitute /dev/sdb1 with the actual UUID and to find that just use the sudo blkid command.

 

PS

For the 2nd option I'm assuming your familiar with linux so my instructions are kind of psuedoinstructions and are not exact steps on how to set it up. I never used raspbian. I'm only using Ubuntu, but it should be a similar process.

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×