USB Device is detected but not mounted

Hello,

I am having a issue where the USB / SD card device is being detected in the Linux 2.8b1 but the devices are not auto mounted. I can mount them manually and then access it.

How can I get the devices to automount ?

Thanks

Hi

Can you provide the output of ‘dmesg’ and ‘mount’ when that happend?

What command do you use to mount manually?

Has the device been connected during boot or is it hot plugged later?

Max

Hey Max,

Please find the output to dmesg and mount.

root@colibri-imx6:~# mount /dev/sda1
mount: /dev/sda1: can’t find in /etc/fstab.

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.67-+g1db9f06 (oe-user@oe-host) (gcc version 7.2.0 (GCC) ) #1 SMP Mon Feb 5 17:05:35 EST 2018
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Toradex Colibri iMX6DL/S on Colibri Evaluation Board V3
[    0.000000] Reserved memory: created CMA memory pool at 0x18000000, size 128 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat 80b43380, node_mem_map 87db7000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] percpu: Embedded 14 pages/cpu @87d77000 s25548 r8192 d23604 u57344
[    0.000000] pcpu-alloc: s25548 r8192 d23604 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: galcore.contiguousSize=50331648 user_debug=30 ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait fec_mac=00:14:2d:4a:48:0a consoleblank=0 no_consoM
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 117272K/262144K available (7168K kernel code, 273K rwdata, 1824K rodata, 1024K init, 434K bss, 13800K reserved, 131072K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0x90800000 - 0xff800000   (1776 MB)
[    0.000000]     lowmem  : 0x80000000 - 0x90000000   ( 256 MB)
[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
[    0.000000]       .text : 0x80008000 - 0x80800000   (8160 kB)
[    0.000000]       .init : 0x80a00000 - 0x80b00000   (1024 kB)
[    0.000000]       .data : 0x80b00000 - 0x80b44400   ( 273 kB)
[    0.000000]        .bss : 0x80b44400 - 0x80bb0dcc   ( 435 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76450001
[    0.000000] Switching to timer-based delay loop, resolution 333ns
[    0.000007] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[    0.000026] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.001496] Console: colour dummy device 80x30
[    0.002194] console [tty1] enabled
[    0.002224] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.002269] pid_max: default: 32768 minimum: 301
[    0.002376] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002408] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.003043] CPU: Testing write buffer coherency: ok
[    0.003398] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003462] Setting up static identity map for 0x10100000 - 0x10100058
[    0.005127] Brought up 1 CPUs
[    0.005157] SMP: Total of 1 processors activated (6.00 BogoMIPS).
[    0.005181] CPU: All CPU(s) started in SVC mode.
[    0.005930] devtmpfs: initialized
[    0.018037] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.018389] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.018440] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.022819] pinctrl core: initialized pinctrl subsystem
[    0.023885] NET: Registered protocol family 16
[    0.030160] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.031354] cpuidle: using governor menu
[    0.031635] CPU identified as i.MX6DL, silicon rev 1.1
[    0.053416] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.053464] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.054806] imx6dl-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[    0.055972] imx-gpc 20dc000.gpc: no fsl,ldo-bypass found!
[    0.056113] imx-gpc 20dc000.gpc: Registered imx-gpc
[    0.079704] SCSI subsystem initialized
[    0.080016] usbcore: registered new interface driver usbfs
[    0.080102] usbcore: registered new interface driver hub
[    0.080237] usbcore: registered new device driver usb
[    0.080439] 2000000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator
[    0.080604] 2000000.aips-bus:usbphy_nop2 supply vcc not found, using dummy regulator
[    0.090246] stmpe-i2c 1-0041: stmpe811 detected, chip id: 0x811
[    0.180635] i2c i2c-1: IMX I2C adapter registered
[    0.180673] i2c i2c-1: can't use DMA, using PIO instead.
[    0.181530] i2c i2c-2: IMX I2C adapter registered
[    0.181567] i2c i2c-2: can't use DMA, using PIO instead.
[    0.181699] Linux video capture interface: v2.00
[    0.181779] pps_core: LinuxPPS API ver. 1 registered
[    0.181804] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.181856] PTP clock support registered
[    0.209623] imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[    0.210751] MIPI CSI2 driver module loaded
[    0.210959] Advanced Linux Sound Architecture Driver Initialized.
[    0.212878] clocksource: Switched to clocksource mxc_timer1
[    0.213014] VFS: Disk quotas dquot_6.6.0
[    0.213097] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.223120] NET: Registered protocol family 2
[    0.223745] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.223800] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.223857] TCP: Hash tables configured (established 2048 bind 2048)
[    0.223926] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.223970] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.224121] NET: Registered protocol family 1
[    0.224497] RPC: Registered named UNIX socket transport module.
[    0.224527] RPC: Registered udp transport module.
[    0.224548] RPC: Registered tcp transport module.
[    0.224570] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.225319] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.226784] Bus freq driver module loaded
[    0.228487] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    0.235233] NFS: Registering the id_resolver key type
[    0.235279] Key type id_resolver registered
[    0.235301] Key type id_legacy registered
[    0.235333] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.235895] ntfs: driver 2.1.32 [Flags: R/W].
[    0.236273] fuse init (API version 7.26)
[    0.243268] io scheduler noop registered
[    0.243299] io scheduler deadline registered
[    0.243494] io scheduler cfq registered (default)
[    0.245991] backlight supply power not found, using dummy regulator
[    0.249375] imx-sdma 20ec000.sdma: no iram assigned, using external mem
[    0.249707] imx-sdma 20ec000.sdma: loaded firmware 3.3
[    0.254526] pfuze100-regulator 1-0008: Full layer: 1, Metal layer: 1
[    0.255257] pfuze100-regulator 1-0008: FAB: 0, FIN: 0
[    0.255286] pfuze100-regulator 1-0008: pfuze100 found.
[    0.273226] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 26, base_baud = 5000000) is a IMX
[    1.002710] console [ttymxc0] enabled
[    1.007363] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 72, base_baud = 5000000) is a IMX
[    1.016717] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 73, base_baud = 5000000) is a IMX
[    1.025956] 21f0000.serial: ttymxc3 at MMIO 0x21f0000 (irq = 74, base_baud = 5000000) is a IMX
[    1.035181] 21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 75, base_baud = 5000000) is a IMX
[    1.044745] [drm] Initialized
[    1.048161] [drm] Initialized vivante 1.0.0 20120216 on minor 0
[    1.065213] brd: module loaded
[    1.074522] loop: module loaded
[    1.105914] spi_imx 2008000.ecspi: probed
[    1.112529] spi_imx 2014000.ecspi: probed
[    1.117366] libphy: Fixed MDIO Bus: probed
[    1.121897] vcan: Virtual CAN interface driver
[    1.126446] CAN device driver interface
[    1.131630] 2188000.ethernet supply phy not found, using dummy regulator
[    1.138869] pps pps0: new PPS source ptp0
[    1.146941] libphy: fec_enet_mii_bus: probed
[    1.151816] fec 2188000.ethernet eth0: registered PHC device 0
[    1.158085] usbcore: registered new interface driver asix
[    1.163627] usbcore: registered new interface driver ax88179_178a
[    1.169791] usbcore: registered new interface driver cdc_ether
[    1.175801] usbcore: registered new interface driver net1080
[    1.181530] usbcore: registered new interface driver cdc_subset
[    1.187571] usbcore: registered new interface driver zaurus
[    1.193286] usbcore: registered new interface driver cdc_ncm
[    1.198968] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.205536] ehci-mxc: Freescale On-Chip EHCI Host driver
[    1.211043] usbcore: registered new interface driver usb-storage
[    1.217198] usbcore: registered new interface driver usbserial
[    1.223113] usbcore: registered new interface driver usbserial_generic
[    1.229699] usbserial: USB Serial support registered for generic
[    1.235783] usbcore: registered new interface driver ftdi_sio
[    1.241590] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.248984] usbcore: registered new interface driver pl2303
[    1.254642] usbserial: USB Serial support registered for pl2303
[    1.261685] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
[    1.270045] 2184000.usb supply vbus not found, using dummy regulator
[    1.280083] ci_hdrc ci_hdrc.0: EHCI Host Controller
[    1.285075] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[    1.312898] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    1.319164] hub 1-0:1.0: USB hub found
[    1.323033] hub 1-0:1.0: 1 port detected
[    1.328022] mousedev: PS/2 mouse device common for all mice
[    1.334500] input: 20b8000.kpp as /devices/soc0/soc/2000000.aips-bus/20b8000.kpp/input/input0
[    1.353512] input: stmpe-ts as /devices/soc0/soc/2100000.aips-bus/21a4000.i2c/i2c-1/1-0041/stmpe-ts/input/input1
[    1.365001] snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
[    1.373892] i2c /dev entries driver
[    1.379525] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[    1.385981] sdhci: Secure Digital Host Controller Interface driver
[    1.392187] sdhci: Copyright(c) Pierre Ossman
[    1.396588] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.403305] sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
[    1.473047] mmc1: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[    1.502048] random: fast init done
[    1.544404] mmc0: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[    1.554715] mmc1: new high speed SDHC card at address 59b4
[    1.560849] mxc_vpu 2040000.vpu_fsl: VPU initialized
[    1.566580] mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
[    1.574612] mmcblk1: mmc1:59b4 AF UD 3.75 GiB 
[    1.582223]  mmcblk1: p1
[    1.596075] caam 2100000.caam: ERA source: CAAMVID.
[    1.601028] caam 2100000.caam: AXI pipeline throttling enabled.
[    1.612208] caam 2100000.caam: Entropy delay = 3200
[    1.679960] caam 2100000.caam: Instantiated RNG4 SH0
[    1.740721] caam 2100000.caam: Instantiated RNG4 SH1
[    1.745727] caam 2100000.caam: device ID = 0x0a16010000000100 (Era 4)
[    1.752193] caam 2100000.caam: job rings = 2, qi = 0
[    1.779218] caam algorithms registered in /proc/crypto
[    1.788366] caam_jr 2101000.jr0: registering rng-caam
[    1.794416] snvs-secvio 20cc000.caam-snvs: can't get snvs clock
[    1.800421] snvs-secvio 20cc000.caam-snvs: violation handlers armed - non-secure state
[    1.808999] hidraw: raw HID events driver (C) Jiri Kosina
[    1.814695] usbcore: registered new interface driver usbhid
[    1.820321] usbhid: USB HID core driver
[    1.825305] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    1.838330] stmpe-adc stmpe-adc: Initialized
[    1.853909] sgtl5000 1-000a: sgtl5000 revision 0x11
[    1.863106] mmc0: new DDR MMC card at address 0001
[    1.868661] mmcblk0: mmc0:0001 004GE0 3.69 GiB 
[    1.873593] mmcblk0boot0: mmc0:0001 004GE0 partition 1 2.00 MiB
[    1.879885] mmcblk0boot1: mmc0:0001 004GE0 partition 2 2.00 MiB
[    1.887150]  mmcblk0: p1 p2
[    1.916156] fsl-ssi-dai 2028000.ssi: No cache defaults, reading back from HW
[    1.938520] imx-sgtl5000 sound: sgtl5000 <-> 2028000.ssi mapping ok
[    1.947052] NET: Registered protocol family 10
[    1.952534] NET: Registered protocol family 17
[    1.957086] can: controller area network core (rev 20120528 abi 9)
[    1.963628] NET: Registered protocol family 29
[    1.968101] can: raw protocol (rev 20120528)
[    1.972402] can: broadcast manager protocol (rev 20161123 t)
[    1.978110] can: netlink gateway (rev 20130117) max_hops=1
[    1.983998] Key type dns_resolver registered
[    1.989999] cpu cpu0: Registered imx6q-cpufreq
[    1.994547] Registering SWP/SWPB emulation handler
[    2.008893] 2184000.usb supply vbus not found, using dummy regulator
[    2.017235] usb-storage 1-1:1.0: USB Mass Storage device detected
[    2.023999] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    2.028914] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2
[    2.036191] scsi host0: usb-storage 1-1:1.0
[    2.062906] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    2.069031] hub 2-0:1.0: USB hub found
[    2.072834] hub 2-0:1.0: 1 port detected
[    2.078088] imx_thermal 2000000.aips-bus:tempmon: Commercial CPU temperature grade - max:95C critical:90C passive:85C
[    2.089778] input: gpio-keys as /devices/soc0/gpio-keys/input/input2
[    2.096553] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2018-02-07 18:32:24 UTC (1518028344)
[    2.106886] ALSA device list:
[    2.109876]   #0: imx6-colibri-sgtl5000
[    2.126710] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.134998] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.144196] devtmpfs: mounted
[    2.148147] Freeing unused kernel memory: 1024K
[    2.278944] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ +LZ4 -SECCOMP +BLKID -E)
[    2.300380] systemd[1]: Detected architecture arm.
[    2.333807] systemd[1]: Set hostname to <colibri-imx6>.
[    2.610240] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    2.653211] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    2.693579] systemd[1]: Created slice User and Session Slice.
[    2.723785] systemd[1]: Listening on Journal Socket.
[    2.753387] systemd[1]: Reached target Host and Network Name Lookups.
[    2.793222] systemd[1]: Reached target Swap.
[    2.823725] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    3.052154] scsi 0:0:0:0: Direct-Access     USB      Flash Disk       5.00 PQ: 0 ANSI: 2
[    3.090299] sd 0:0:0:0: [sda] 512256 512-byte logical blocks: (262 MB/250 MiB)
[    3.143743] sd 0:0:0:0: [sda] Write Protect is off
[    3.148806] sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
[    3.166993] sd 0:0:0:0: [sda] No Caching mode page found
[    3.172364] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    3.189124] galcore: loading out-of-tree module taints kernel.
[    3.197879]  sda: sda1
[    3.205986] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    3.223216] galcore: clk_get vg clock failed, disable vg!
[    3.228887] Galcore version 6.2.2.93313
[    3.407392] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    3.843607] systemd-journald[211]: Received request to flush runtime journal from PID 1
[    5.195910] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    5.628021] using random self ethernet address
[    5.632497] using random host ethernet address
[    6.517122] Loading modules backported from Linux version v4.14-0-gbebc608
[    6.524125] Backport generated by backports.git v4.14-rc2-1-34-g1d8cc15
[    6.738344] Bluetooth: Core ver 2.22
[    6.823146] NET: Registered protocol family 31
[    6.827622] Bluetooth: HCI device and connection manager initialized
[    6.963105] Micrel KSZ8041 2188000.ethernet-1:00: attached PHY driver [Micrel KSZ8041] (mii_bus:phy_addr=2188000.ethernet-1:00, irq=-1)
[    7.008410] Bluetooth: HCI socket layer initialized
[    7.085334] Bluetooth: L2CAP socket layer initialized
[    7.122697] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.196644] Bluetooth: SCO socket layer initialized
[    7.403084] usb0: HOST MAC 00:14:2d:ff:ff:fe
[    7.458954] usb0: MAC 00:14:2d:ff:ff:ff
[    9.203649] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    9.211534] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.241522] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    9.324083] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    9.354302] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
root@colibri-imx6:~# 

