How to Keep My Drives Mounted on Boot in Ubuntu?

0
6
Asked By CuriousCat42 On

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?

2 Answers

Answered By CodeNinja47 On

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.

Answered By TechTinker89 On

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.

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?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.