Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Dec 28 '10 at 11:25

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

add comment

3 Answers

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. –  Josh 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. –  Josh Dec 28 '10 at 14:39
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.