How to format a bootable microSD

This tutorial illustrates how to format a microSD cards ready to be used on an Acme Systems Linux boards.

MicroSD card partitioning

Any brand new microSD is usually formatted with an unique big FAT32 partition. In this way the microSD are usable under Linux just as data storage. If you need to boot and use Linux from microSD it needs to be formatted in two partitions.

  • One small FAT32 partition where will be saved the binary image of the bootloader (in our case at91bootstrap saved in boot.bin) and the binary image of the Linux Kernel saved in a file called zImage.
  • Another bigger EXT4 partition where to save the whole root filesystems also called rootfs.
Order # Format type Label name Size
1 FAT32 boot >64MB
2 EXT4 rootfs >800MB


The steps to do to format a brand new microsd are:

  • Delete the existing partitions
  • Create the two new partitions
  • Copy the system file inside the new two partitions

Let's see how to do that using an Ubuntu 15.10 Linux PC.

Insert the microSD in your Linux PC using a microSD card adapter and open a new terminal session by typing ctrl + alt + t.

Type:

$ dmesg
...
[13736.699438] sd 15:0:0:0: [sdb] 3911680 512-byte logical blocks: (2.00 GB/1.86 GiB)
[13736.700061] sd 15:0:0:0: [sdb] Write Protect is off
[13736.700067] sd 15:0:0:0: [sdb] Mode Sense: 4b 00 00 08
[13736.700072] sd 15:0:0:0: [sdb] Assuming drive cache: write through
[13736.702662] sd 15:0:0:0: [sdb] Assuming drive cache: write through
[13736.702671]  sdb: sdb1
[13736.709301] sd 15:0:0:0: [sdb] Assuming drive cache: write through
[13736.709309] sd 15:0:0:0: [sdb] Attached SCSI removable disk
$

This indicates that the unique FAT32 partition of microSD is allocated as /dev/sdb1 disk and mounted on /media/.

It is very important to understand which is the device allocated for the microSD (in this case /dev/sdb ) to avoid to erase your main hard disk (usually /dev/sda).

Install GParted

GParted is a graphical utility useful to create partition on any memory support like hard-disk, pen drive and SD cards.

To install it on your PC use this command:

$ sudo apt-get install gparted

Then launch it from the Ubuntu GUI:

Delete the previous formatting

On the top-right side select the disk /dev/sdb checking if the size match with the size of your microSD.

Starting from this point the following operations will destroy all the data contained on microSD so please be sure that you don't have any useful file on your microSD card.

Unmount all the existing partitions (usually just one) using the right mouse click:

Delete all the existing partitions using the right mouse click:

At the end we will obtain an unique unallocated space.

Right click on it and create the new two partitions:

Add the first one (fat32) in this way:

Add the second one (ext4) in this way:

The final result will be this:

Apply all the changes to the microSD and exit from Gparted:

Remove now the microSD, wait about 10 sec and insert it again. Two new partitions will be mounted automatically on:

  • /media/$USER/boot
  • /media/$USER/rootfs

Where user $USER will be replaced with your Linux user name.

Now proceed to fill these partitions with the contents required by the Acme board.

Suggestions from the users

Some users meet problem to create a bootable microSD following this article.

Here in Acme we used this procedure without problems on more then 4.000 bootable microSD using SanDisk, Sony and Samsung memory card. In case of problems with different microSD brands please read this article:

These instructions use fdisk to create the partitions, which allows a smaller dead space before the start of the first partition.

Many thanks to Eric for this advice.


EUR 18.00


MICROSD8G-E - SanDisk industrial grade 8GB microSD

SanDisk 8GB Industrial grade microSD

| Product description |

EUR 22.00


MICROSD16G-E - SanDisk industrial grade 16GB microSD

SanDisk 16GB Industrial grade microSD

| Product description |

EUR 32.00


MICROSD32G-E - SanDisk industrial grade 32GB microSD

SanDisk 32GB Industrial grade microSD

| Product description |

EUR 20.00


R-LITE-8G-EP - Raspbian Lite 8GB MicroSD for CM3-Panel

Ready to use microSD with preinstalled Raspbian Lite already configured to work with the CM3-Panel

