Using Device's file system path
Using Device's UUID
For example we will mount a unmounted LVM device which has no label yet. Let's assume that our device's system path is /dev/sda5
Structure of /etc/fstab file:
# [file system] [mount point] [type] [options] [dump] [pass]
Using Device's file system path
This is the most commonly used way to permanently mount a device.
Step 1: Open the fstab file, I have used vim. you can use yours.
vim /etc/fstab
Step 2: Put the following line there.
/dev/sda5/ /billah ext3 default 0 1
Where,
file system = /dev/sda5/
mount point = /billah
type = ext3
options = default
dump = 0
pass = 1
Now save and restart your PC
Using Device's UUID:
When you are using more than one hard drive in your PC, then most often device's file system path in fstab wont work. Then UUID, that means Universal Uniqe Identifier.
Step 1: Determinig UUID
which will result like followingls -l /dev/disk/by-uuid/
lrwxrwxrwx 1 root root 10 2009-03-02 20:25 0499e06a-05cb-4272-ac37-7308eb7d7326 -> ../../sda5
Here the UUID of sda5 is 0499e06a-05cb-4272-ac37-7308eb7d7326
Step 2: Edit the /etc/fstab
Now, restart your PC, thats all.0499e06a-05cb-4272-ac37-7308eb7d7326 /billah ext3 default 0 1
No comments:
Post a Comment