0

My USB flash used to mount on startup, but it has stopped doing it. I have tried what is described here: How to automatically mount usb flash drive at startup, but that hasn't worked. I tried to put in my /etc/fstab:

UUID=C0B4-4125 /media/mcarans/C0B4-4125 auto nosuid,nodev,nofail 0 0

Perhaps I have got the parameters wrong: the C0B4-4125 I got from blkid and the folder is the path where it mounts after manually unplugging and plugging my USB flash.

I am running Linux Mint 19. I would appreciate any advice on what I can do to make the USB flash mount on startup once again.

mcarans
  • 1,175
  • Unfortunately the non automounting at startup was a sign of the USB drive dying. It is now dead. – mcarans Jul 11 '19 at 15:19

1 Answers1

1

You can mount the USB drive on boot via an init.d script. To begin, check for what your USB drive is recognized as with the lsblk command:

sda       8:0    0 465.8G  0 disk 
└─sda1    8:1    0 465.8G  0 part 
sdb       8:16   0 931.5G  0 disk 
├─sdb1    8:17   0   499M  0 part 
├─sdb2    8:18   0    99M  0 part
├─sdb3    8:19   0     1M  0 part 
├─sdb4    8:20   0    15M  0 part 
├─sdb5    8:21   0 442.1G  0 part 
├─sdb6    8:22   0 442.6G  0 part 
├─sdb7    8:23   0     1G  0 part 
└─sdb8    8:24   0     3G  0 part 

Let's say that my sdb8 is the USB partition I want to mount at startup.

Make a script in the /etc/init.d directory (in this case, I will be using gedit)

sudo gedit /etc/init.d/usb-mount

usb-mount should contain the following contents:

#!/bin/bash

mkdir /media/your_username/usb_name
sudo mount /dev/sdb8/ /media/your_username/usb_name/

Make sure to replace your_username with your username, usb_name with your usb name, and sdb8 with the partition you want to mount.

After saving the script, you want to chmod it:

chmod +x /etc/init.d/usb-mount

After a reboot, the USB drive should be mounted. Hope this helps!

powwu
  • 88