Q:

Auto mounting an SDHC card on Ubuntu during boot

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?

A:

You could mount by UUID rather than location:

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.

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.

A:

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

