Jump to content
OMRON Forums

SD card mount


Recommended Posts



I cannot correctly mount an SD card on my current PPMAC. It the first time it is happening, i start a PPMAC every months...


From my understanding, a FAT32 SD card, with no USB stick connected on the PPMAC, should be found at "/dev/sdb#" (the b of sdb# is important) and mounted automatically to "/media/disk-0" at start up thanks to the "/.readonly/etc/usbmount/usbmount.conf" file.


On this specific PPMAC, the SD card seems to change of block name after or during the mounting: on the example screen shot, it is changing from "/dev/sdb5" to "/dev/sdc5" to "/dev/sdd5" and so on..

Does someone see a potential reason/origin for/to this behaviour?


Thank you!!


The explication below is how i placed the finger on the issue... on our standard application we use an ext3 SD card.


To mount an ext3 SD card on the PPMAC, i modify the "fstab" file (with "mount -o remount,rw /" cmd before and "mount -o remount,ro /" after).

The line i added is "/dev/sdb1 /media/disk-0 auto defaults 0 0".

On this specific PPMAC, the device block seems to change during the boot (changing from "/dev/sdb1" to "/dev/sdc1"). When i look in "mtab" ("cat /etc/mtab") i see that "/dev/sdb1" was mounted. When i send "blkid" is see that the device is now "/dev/sdc1".


I did few other tests:

-changed the "fstab" line to "LABEL=SD /media/disk-0 auto defaults 0 0" : i still see the "sdb1" in "cat /etc/mtab" and the "sdc1" using "blkid".

-removed the line in "fstab" and modify "/.readonly/etc/usbmount/usbmount.conf" file. I added the ext3 to the line: "FILESYSTEMS="ext3 vfat"". After doing this i observed a multi-mount of the same device... it mount it, the device change (sdb1 to sdc1), it try to mount the new one and so on..


Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

What do you get when you type "ls /dev/sd*" ???


On my system I have a SDcard plugged in with one partition on it (sdb1).


# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdb1



sda is the builtin flash drive and sda1 and sda2 are the PPMAC partitions. sdb is the SDcard drive and, in my case, sdb1 is the first and only partition (it happens to be ext2 which is not important at this stage).



If you see the same devices above you can edit the fstab file to mount /dev/sdb1 to a directory of your choosing. I created /mnt/sdcard on my system and have the following fstab file:


# /etc/fstab: static file system information.
proc            /proc           proc    defaults        0       0
/dev/sda1       /opt            vfat    ro              0       0
/dev/sda2       /               ext2    ro              0       0
/dev/sdb1       /mnt/sdcard     ext2    rw
tmpfs           /tmp            tmpfs   defaults


Just add the line, change the filesystem, and save to /.readonly/etc/fstab and reboot and you should be all set. the automounters are convenient for desktops and people plugging in thumb drives but on a system I prefer to mount it statically for determinism.


If your device listing if off from mine then you may have a problem with the kernel recognizing your sdcard hardware. Let us know how it goes.

Link to comment
Share on other sites

Thank you Kejr,

For my standard projects i add the line "/dev/sdb1 /media/disk-0 auto defaults 0 0" in the "fstab" file. I used the automounter only this time to test.

Recall of the issue: as soon as the SD card is mound, the block device change, the first change goes from sdb1 becomes sdc1. Without the autolounter, it stop there, so i have "sdb1" mounted but not present anymore. The device is present on "sdc1". Using the automounter, the new sdc1 is detected and mounded and then directly changed to sdd1, and so one... until sdf1...

It is the first time i have the issue, it might be hardware, i sent the CPU back to Deltatau.

Thanks again Kejr!


Link to comment
Share on other sites

  • 5 years later...
The device names of disk partitions are unstable; hardware reconfiguration, and adding or removing a device can cause changes in names. This is the reason why it's strongly recommended to use filesystem or partition identifiers like UUID or LABEL to indicate the device and filesystem.
Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...