Automount partition at bootup using UUID in Ubuntu 7.10

Status
Not open for further replies.

Faun

Wahahaha~!
Staff member
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 approach:
Step 1 (Create a directory in media folder to mount the desired partition)
use this command
Code:
sudo mkdir /media/dld
*www.imgx.org/thumbs/large/13444_vltah/1.png


Here dld is the directory on which I want to mount sda6 partition


*www.imgx.org/thumbs/large/13445_xgbuo/2.png


Step 2 (Find out UUID of the desired partition sda6)
use this command to find out UUID
Code:
blkid
or sudo vol_id /dev/sdxx or ls -l /dev/disk/by-uuid

*www.imgx.org/thumbs/large/13446_mcwaq/3.png


Step 3 (Open fstab file inside /etc directory)
use this command to open fstab file
Code:
sudo gedit /etc/fstab
*www.imgx.org/thumbs/large/13447_sfbyi/4.png




Step 3 (Edit you fstab file to include the partition sda6 to mount on dld)
include this line (assuming the partition is NTFS)
Code:
# dld
UUID=C21477C91477BECB /media/dld     ntfs   defaults,force,umask=007,gid=46 0       1
*www.imgx.org/thumbs/large/13448_uh61z/5.png

Do the same for other partitions :)
 
Last edited:
OP
Faun

Faun

Wahahaha~!
Staff member
yup and one more command i dont remember too reveals UUID

post updated
 

Quiz_Master

* Teh Flirt King *
Gr8 one.. Didn't knew this..
(still a lin n00b I am :( hehe )

Thanks.. (I grabbed this tut from your blog though)
 
OP
Faun

Faun

Wahahaha~!
Staff member
^^actually formatting in blog is a lil difficult so i first post here then just copy/paste there :D
 
Status
Not open for further replies.
Top Bottom