Mount a Disk and make partitions mount at startup?

  1. mkfs.ext4 /dev/sda
  2. mount /dev/sda /backup
  3. 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.
  4. sudo blkid – Note the UUID of the partition you want to automount.
  5. sudo nano /etc/fstab – Copy the following line to the end of the file, save it and reboot afterward to check if it worked.
  6. 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

 3,136 total views,  3 views today

Comments

So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Sidebar