Ubuntu – /etc/fstab is mounting rw filesystem as read-only

automountingfilesystemsfstabmountUbuntu

A partition of my internal hard drive (not the root partition) I want to mount automatically on boot. I've been using /etc/fstab to mount my external backup drive automatically read-only, so this is the first drive I've tried to mount read-write with fstab. Here's the relevant line:

/dev/sda3   /media/^_^    vfat    rw,sync,user    0   0

Yes, my drive is a silly face. The ^ hasn't caused me any problems before, but maybe it's interfering with something here? Though I doubt it — the drive mounts fine except that it is read-only.

Any reason why this would happen? I've tried restarting multiple times.

Best Answer

Try to use UUID instead of using device name. Because the name of this device (/dev/sda3) depends on the order in which it was detected while booting, and this order can change. Type this command "blkid" without quote, the shell will display all the devices with UUID. Refer below:

[admin@localhost ~]$ blkid
/dev/sda2: UUID="2fc45c8c-7420-48af-8ad5-06cfeda8633b" TYPE="ext4" 
/dev/sda1: UUID="9a070d16-c6be-40a2-8f38-2e52b8010ef2" TYPE="ext4" 
/dev/sda3: UUID="212c65ba-f4bf-4840-8bcc-bb83c5fe63e6" TYPE="swap" 
/dev/sdb1: LABEL="USBtest" UUID="5f42b5d0-375d-4802-8c58-bd6c9c62481b" TYPE="ext4" 
[admin@localhost ~]$ 

Above is an example. Copy your device UUID, then replace with /dev/sda3. Then reboot your server. Hope this can solve your problem. Thank you.

Related Question