Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Dec 28 '10 at 11:25

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

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

share|improve this answer
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

This should recognize your card regardless of location.

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .