Monday, March 3, 2014

Auto mount a partition at Startup - Linux

First we need find out UUID of the device, use ls -l /dev/disk/by-uuid to list the uuid of disks, Then you will output like below

lrwxrwxrwx 1 root root 10 Mar  3 21:04 4b2bce51-abde-4cc8-97dc-b72806ecbebb -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar  3 21:04 662d99dc-b400-44ce-b227-e40fd8dfcab3 -> ../../sda6
lrwxrwxrwx 1 root root 10 Mar  3 21:04 a636c116-6716-4781-bbd9-10932226d1a9 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar  3 21:04 b0f84ace-f2c0-4e99-9df7-a6a0fb3b87b4 -> ../../sda7

Now you need  to add following entry to sudo /etc/fstab file , here you need to open this with sudo command to edit. And then add following line as last line of fstab file,

[Note: keep space between each entry ]
UUID=b0f84ace-f2c0-4e99-9df7-a6a0fb3b87b4 /media/shameera/Entertainment ext4 defaults 0 2

 Here my external device is sda7 so i have used UUID of that and i have use mount point as /media/shameera/Entertainment location, it's file format type is ext4. Change these values according to your device parameters, I have set mount option to defaults, dump and pass values are set to 0 and 2 respectively. Are you interesting in what are these defaults , dump and pass values are? then read this.

I tested this on Linux mint 15.


Sample Text

Website counter

Categories