For mounting manually I create a directory under /media and use the following command to mount manually.
root@colibri-imx6:~# mount /dev/sda1 /media/usb

The device is connected during boot.

I can flash linux using the SD card which means that the uboot can read files but just not Linux.

Thanks

What is the output of ‘mount’ without any parameters?

root@colibri-imx6:~# mount
/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=58636k,nr_inodes=14659,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/debug type cgroup (rw,nosuid,nodev,noexec,relatime,debug)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /var/volatile type tmpfs (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=24936k,mode=700)

if you take out or put in the sd card, do you see a message on the console? Which carrier board are you using?

Yes, I can see the console messages after connection/disconnection. Our design is based on the Iris Board with Colibri iMX6.

Can you send a log of these messages? Which bsp image are you using exactly?

The following are the messages displayed on the console when I connect & disconnect USB and SD card respectively. I am using Linux 2.8b1 Openembedded build.

root@colibri-imx6:~# [ 1701.263466] usb 1-1: new high-speed USB device number 3 using ci_hdrc
[ 1701.459470] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1701.473046] scsi host0: usb-storage 1-1:1.0
[ 1702.535021] scsi 0:0:0:0: Direct-Access     USB      Flash Disk       5.00 PQ: 0 ANSI: 2
[ 1702.548995] sd 0:0:0:0: [sda] 512256 512-byte logical blocks: (262 MB/250 MiB)
[ 1702.569548] sd 0:0:0:0: [sda] Write Protect is off
[ 1702.579806] sd 0:0:0:0: [sda] No Caching mode page found
[ 1702.585236] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1702.609449]  sda: sda1
[ 1702.622327] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 1703.060913] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 1709.938484] usb 1-1: USB disconnect, device number 3
[ 1710.063365] FAT-fs (sda1): FAT read failed (blocknr 6222)
[ 1720.528957] mmc1: new high speed SDHC card at address 59b4
[ 1720.545154] mmcblk1: mmc1:59b4 AF UD 3.75 GiB 
[ 1720.552573]  mmcblk1: p1
[ 1721.008303] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 1726.113074] mmc1: card 59b4 removed
[ 1726.231361] FAT-fs (mmcblk1p1): FAT read failed (blocknr 32)