Please note that this card contains Open Source code under GPL license and you are buying just the memory card not the software on it. Any rights to this software or support are not included.

| CM3-Panel |

EUR 20.00


R-DESK-8G-EP - Raspbian Desktop 8GB MicroSD for CM3-Panel

Ready to use microSD with preinstalled Raspbian Desktop already configured to work with the CM3-Panel

Please note that this card contains Open Source code under GPL license and you are buying just the memory card not the software on it. Any rights to this software or support are not included.

| CM3-Panel |

EUR 24.00


R-LITE-16G-EP - Raspbian Lite 16GB MicroSD for CM3-Panel

Ready to use microSD with preinstalled Raspbian Lite already configured to work with the CM3-Panel

Please note that this card contains Open Source code under GPL license and you are buying just the memory card not the software on it. Any rights to this software or support are not included.

| CM3-Panel |

EUR 24.00


R-DESK-16G-EP - Raspbian Desktop 16GB MicroSD for CM3-Panel

Ready to use microSD with preinstalled Raspbian Desktop configured to work with the CM3-Panel

Please note that this card contains Open Source code under GPL license and you are buying just the memory card not the software on it. Any rights to this software or support are not included.

| CM3-Panel |

EUR 34.00


R-LITE-32G-EP - Raspbian Lite 32GB MicroSD for CM3-Panel

Ready to use microSD with preinstalled Raspbian Lite already configured to work with the CM3-Panel

Please note that this card contains Open Source code under GPL license and you are buying just the memory card not the software on it. Any rights to this software or support are not included.

| CM3-Panel |

EUR 34.00


R-DESK-32G-EP - Raspbian Desktop 32GB MicroSD for CM3-Panel

Ready to use microSD with preinstalled Raspbian Desktop already configured to work with the CM3-Panel

Please note that this card contains Open Source code under GPL license and you are buying just the memory card not the software on it. Any rights to this software or support are not included.

| CM3-Panel |

EUR 20.00


DEBM8G-E-RR - Debian microSD 8GB industrial grade for RoadRunner

Bootable 8GB microSD with a preinstalled Debian Linux distribution for RoadRunner SOM.

  • Class 10 HC
  • Temperature range: -25° to +85°

Please note that this card contains Open Source code under GPL licence and you are buying just the memory card not the software on it. Any rights on this software or support are not included.

| Product description |

EUR 20.00


DEBM8G-E-ACQUA - Debian microSD 8GB industrial grade for Acqua A5

Bootable 8GB microSD with a preinstalled Debian Linux distribution for Acqua A5 board.

  • Class 10 HC
  • Temperature range: -25° to +85°

Please note that this card contains Open Source code under GPL licence and you are buying just the memory card not the software on it. Any rights on this software or support are not included.

| Product description |

EUR 20.00


DEBM8G-E-ARIA - Debian microSD 8GB industrial grade for Aria G25

Bootable 8GB microSD with a preinstalled Debian Linux distribution for Aria G25 board.

  • Class 10 HC
  • Temperature range: -25° to +85°

Please note that this card contains Open Source code under GPL licence and you are buying just the memory card not the software on it. Any rights on this software or support are not included.

| Product description |

EUR 20.00


DEBM8G-E-ARIETTA - Debian microSD 8GB industrial grade for Arietta G25

Bootable 8GB microSD with a preinstalled Debian Linux distribution for Arietta G25 board.

  • Class 10 HC
  • Temperature range: -25° to +85°

Please note that this card contains Open Source code under GPL licence and you are buying just the memory card not the software on it. Any rights on this software or support are not included.

| Product description |

EUR 20.00


DEBM8G-E-FOX - Debian microSD 8GB industrial grade for FOX Board G20

Bootable 8GB microSD with a preinstalled Debian Linux distribution for FOX Board G20.

  • Class 10 HC
  • Temperature range: -25° to +85°

Please note that this card contains Open Source code under GPL licence and you are buying just the memory card not the software on it. Any rights on this software or support are not included.

| Product description |

It is possible to make by yourself bootable microSD using blank cards following this article:

Bruna Mandolino Livio Argentini