- mkfs.ext4 /dev/sda
- mount /dev/sda /backup
sudo cp /etc/fstab /etc/fstab.old– Create a backup of the fstab file just in case something unwanted happens. If something happens, you will need a bootable (live) usb. If you do not have one, use the GUI method instead.
sudo blkid– Note the UUID of the partition you want to automount.
sudo nano /etc/fstab– Copy the following line to the end of the file, save it and reboot afterward to check if it worked.
mkdir /my/path/tomount# to quote : “you must create the mount point before you mount the partition.” see https://help.ubuntu.com/community/Fstab
if the system is up and running all the currently mounted information will be available on /proc/mounts file .. just copy this file this will work with out any issue.
or just execute this command
cat /proc/mounts > /etc/fstab
231 total views, 3 views today