This is the output of fsck

root@colibri-imx6:~# fsck /dev/mmcblk1p1 
fsck from util-linux 2.30
CP437: Invalid argument
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Perform changes ? (y/n) y
/dev/mmcblk1p1: 26 files, 156534/979842 clusters

I can see the number of files after I run fsck but cannot see the files under /media/{{devicename}}

the sd/usb device is recognized, but your file system is corrupt. You just have to run fsck on the devices.
Next time, you should unmount before taking out the sd/usb device.

After I run fsck and then try to unmount the device, I get error saying the device is not mounted.

Do I need to manually mount every device I connect in Linux ?

to run fsck, the device needs to unmounted. Check with mount, if the drive is mounted or not. If it is unmounted, you can remove it from usb/sd connector.

You don’t need to mount any device in linux, but you need to unmount before removing the device.

I am getting back to this post.

I have run fsck and unmounted them. The usb or mmc does not automount when I connect them.

In v2.7b4, I used to use the static device address of /media/{{devicename}} to list file names but it does not seem work in v2.8b1

I am not a designer but do we need PIN 135 for the USB ? The board design is using PIN 135 for UART C.

I need some help here to solve the issue.

The pin 135 of Colibri imx6 has no UART Functionality. It is used for OTG to decide, if the module is host or client. If you are using this pin for something else, then you should disable the OTG Functionality of this pin in the software.

