Determine microSD /dev

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

Determine microSD /dev

Postby calzon65 » Wed Jun 12, 2013 5:27 am

I have my new BeagleBoneBlack working well with ArchLinuxARM and I am loaded into the eMMC and booting off the eMMC with no problem (thank you for the instructions on how to install on the eMMC). When I insert a microSD card (after the system is booted), I don't believe it is being recognized. I was expecting to see something like /dev/sdX but no luck.

I would like to mount the microSD card as another filesystem, but I don't know how to determine its /dev. I have already partitioned and formatted the microSD card (ext4) as one large partition. Also, if I insert the card into a USB reader and plug that into the BeagleBoneBlack, the microSD card shows up as /dev/sda, and I am able to mount the card and use it with no problems.

Could someone help me understand why when I insert the microSD card into the microSD card slot I don't see a "new device" and/or help me to make the correct settings in ArchLinuxARM to recognize the microSD card.
calzon65
 
Posts: 80
Joined: Wed May 25, 2011 9:06 pm

Re: Determine microSD /dev

Postby PLyttle » Wed Jun 12, 2013 6:11 am

There are many posts about this subject. And also a lot of noise

The bottom line is that the micro SD-card is not hot swappable. (yet)
In order to use it as extra storage it needs to be present at boot-time. it will be listed as /dev/mmcblk#, /dev/mmcblk#p1 etc.

In Arch there is no issue with what the card should look like. In Angstrom the card should look like a boot card, with 2 partitions and some system files on it. This is an U-Boot issue. The current Angstrom bootcmd expressly halts when there is no valid second partition on the card. I have no knowledge of the configuration in other distro's

If you are interested in the bootcmd, currently used by U-Boot try the following:
mount your first partition, $this->bbcode_second_pass_code('', 'sudo mount /dev/mmcblk0p1 /mnt')
type: $this->bbcode_second_pass_code('', 'strings /mnt/u-boot.img | grep bootcmd')
the (very long) line starting with bootcmd= is what you are looking for.

Back to the SD-card... using Arch I tried FAT-32 and ext-4 with 1 or more partitions. No problem.

You do need to mount the card, or because you cannot remove it, make an /etc/fstab entry to mount it at boot-time. Try mounting it as /home in fstab.
(actually you CAN remove the card -after unmounting- but the system will panic when you try accessing it after re-inserting.)

If you need hot-swappabe storage use an USB-stick or cardreader. (some people tend to forget this option, while focussing on the micro-SD card.)

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: Determine microSD /dev

Postby calzon65 » Wed Jun 12, 2013 6:19 pm

Thank you PLyttle for your quality response. You confirmed my suspicions that the issue was related to being "hot swappable" or some other type of "auto detection".

Previously I used a standard BeagleBone, and since it booted/operated from the onboard microSD slot, I had no option of an unused microSD card. With the BeagleBoneBlack, I've installed ArchLinuxARM in the onboard eMMC, so I now have the "option" of the unused onboard microSD card.

I'm curious, is the "hot swap" and/or "auto detection" of the microSD card a function of ArchLinuxARM or something else?
calzon65
 
Posts: 80
Joined: Wed May 25, 2011 9:06 pm

Re: Determine microSD /dev

Postby PLyttle » Wed Jun 12, 2013 8:37 pm

It' is not an Arch thing, but a kernel/device tree thing. All distributions have the same problem.

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 1 guest