Problem scenario
You want modified the /etc/fstab file. You want to reboot, but you are concerned your server won't work if you accidentally had a typo in the /etc/fstab file. What should you do?
Solution
- Backup the /etc/fstab file somewhere (e.g., /etc/bak.fstab.bak).
- Run a command like this:
sudo mount -o remount,rw /dev/path/to /path/to/use
The /path/to/use is the path that you will see on your Linux system. The source is the /dev/path/to.
- The command will fail if your /etc/fstab file had a big problem. Otherwise you will be safe to reboot the server.