Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Debian running on a laptop of mine, and an rsnapshot config that does a wonderful job of backing up incrementally to a 1TB external drive of mine. Unfortunately, sometimes the drive mounts to /media/ivy when I plug it in, other times it's at /media/usb0. How can I go about standardizing the mount point? I had initially thought of using fstab, but as a novice there, I thought fstab usually handled more permanent drive connections--as I want to do this on a laptop, drives frequently come and go.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The way I solved a similar problem was to ensure the external USB volume was labelled, and then manually mounting and unmounting it using /dev/disk/by-label/labelname (This is useful if you rotate have multiple disks and a script, and then label disks Backup_01, Backup_02 etc

In order to "Fix" the mounting point to act as you wish to do, you probably need to look to UDEV, which enumerates devices. Configuring this is a bit of trial and error, but for an installation where I wanted to identify and run a script, I used :

KERNEL=="sd?1", ATTRS{product}=="EXTIDPRODUCTIDENTIFUER", ATTRS{serial}=="DEVICE_SERIAL_NO",RUN+="/usr/local/bin/"

To discover the parameters to pass to udev I issued the command udevadm info -a -p $(udevadm info -q path -n /dev/sdXX)

I see no good reason why the script you would execute could not be a mount command.

share|improve this answer
it is not clear how to achieve what the OP requested... no clear steps, but a lot of explanation around the issue. –  woohoo Feb 27 '14 at 1:23

I'm pretty sure you can do this with gvfs-mount but I can't tell you how. gvfs-mount should mount at /media/YOUR_DRIVE_VOLUME_NAME by default. As long as your drive has a volume name (I assume it does since it is sometimes mounted at /media/ivy). Anyway, a workaround using fstab would be to add an entry using the UUID of your external drive.

  • To get the UUID of your drive do

    ls -l /dev/disk/by-uuid/

    You should see something like

    lrwxrwxrwx 1 root root 10 Feb 14 16:58 E208CFC0FGG345JDB -> ../../sdb1
  • Assuming your external drive's partition is /dev/sdb1, you can add an entry to your fstab like so:

    UUID=C0BCD19CBCD18D72   /media/ivy  ntfs    nofail,defaults 0   0

Now, according to man mount, nofail only suppresses error messages. However, according to this page, it also causes mountall to skip non-existing devices. If that doesn't work, you can also try the bootwait (source1, source2) and/or bg (source) options. Unfortunately, I do not have an external drive handy at the moment, so I cannot check.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.