How to Keep My Drives Mounted on Boot in Ubuntu?
Asked by
CuriousCat42
I've mounted some drives to be visible in /media/$USER and added labels so I can identify them easily. However, every time I restart my Ubuntu system, those drives become unmounted. I've checked and I do have fstab entries, which were created automatically. What steps do I need to take to ensure these drives stay mounted after a reboot?
Answers
To keep your drives mounted after a reboot, you need to ensure that you have correctly set up your `/etc/fstab` file. Just manually mounting a drive using a command like `mount /dev/sdb1 /media/foo` won't persist the mount after a reboot. Try using the gnome-disks utility to manage your fstab entries, but remember to back up the original `/etc/fstab` first, just in case. If you've already got entries that were auto-generated, thatโs a great start! Just make sure they have the correct options set for mounting.
Reply to this answer
Youโre on the right track with fstab! It sounds like there might be an issue with permissions or the way the entries are configured. Make sure the UUIDs in your entries are accurate and match the actual drives. Also, if youโre getting permissions errors when using `genfstab`, it could indicate that you need elevated privileges to write to `/etc/fstab`. Try using `sudo` for that command.
LinuxLover007: Yeah, sometimes permission issues can be tricky! Just remember to check if youโre logged in as a user with the right permissions before making changes.
Reply to this answer
Add your answer
Answers are reviewed before publication.
DriveLover23: Iโve checked my fstab and it's already automatically created with necessary entries, but they still don't persist. It should work even if drives are added or removed, right?