How do I change the system so that it recognizes SD cards as /dev/sdX rather than /dev/mmcblkX? I want to do this because scripts depend on sdX. Thanks in advance.
1 Answers
As a workaround, you can probably just create a hard link from /dev/mmcblkX
to /dev/sdX
.
A hard link is just another file descriptor that you link with the device. Hard links can not be distinguished from the original file descriptors.
The command to create such a hard link is:
sudo ln /dev/mmcblkX /dev/sdX
If you use an already existing descriptor as link name, it will print an error message and abort instead of overwriting the old descriptor, so make sure you use an unoccupied name. As Ubuntu uses the sd?
names in alphabetical order, you maybe want to link it to sdz
, which will probably never get occupied by the system.
You will have to create the link probably only once if the source descriptor /dev/mmcblkX
is persistent and does not go away when you pull the card out of its slot.
Otherwise it might be better to create the link every time after inserting the card and removing it after pulling it out again...

- 107,489