Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 1209  / 3 Years ago, wed, november 24, 2021, 4:55:56

I would like to auto-mount a flash drive I have called "flash". Infact I have 2 drives with the same name. Both FAT.



I would like ideally which ever one is connected when the system boots to be mounted. Is this possible? Or does auto mount work on an identifier beyond the name?


More From » usb-drive

 Answers
1

You can edit your /etc/fstab and add the following line to do this easily. But you may understand the risks of doing so.



LABEL=flash /media/where_will_be_mounted vfat defaults 0 0


Ok, lets boil down each option:




  • LABEL=flash: tells the system to mount any driver with the label flash

  • /media/where_will_be_mounted: Self-explanatory, you should already have the path created before mounting.

  • vfat: you said the filesystem will be FAT always, if it's not FAT it will fail.

  • defaults: This set up the driver with the default mount options for the filesystem, equivalent to rw,suid,dev,exec,auto,nouser,async. The important part here is the auto, that tells the system to mount automatically the filesystem when mount -a is issued, like it does at boot.

  • 0: They are dump and fscheck options, you most likely won't want this.


[#30179] Thursday, November 25, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rryble

Total Points: 489
Total Questions: 121
Total Answers: 119

Location: Marshall Islands
Member since Mon, May 31, 2021
3 Years ago
rryble questions
Thu, Jan 5, 23, 18:10, 1 Year ago
Wed, Aug 11, 21, 07:19, 3 Years ago
Fri, Jul 23, 21, 00:13, 3 Years ago
;