Are you using a console only image?
Does it help for the mount issue to edit /lib/systemd/system/systemd-udevd.service and remove the line:

MountFlags=slave

Thanks Max. This did solve the mount issue. I am using angstrom-lxde-image. What is causing the issue ? and how can I disable this flag in openembedded build ?

I don’t see the effect in our vanilla angstrom-lxde-image as this has an additional automount mechanism when the desktop is started, so that is rather strange.

The description of MountFlags in the systemd manpage should give the answer.

I just pushed a bbappend which does delete the entry to meta-toradex-bsp-common, rocko-next branch. Revert “Revert systemd: remove patch now provided upstream”

We faced the same issue too on Apalis iMX6Q, system image is built from sources tagged Apalis-iMX6_LXDE-Image_2.8b1.64-20171229 .

The reason of this is the line

MountFlags=slave

added into /lib/systemd/system/systemd-udevd.service in system image v2.8. According to systemd man, this will force systemd “… to run processes so that none of their mounts and unmounts will propagate to the host”. More exactly, this limitation is applied to /etc/udev/scripts/mount.sh which runs mount.

Fixing this is straightforward, just replace “slave” to “shared” (actually, “shared” is default, but anyway):

cp /lib/systemd/system/systemd-udevd.service /etc/systemd/system/
sed -i -e 's/MountFlags=slave/MountFlags=shared/g' /etc/systemd/system/systemd-udevd.service
systemctl daemon-reload
systemctl restart systemd-udevd

Thanks to this answer for real finding the reason.
I think this issue could be fixed in new version or justified somehow by Toradex.

That is fixed for some time now and is released with the 2.8beta2.