Automount partition using UUID in Ubuntu
March 11, 2008 – 6:38 pmUpdated on: 31 July, 2008 at 3:57 PM IST
Here is a tutorial to mount your drive partitions using UUID (even if u change the label and swap ur hard drives this thing will not change). The UUID of a particular partition changes only after format/deletion of that drive.
Step by step approcah:
Step 1 (Create a directory in media folder to mount the desired partition)
use this command
Here dld is the directory on which I want to mount sda6 partition
Step 2 (Find out UUID of the desired partition sda6)
use this command to find out UUID
or
Step 3 (Open fstab file inside /etc directory)
use this command to open fstab file
Step 3 (Edit you fstab file to include the partition sda6 to mount on dld)
include this line (assuming the partition is NTFS)
UUID=C21477C91477BECB /media/dld ntfs defaults,force,umask=007,gid=46 0 1
So the same for other partitions ![]()


















6 Responses to “Automount partition using UUID in Ubuntu”
thank you very much!
it was so helpful!!!
By Laura on Mon 24th Mar, 2008
Thanks alot.
By Orbixx on Thu 24th Apr, 2008
Thanks for the useful iformation. I changed ntfs to ntfs-3g and it worked well.
By Math. on Tue 27th May, 2008
I had a little ‘problem’ with this simple tutorial. If you just created the partitions the UUIDs are not yet created and mount says something like “partition does not exist”. Therefor you have to execute “sudo partprobe” first in order to generate the proper UUIDs.
thanks for the good tutorial!
By Florian Bruckner on Tue 10th Jun, 2008
@Florian Bruckner
thanks for your extremely helpful comment, i was not aware of it
have a nice day
@Math
am glad that your problem got fixed
@Orbixx
thank you too
@Laura
at your service lady :p
By T on Sat 14th Jun, 2008