You have to enter your partition information to /etc/fstab
file. Then your disk will be mounted automatically!
Just go for following step:
First take back up of /etc/fstab
sudo cp /etc/fstab /etc/fstab.backup
Execute following command to get your partition UUID information that will help you to configure /etc/fstab
file.
sudo blkid
Search for your partition's UUID which you want to mount automaticall. Your HDD partitions shouls be displayed like:
/dev/sda1: LABEL="Backup" UUID="00A0CE7EA0CE7A24" TYPE="ntfs"
/dev/sda5: LABEL="40GBTWO" UUID="00A0CE7EA0CE7A24" TYPE="ntfs"
/dev/sda6: UUID="7550252c-3da7-4cd9-8da3-71e9ba38e74a" TYPE="ext4"
/dev/sda7: UUID="088fd084-a011-4896-aa93-c0caaad60620" TYPE="swap"
/dev/sdb1: LABEL="SaurK" UUID="0DB6254A58CEF6F7" TYPE="ntfs"
and so on. It is just an example but format will be same.
Now copy the UUID of the partitions which you want to insert in /etc/fstab
file.
Now open /etc/fstab
file and insert entry for your HDD partitions on the last line of /etc/fstab
file. Take help from previous entry, for format etc:
sudo gedit /etc/fstab
When opened your entry would be like this:
UUID=<your_UUID_for_Disk_partitions> /media/<location_where_you_want_to_mount> ntfs errors=remount-ro 0
Just an example:
UUID=00A0CE7EA0CE7A24 /media/Backup ntfs errors=remount-ro 0
you may have to replace ntfs
to ext4
or fat32
according to the file system
of your partition. It displays in blkid
output.
Now create location where to mount your disk partitions. Create a folder for each partitions to mount. ((note: a directory may be already created, if so ignore this step.) For example:
sudo mkdir /media/Backup
Then execute this command once finished:
sudo mount -a
You can refer this link for further help: Auto mounting with /etc/fstab
Hope it works for you..
/etc/fstab
and make an entry to to file in order to make them mount automatically!! – Saurav Kumar Sep 09 '13 at 17:34