Mount a Partition at Start-up Based on its UUID

To list the UUIDs of all your partitions, use the blkid command-line utility to locate/print block device attributes. Open a terminal and:

$ sudo blkid

Sample output from my system:

/dev/sda1: LABEL="vms" UUID="94e13137-e73b-4d64-a4c2-fd56362714f1" TYPE="ext4" 
/dev/sdb1: UUID="33fea0ee-03ab-4dca-bafe-b71b4e45e2b0" TYPE="ext4" 
/dev/sdb2: UUID="e261d2a4-0d80-4746-9bf9-b74a9bc36ef8" TYPE="ext4" 
/dev/sdc1: UUID="5388c58a-4202-4831-8fb1-60c83e8b8ca1" TYPE="ext4" 
/dev/sdc2: UUID="31836319-9656-45ef-8044-92f74988de04" TYPE="swap" 

In order to mount your partition at startup with fstab, you need to have a mount point in /media/. If you don’t have an existing mountpoint, create one. Open a terminal and:

sudo mkdir /media/yourmountpointname

Then use the resulting UUID to update /etc/fstab file.

Simply use following syntax:

UUID={YOUR-UID} {/path/to/mount/point} {file-system-type} defaults,errors=remount-ro 0 1

Open /etc/fstab:

gksudo gedit /etc/fstab

Append line as follows:

UUID=94e13137-e73b-4d64-a4c2-fd56362714f1 /media/yourmountpointname ext4 defaults,errors=remount-ro 0 1

Save and close the file. To mount new partition immediately using /etc/fstab type:

$ sudo mount -a


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: