Using the SD card as extra storage on the Black

Is that ALL we need to have on the microSD? or do we need other files on there as well?

Depends on what you want to do. If all you want to do is boot from the emmc, and have access to the SD card( with SD card inserted at boot ), then yes, that is all you need.

Daniel, if you want to boot off an SD card then you need different parameters. Looking at Robert C. Nelsons instructions here → http://eewiki.net/display/linuxonarm/BeagleBone+Black You can scroll down to the uEnv.txt file instructions and see what you may need to boot from an SD card.

Although, you need to take care that file names, and paths are correct. uboot parameters can be fairly complex depending on what you want to do . . . and I am not exactly sure these Debian instructions directly translate from Debian to Angstrom( because of file locations, names and types )however with that said, uboot specific parameters, and environment variables I do believe should be the same. As I believe that both use the same uboot( someone correct me here if I am wrong ).

My intention is to launch Angstrom from the eMMC and have a microSD card in the slot and have the BBB read it as extra storage, not try to boot from it.

To make sure I’m understanding correctly, you need to run the mkcard.sh script on this page right? In order to format the microSD to have the correct format? Or is that wrong?

There seems to be a gap of information here. It sounds like (based on what you had said) I can take any old microSD and just put that text file in it and plug it into the BBB and the BBB will boot from eMMC with microSD card recognized as storage. I’ve tried several methods of trying to do this and I keep getting stuck at 3 solid LED’s upon boot.

I am having a hard time understanding what gentoo has to do with Booting Angstrom from emmc with an SDcard in the sd card slot.

The important thing the script does is to create and format the first partition as FAT32. I am not positive as to the size requirements of the first partition, or the head/sector/cylinders that’s setup in the translation. I know that the entire drive is accessed in LBA mode.

I’m happy that I’ve now got my SD card in the reader and not taking up space on the USB hub. My uEnv.txt file is:

mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2
optargs=quiet

I’ve formatted the remainder of the drive with the command “mkfs -V -t ext4 -j -L /home /dev/sda2” but it’s automounting the partition at /media/_home instead of the /home location I was hoping it would be mounted. Without manually editing /etc/fstab, is there a way to have it mounted at /home?

(Obviously the /dev/sda2 location was when the card was in the USB adapter, now it would be /dev/mmcblk0p2)

I’ve got a spare 2GB microSD sitting around. I’ll test and see how simple it is to make the correct formatted card in a few minutes…

If there is *ANY* SD card present, the eMMC boot-loader will try to
boot from the SD card and not the on-board flash. There is ABSOLUTELY
ZERO SANITY CHECKING AT THIS STEP!!! ANY SD CARD DETECTED WILL BE
BOOTED FROM, REGARDLESS OF WHETHER OR NOT IT CONTAINS A FILE SYSTEM OR
ANY BOOT FILES!!!

That means if you want your black to boot with an SD card it must have
at minimum a uEnv.txt file that points the boot process back to the eMMC.

If you want to avoid a uEnv.txt file on your SD card, you'll have to
re-build and update the uboot installed on the eMMC.

I am having a hard time understanding what gentoo has to do with
Booting Angstrom from emmc with an SDcard in the sd card slot.

My intention is to launch Angstrom from the eMMC and have a
microSD card in the slot and have the BBB read it as extra
storage, not try to boot from it.

To make sure I'm understanding correctly, you need to run the
mkcard.sh script on
this<http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand&gt;
page right? In order to format the microSD to have the correct
format? Or is that wrong?

There seems to be a gap of information here. It sounds like
(based on what you had said) I can take any old microSD and just
put that text file in it and plug it into the BBB and the BBB
will boot from eMMC with microSD card recognized as storage. I've
tried several methods of trying to do this and I keep getting
stuck at 3 solid LED's upon boot.

Depends on what you want to do. If all you want to do is boot
from the emmc, and have access to the SD card( with SD card
inserted at boot ), then yes, that is all you need.

Is that ALL we need to have on the microSD? or do we need
other files on there as well?

