Saturday, August 9, 2014

Automatic mounting of partitioned hard disk in Ubuntu

If you have partitioned hard drive and you want to mount it automatically during startup, here is the solution..


  • First take the backup of the /etc/fstab by using the following command

  • Check which drive you want to mount. Run the following command

  • Extract the UUID of your partition.

  • Create a path where you want to mount. I have created one folder inside /media/[user_name] named as mydrive and that was my mountpoint. Hence the PATH_OF_MOUNTING in my case is /media/kovid/mydrive. The mydrive folder is inside kovid folder so that I can see mounted drive inside Nautilus sidebar. "kovid" named folder is nothing but one of the user of system.

  • Add the line in your fstab file as per the following format. Do not copy paste the following line.

    NOTE: The drive which I am mounting is of ext4 type. If the drive which you are mounting is of "ntfs" type then you have to put above accordingly.

  • Now the only thing remains is to give permission to your mydrive folder so that you can create files and folders inside the mounted drive.Run the following command as per your location

No comments:

Post a Comment