Adding an entry to fstab
Solution 1:
So here we create an fstab entry for the partition:
-
You need to create the folder for the partition and get the device id.
Open a terminal. The folder can be created viasudo mkdir /media/Data
In addition I would make the user the owner and give him the right to read/write:sudo chown [user]:[group] /media/Data
sudo chmod +rw /media/Data
-
Now the fstab entry:
- Install
libblkid1
to see device specific information:sudo apt-get install libblkid1
- Enter
sudo blkid
and look for the stick. The output could be:/dev/sda2: UUID="32a4b76f-246e-486e-8495-31b8a781fb4c" TYPE="swap" /dev/sda1: UUID="31f39d50-16fa-4248-b396-0cba7cd6eff2" TYPE="ext4"
- Then we create the fstab entry:
sudo gedit /etc/fstab
and append the lineUUID=31f39d50-16fa-4248-b396-0cba7cd6eff2 /media/Data auto rw,user,auto 0 0
(and afterwards give a empty new line to avoid warnings).
- Install
To mount the partition, open a terminal and type
mount /media/DataBecause of the entry
auto
it should be mounted automatically on next boot.
Solution 2:
First you need to find out UUID of your disk by following command
sudo blkid
Note your disk UUID.
Now open fstab file with gedit
sudo gedit /etc/fstab
Replace your old disk UUID with your noted UUID.
Save file and reboot your system. You will be able to mount disk.