Grr, sorry for the multiposts kind of mufti tasking here.
Sorry guys / Gals.

mmcdev=1 bootpart=1:2 mmcroot=/dev/mmcblk1p2 ro

That needs to be in a uEnv.txt file on the SD card.

Anyhow to boot from the emmc you need a uEnv .txt file
that looks something like this.

mmcdev=1 bootpart=1:2 mmcroot=/dev/mmcblk1p2 ro

What is the contents of your current uEnv.txt file ?

I spent a huge amount of time working with the
original BeagleBoard a few years ago, but have not
been working with it recently, and not had a BBB
until this past week.

I'm trying to use a microsd card as extra storage
while running on my beaglebone black. I thought I'd
followed the correct directions to get the memory
card formatted and configured correctly, but when I
power on the BBB with the sd card inserted, all I get
is solid LEDS.

Now I've got the SDCard in a usb adapter and mounted.
I can see that the built in flash is /dev/mmcblk0.
I've added lines to my uEnv.txt file according to
http://dev.gentoo.org/~**armi**n76/arm/beagleboneblack/

**instal**l_emmc.xml#expand<http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand&gt;
in

hopes of getting the device to boot but am not having
any luck. I think I'm confused as to the specific
parameters, and the processor doing somethign
slightly different depending on if it sees the
removable card.

What I really want is for the board to boot from its
internal storage, and mount the second partition from
the microsd card over /home/ so that I can use all of
that space for user storage.

I copied the entire contents of /dev/mmcblk0p1 to the
FAT boot partition on the memory card, and then
modified the uEnv.txt file on the memory card. Should
that work?

Since it didn't work, can someone tell me if I was
close, and should have been able to fix it simply by
using the correct options in the uEnv.txt file?

