Tuesday, August 26, 2008

Automount External USB Hard Drive in SuSE 10.3

To automount an external USB hdd in OpenSuSE 10.3 and up, just follow these simple instructions:

First, create a new directory to mount the external HDD:
mkdir /media/usb-hdd
Next, modify /ets/fstab to include a new label entry for the external HDD. You can label it anything you want without spaces.
LABEL=YOUR-HDD-LABEL /media/usb-hdd ext3 auto,nofail,defaults 1 2
Finally, create a script in /etc/udev/rules.d/ called 99-mount.rules containing the following command:
#run mount -a everytime a block device is added/removed
SUBSYSTEM=="block", run+="/bin/mount -a"
Now, whenever you boot into OpenSuSE, the external USB hdd labeled YOUR-HDD-LABEL will be automatically mounted.

No comments: