Create a Bootable MicroSD Card
With the image that you got in the last step, you are ready to create a microSD card with which to boot your Gumstix system.
Supported microSD Cards
Gumstix DuoVero COMs and Overo COMs support SD cards that comply with the SD Association's SD I/O Card Specification version 2.0, including SDHC cards.
In general, your microSD card must have a capacity of least 2.0 GB in order to flash an image.
Prepare Your microSD Card
-
On your development machine, insert your microSD card into the card reader.
-
Determine the device filename of your microSD card in the form sdX, where X is a letter assigned by your computer, using the following command:
$ dmesg
The device name will be in the fourth column between square brackets. E.g.,
[ 23468.560268] sd 8:0:0:0: [sdb] 3862528 512-byte logical blocks: (1.97/1.84 GiB) [ 23468.562125] sd 8:0:0:0: [sdb] No Caching mode page present [ 23468.562128] sd 8:0:0:0: [sdb] Assuming drive cache: write through [ 23468.564871] sd 8:0:0:0: [sdb] No Caching mode page present [ 23468.564874] sd 8:0:0:0: [sdb] Assuming drive cache: write through [ 23468.564874] sdb: sdb1 sdb2 sdb3 In this example, our microSD card has a device filename of sdb, and is 2 GB (1.97 GB) in size. When using the device filename in commands, always remember to use its full path, i.e., /dev/sdb. Note any output showing the filename with a numbered suffix (e.g., sdb1, sdb2 and sdb3 above) as you will need it in the next step.
To automatically insert your device name in the following steps, enter the device filename as it appeared in the previous command's output, but without square brackets:
Device name:This will automatically add your device's full path for the rest of this stage in the Getting Started Guide.
-
Mounted partitions on the drive have numbers after the device name and are shown on the last line of the dmesg output above. Unmount any mounted partitions on the attached device:
$ sudo umount /dev/<DEVICE NAME>{1,2,3}where 1, 2, 3, are the numbers shown after the device name in the last line of your dmesg output. You can use as many as you need separated by commas.
Partitions vs. Drives: In Linux, a physical block device such as a hard drive or an SD card appears in the /dev directory (e.g., /dev/sdb). This device file refers to the entire physical device.
A single physical device can contain multiple individual partitions each with their own file system. These partitions also appear in the /dev directory under the same name, but include a suffix for the partition number (e.g., /dev/sdb1, which is partition #1 of the physical device sdb). Linux makes the file systems on these partitions available by mounting them to a directory in the existing file system. Removable devices are typically mounted to mount points in the /mnt or /media directories.
In the above example, the physical device /dev/sdb has one partition, /dev/sdb1 which is mounted to the mount point /media/Portable.
-
Users of Yocto Project or Angstrom images only: Click here for some additional steps.
Additional Steps for Yocto Project or Angstrom Users
Yocto Project or Angstrom users need to partition and format their microSD cards manually in order to flash an image.
-
Your microSD card needs a special geometry to make the best use of its memory and to be accessible by the DuoVero or Overo boot ROM.
Calculate the required number of cylinders for your particular card with the following steps:
-
Find the size of your card in the output of the following command:
$ sudo fdisk -l /dev/<DEVICE NAME> Disk /dev/<DEVICE NAME>: 2016 MB, 2016411648 bytes
The card size is the bolded number above, and may vary depending on what size of card you use.
-
Divide the card size in bytes by 255 heads, 63 sectors and 512 bytes per sector and round down to the nearest integer.
Enter the size in bytes from the last step below:
E.g., ÷ 255 ÷ 63 ÷ 512 → 245
This is the number of cylinders needed for your drive's geometry.
-
-
To use these images, your microSD card has to have two partitions: a FAT partition containing the boot files and a Linux partition containing the root file system. To create these partitions:
-
Clean up any existing partition data:
$ sudo dd if=/dev/zero of=/dev/<DEVICE NAME> bs=1024 count=1024 -
Create the new partitions using sfdisk:
$ sudo sfdisk -D -uM -H 255 -S 63 -C <NUMBER OF CYLINDERS FROM STEP 1.2> /dev/<DEVICE NAME>
At the sfdisk prompt, type 0,64,0x0C,* followed by Enter to set up a 64 MB bootable FAT32 partition.
At the following prompt, type 75,,,- followed by Enter to create the root filesystem partition.
For the next two prompts, type 0,0,, followed by Enter. Make sure you do this twice.
When prompted, type y + Enter to write the partition table.
-
Finally, you must format the partitions. First, create the boot partition. Be sure to specify the number of the partition to format after /dev/<DEVICE NAME> (e.g., /dev/sdb1, /dev/sdb2):
$ sudo mkfs.vfat -F 32 /dev/<DEVICE NAME>1 -n bootIf your computer is missing the mkfs.vfat program, try installing the dosfsutils package and try again:
$ sudo apt-get install dosfsutils
Now create the Linux root filesystem partition:
$ sudo mke2fs -j -L rootfs /dev/<DEVICE NAME>2
-
Your microSD card is now ready to be flashed with the boot and root filesystem images.
-
Write the Images to microSD
Select the line of Gumstix COM you are using:
DuoVero Series
Steve Sakoman's DuoVero images include a script that will automatically create a bootable microSD card for the DuoVero:
- Make sure that you downloaded the file mksdcard.sh in the last step
- Make this file executable with the following command:
$ chmod +x mksdcard.sh
- To create the bootable microSD card, use the following command:
$ sudo ./mksdcard.sh /dev/<DEVICE NAME> duovero consoledev
Your bootable microSD card is now ready to use.
Overo and Verdex Pro Series
Select the set of instructions for the platform you chose in the last stage:
The process of flashing a pre-built Linaro image is simple, but caution must be taken when specifying the device file.
The following commands will erase all partitions and data on your microSD card. Move any valuable data before proceeding.
- In a terminal, change to the folder where you downloaded the image.
- Extract the image you downloaded with this command:
gunzip <IMAGE FILENAME>.gz
This will extract the image to a file which usually has the same name, but without the .gz extension. This is the image you need to use.
-
Use the following command to flash the image, ensuring that you use the correct device name and the filename for the expanded image:
$ dd if=<IMAGE FILENAME> of=/dev/<DEVICE NAME>where <IMAGE FILENAME> is the image you extracted in the previous step and <DEVICE NAME> is the entire device name.
-
It typically takes approximately one hour to flash an 8 GB Gumstix Linaro image, depending on the microSD card reader and card.
The dd command does not display progress until it has finished running, but it is possible to force output with the following steps:
-
Send a USR1 signal to the dd process with the following command:
$ sudo kill -USR1 $(pgrep '^dd$')
This does not stop the process, but rather displays the current progress
-
It is possible to continuously display progress at specified intervals with the following command:
$ sudo watch -n <INTERVAL IN SECONDS> kill -USR1 $(pgrep '^dd$')
-
Installing a Yocto Project or Angstrom image is slightly more complex than installing a Linaro image.
A complete Yocto Project or Angstrom installation consists of the following core files (actual filenames may differ slightly):
| Filename | Function |
|---|---|
| rootfs.tar.bz2 | A root file system. |
| uImage | A kernel binary image. |
| u-boot.bin | A Das U-Boot bootloader binary image. |
| MLO (or mlo-updated for Overo STORM COMs) | An second-stage bootloader binary image for Overo COMs |
These files are included in the Yocto Project and Angstrom download directories as individual files.
To install the images:
-
Mount the partitions you created in the last step with the following commands:
$ sudo mkdir /media/{boot,rootfs} Note: You only need to do this if you have not created these directories before. $ sudo mount -t vfat /dev/<DEVICE NAME>1 /media/boot $ sudo mount -t ext3 /dev/<DEVICE NAME>2 /media/rootfs -
Install the bootloader binary and Linux kernel binary image.
For Overo COMs only: MLO (the second-stage bootloader binary) must be copied first
$ sudo cp MLO /media/boot/MLO
Next, copy the Das U-Boot bootloader binary and kernel image to the boot partition:
$ sudo cp u-boot.bin /media/boot/u-boot.bin $ sudo cp uImage /media/boot/uImage
-
Expand the root file system archive onto the second partition:
$ sudo tar xaf rootfs.tar.bz2 -C /media/rootfs $ sync
-
Unmount the partitions:
$ sudo umount /media/boot $ sudo umount /media/rootfs
Your bootable microSD card is now ready to use.
Pepper Single-Board Computer
A complete Yocto Project installation consists of the following core files (actual filenames may differ slightly):
| Filename | Function |
|---|---|
| rootfs.tar.bz2 | A root file system. |
| uImage | A kernel binary image. |
| u-boot.bin | A Das U-Boot bootloader binary image. |
| MLO (or mlo-updated for Overo STORM COMs) | An second-stage bootloader binary image for Overo COMs |
These files are included in the Yocto Project download directories as individual files.
To install the images:
-
Mount the partitions you created in the last step with the following commands:
$ sudo mkdir /media/{boot,rootfs} Note: You only need to do this if you have not created these directories before. $ sudo mount -t vfat /dev/<DEVICE NAME>1 /media/boot $ sudo mount -t ext3 /dev/<DEVICE NAME>2 /media/rootfs -
Install the bootloader binaries and Linux kernel binary image.
MLO (the second-stage bootloader binary) must be copied first
$ sudo cp MLO /media/boot/MLO
Next, copy the Das U-Boot bootloader binary and kernel image to the boot partition:
$ sudo cp u-boot.bin /media/boot/u-boot.bin $ sudo cp uImage /media/boot/uImage
-
Expand the root file system archive onto the second partition:
$ sudo tar xaf rootfs.tar.bz2 -C /media/rootfs $ sync
-
Unmount the partitions:
$ sudo umount /media/boot $ sudo umount /media/rootfs
Your bootable microSD card is now ready to use.