root@beaglebone:/media/**BEAGLEB**ONE_# fdisk -l

Disk /dev/mmcblk0: 1920 MB, 1920991232 bytes 255
heads, 63 sectors/track, 233 cylinders, total 3751936
sectors Units = sectors of 1 * 512 = 512 bytes Sector
size (logical/physical): 512 bytes / 512 bytes I/O
size (minimum/optimal): 512 bytes / 512 bytes Disk
identifier: 0x00000000

Device Boot Start End Blocks Id
System /dev/mmcblk0p1 * 63 144584
72261 c W95 FAT32 (LBA) /dev/mmcblk0p2
144585 3743144 1799280 83 Linux

Disk /dev/mmcblk0boot1: 1 MB, 1048576 bytes 4 heads,
16 sectors/track, 32 cylinders, total 2048 sectors
Units = sectors of 1 * 512 = 512 bytes Sector size
(logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk0boot0: 1 MB, 1048576 bytes 4 heads,
16 sectors/track, 32 cylinders, total 2048 sectors
Units = sectors of 1 * 512 = 512 bytes Sector size
(logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 31.9 GB, 31914983424 bytes 64 heads,
32 sectors/track, 30436 cylinders, total 62333952
sectors Units = sectors of 1 * 512 = 512 bytes Sector
size (logical/physical): 512 bytes / 512 bytes I/O
size (minimum/optimal): 512 bytes / 512 bytes Disk
identifier: 0x00000000

Device Boot Start End Blocks Id
System /dev/sda1 * 63 144584
72261 c W95 FAT32 (LBA) /dev/sda2 144585
62333951 31094683+ 83 Linux
root@beaglebone:/media/**BEAGLEB**ONE_# cat
/media/BEAGLEBONE_/uEnv.txt bootpart=1:2
mmcroot=/dev/mmcblk1p2 optargs=quiet

This page by Armin76 explains it quite well, and
even provides a shell script to set up an sd card
to be used as external storage (basically, when the
SD card is inserted, it shows up as mmc0, which is
what uBoot tries to boot from, so you have to give
it some instructions in a uEnv.txt to tell it to
boot from the internal memory instead)

http://dev.gentoo.org/~**armin76**/arm/beagleboneblack/**install_**

emmc.xml#expand<http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand&gt;

look into the uEnv.txt parameters. presumably
even if you want to boot from eMMC the uEnv.txt
file has to be present on the SD card, and with
the correct parameters in it. If you google
beaglebone black + uEnv.txt, you should land on
the same wiki page i found a week or so ago. It
seemed pretty informative.

All,

Can someone point me in the right direction.

I've updated the Beagle Black via the SD card,
now I want to be able to use an blank SD card
for extra storage. If I just format a card and
put it in the slot, the four LEDs light up and
that's it.

What do I need to do to use a blank card and
mount it.

Many thanks,

Trefor

-- For more options, visit
http://beagleboard.org/discuss --- You received
this message because you are subscribed to the
Google Groups "BeagleBoard" group. To
unsubscribe from this group and stop receiving
emails from it, send an email to
beagleboard...@**googlegroups.**co**m.

For more options, visit
https://groups.google.com/**grou**** ps/opt_out
<https://groups.google.com/groups/opt_out&gt;\.

--

For more options, visit
http://beagleboard.org/discuss --- You received
this message because you are subscribed to the
Google Groups "BeagleBoard" group. To unsubscribe
from this group and stop receiving emails from it,
send an email to
beagleboard...@**googlegroups.**com.

For more options, visit
https://groups.google.com/**grou** ps/opt_out
<https://groups.google.com/groups/opt_out&gt;\.

-- For more options, visit
http://beagleboard.org/discuss --- You received this
message because you are subscribed to the Google
Groups "BeagleBoard" group. To unsubscribe from this
group and stop receiving emails from it, send an
email to beagleboard...@**googlegroups.**com.

For more options, visit
https://groups.google.com/**grou**ps/opt_out&lt;https://groups.google.com/groups/opt_out&gt;

.

--

For more options, visit http://beagleboard.org/discuss ---
You received this message because you are subscribed to the
Google Groups "BeagleBoard" group. To unsubscribe from this
group and stop receiving emails from it, send an email to
beagleboard...@**googlegroups.com. For more options, visit
https://groups.google.com/**groups/opt_out&lt;https://groups.google.com/groups/opt_out&gt;

.

--

For more options, visit http://beagleboard.org/discuss --- You
received this message because you are subscribed to the Google
Groups "BeagleBoard" group. To unsubscribe from this group and
stop receiving emails from it, send an email to
beagleboard+unsubscribe@googlegroups.com. For more options, visit
https://groups.google.com/groups/opt_out.

- --
Charles Steinkuehler
charles@steinkuehler.net

Well, because I read the entire thread when I come across one, I read the post earlier about that tutorial. That tutorial also says to add a uEnv.txt file to the microSD.

A uEnv.txt file with nearly the same lines you suggested, only, that tutorial has you format and partition the microSD in a certain way.

You didn’t say how the sd has to be partitioned or formatted. SO I wasn’t sure if you were adding to the tutorial mentioned earlier in the post or if it is simply:

You have a microSD (no special formats/partitions)
You put a uEnv.txt file with those 3 lines in it, on the microSD
You put the microSD in the BBB and boot

I’m trying to add this to the FAQ and I just wanted some clarification on what to do and not to do based on the other posts in this thread.

then i'm confused ... to upgrade, the instructions are to copy the
eMMC flasher image to an SD card, insert it and power up *while
holding down the USER/BOOT button*. but if it will boot off the SD
card by default, what's the purpose of holding down the USER/BOOT
button? am i misunderstanding something here?

rday

First lets get this out of the way:
The "eMMC" is always default, unless you hold down the button, which
changes the boot rom order...

Now to the 'bug'... The factory u-boot, only "looks" for the presents
of a microSD card, if found it 'finds' a microSD it just assumes and
starts down this path: load uEnv.txt, loads zImage, loads *.dtb: and
tries to run..

One of the first thing i did with my version, was change it to: look
for microSD, load uEnv.txt, "uevcmd set? <yes/no>", yes: boot of
microSD, no: repeat on eMMC..

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader

However:
u-boot (in eMMC) can be patched to look at the microSD card first..
(and other combinations)

Regards,

thank you ... confusion abated.

rday

If you don't hold down the boot button, you will be booting off the
eMMC first. This could be a bad thing if your eMMC is corrupt,
erased, or otherwise broken. If you hold down the boot button, you
FORCE the SD card to be read before the eMMC, so your factory update
works regardless of the current state of the eMMC.

- --
Charles Steinkuehler
charles@steinkuehler.net

Never mind. I got the answer to my question. Sorry for the confusion.

For anyone else not clear after reading this this is how I was able to use a uSD card in the uSD card slot as extra storage while booting Angstrom from the eMMC

Insert the uSD into a USB hub connected to the BBB using a usb adapter
Open up the Disk Utility in Applications > System Tools > Disk Utility
Unmount the uSD
Format the drive
Click add a partition and make it of type FAT, name it and size it however you want
After it has been formatted and partitioned mount the FAT 32 partition you just made
Open it in file explorer and Right Click > Create Document
Name it uEnv.txt
Add the following lines to uEnv.txt:

mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2 ro
optargs=quiet

Then power down your BBB
Remove the uSD from the hub and insert it into the uSD slot on the BBB
Power on the BBB and there should be a mounted storage device with the name you gave it

I was just going to mention my results along the same lines. I put my SD card in a USB adapter so it showed up as /dev/sda and then ran the following commands:

fdisk /dev/sda

(Deleted all existing partitions with the “d” command, created a new primary partition with the “n” command, default initial location, +1M size, changed type to “c”. Created second primary partition that used the rest of the drive. “w” to exit and save changes.)

mkfs -t vfat -F 32 -n BoneBoot /dev/sda1

mkfs -V -t ext4 -j -L BoneData /dev/sda2

mount /dev/sda1 /mnt/card

(create /mnt/card/uEnv.txt with the lines

mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2
optargs=quiet
And then shutdown my board, put the card in the microSD slot, and power on. The board booted from the internal mmc, and the partitions were automounted under the /media directory.)

Here’s part of the df output after rebooting.
Filesystem 1K-blocks Used Available Use% Mounted on

/dev/mmcblk0p1 992 1 991 1% /media/BoneBoot
/dev/mmcblk1p1 71133 55239 15895 78% /media/BEAGLEBONE
/dev/mmcblk0p2 1918992 2928 1816916 1% /media/BoneData

As for the partition type, I am unsure if it matters.

But in the case of mounting the SD as /home/ worse case scenario is that you create two partitions. One FAT ( assuming uEnv.txt is required on a FAT partition and just large enough to hold the file) and one of whatever filesystem type you prefer.

As for mount, this is a Linux executable, so you can use mount however you like( within reason of course ). With that said the only way in my mind is to use /etc/fstab to avoid complexity / complications. Remember you may need to manually write a mount point in fstab, but this only needs to be done once to stay persistent. Need to temporarily remove it ? umount /mount/point. Need to change this for a longer period of time ? Comment out the mount point in fstab.

I am sure there is even a way you could have the drive mount every time you log in, and umount every time you log out via .profile but . . . yeah outside of my personal abilities… .

What might this output from ‘mount’ indicate?

/dev/mmcblk0p1 on /media/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

My automounts have stopped working and I noticed that errors=remount-ro above.

man mount for more details but basically the command mount with no parameters lists all mount points on a Linux system.

Normally mount with no parameters is used to check if a device is auto mounted or not Usually right after creating a new partition, and file system on a block device.

Anyone who hasn’t found this solution yet check out the circuit co. solution here. Piece of advice. I suggest using terminal editors such as nano to add uEnv.txt to the volume. I was able to format the disk with an SD to USB adapter in Mac OSX and add uEnv.txt in terminal. I tried TextEdit first but it added some formatting that is not desirable and didn’t let the BBB boot.

It is now working in our latest test image. Hopefully we will have a formal release here in another week or so. We are waiting on the HDMI update.

Gerald

TI maintainers didn't want to support carriage returns in uEnv.txt. You might search the u-boot mailing list for a patch to fix that.

Regards,

Alexander Holler