Mount a Disk and make partitions mount at startup?

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

Comments

So empty here ... leave a comment!

Leave a Reply

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

Sidebar