I have the following entry in my /etc/fstab file:

/dev/mmcblk1 /home ext3   default 0 2

Now my problem is that the device at /dev/mmcblk1 changes its location periodically. When I set up the mount on boot, it was at location /dev/mmcblk0.

Is there a way to predetermine where the dive is going to be?


You will have to write a udev rule for your device, check this article for examples, its just a one liner.

  • I don't see how this solves the problem of a device that changes location. – Zaz Dec 28 '10 at 14:29
  • Because you don't have to give full path you can do /dev/mmcblk* – ismail Dec 28 '10 at 14:30
  • Ah yes... Although that seems like more of a workaround than a solution, and may have side effects if another card is added. – Zaz Dec 28 '10 at 14:39

You could mount by UUID rather than location:

  1. Run sudo blkid and note down your device's UUID. The line should look something like /dev/mmcblk1: UUID="053b91eb-19c4-4684-be81-ee758579f034" TYPE="ext3", where 053b91eb-19c4-4684-be81-ee758579f034 would be the UUID.

  2. Replace the location in FStab with the UUID. The FStab line should now look something like UUID=053b91eb-19c4-4684-be81-ee758579f034 /home ext3 default 0 2

    Note: according to mount(8), the options field (the fourth field on the line) should be defaults rather than default.

This should recognize your card regardless of location.


I'd suggest using PySDM if you aren't looking to manually edit configuration files.

PySDM is a Storage Device Manager that allows full customization of hard disk mountpoints without manually access to fstab. It also allows the creation of udev rules for dynamic configuration of storage devices. alt text

In Ubuntu, it can be installed by searching the Ubuntu Software Center for "pysdm". Once installed, it is available under the System --> Administration --> Storage Device Manager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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