Tag Archives: disk

How to Mount External Drives Statically on Ubuntu Linux

External Drive
The Issue:
You have external USB drives that you want to be mounted the same way every time, but the /dev/sdX device name keeps changing.

The Solution:
First, unmount the drive:
$ sudo umount /media/disk

Then, look in /dev/disk/by-id to find the correct device file:
/dev/disk/by-id/usb-WDC_WD30_00JB-00KFA0_DEF107679C83-0:0-part1

Add this to /etc/fstab:
/dev/disk/by-id/usb-WDC_WD30_00JB-00KFA0_DEF107679C83-0:0-part1 /mnt/data01 ext3 defaults 0 0

Create the mountpoint:
$ sudo mkdir /mnt/data01

Mount the volume:
$ sudo mount /mnt/data01

Now, this device should always be mounted on /mnt/data01.