Thursday, September 10, 2009

Mount pendrive using your name !

We will create new rule file inside /etc/udev/rules.d/

Follow the steps:
1. insert pendrive and see device name using "fdisk -l", in my case it is '/dev/sdb1'

2. create a file named '99-udev.rules' and make entry as shown
(any name can be given but it is necessary to end it with ".rules")

# vim /etc/udev/rules.d/99-udev.rules
KERNEL=="sdb1", Name="addy", MODE="0600", OWNER="root"

:wq (save and exit)

3. # mount /dev/addy /mnt

We need to be a super user to perform this action, more options can be appended in rule file as per our requirement, kindly go through udev man pages.

No comments:

Post a Comment