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.



MICROSD8G-E
EUR 18.00


SanDisk industrial grade 8GB microSD

SanDisk 8GB Industrial grade microSD

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

FCR-MRG2
EUR 5.00


USB microSD/SDHC/SDXC Reader

USB microSD/SDHC/SDXC Reader

  • Versatile reader works with microSD/microSDHC/microSDXC cards
  • Compliant with USB 2.0 SD Card Association specification
  • Easily plugs in to any USB 2.0 or 3.0 port
| Product info |

MICROSD4G
EUR 8.00


Blank 4GB microSD HC card

Blank 4GB microSD memory card.

| Product description |

MICROSD8G
EUR 10.00


Blank 8GB microSD HC card

Blank 8GB microSD memory card.

| Product description |

MICROSD16G
EUR 14.00


Blank 16GB microSD HC card

Blank 16GB microSD memory card.

| Product description |

MICROSD32G
EUR 20.00


Blank 32GB microSD HC card

Blank 16GB microSD memory card.

| Product description |

MICROSD64G
EUR 33.00


Blank 64GB microSD HC card

Blank 64GB microSD memory card.

| Product description |

MICROSD128G
EUR 56.00


Blank 128GB microSD HC card

Blank 128GB microSD memory card.

| Product description |

DEBM8G-E-ACQUA
EUR 20.00


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 |

DEBM4G-ACQUA
EUR 10.00


Debian microSD 4GB for Acqua A5

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

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.

| Other sizes |

DEBM8G-ACQUA
EUR 12.00


Debian microSD 8GB for Acqua A5

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

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 |

DEBM16G-ACQUA
EUR 16.00


Debian microSD 16GB for Acqua A5

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

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 |

DEBM32G-ACQUA
EUR 22.00


Debian microSD 32GB for Acqua A5

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

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 |

DEBM64G-ACQUA
EUR 35.00


Debian microSD 64GB for Acqua A5

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

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 |

DEBM128G-ACQUA
EUR 58.00


Debian microSD 128GB for Acqua A5

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

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 |

DEBM8G-E-ARIA
EUR 20.00


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 |

DEBM4G-ARIA
EUR 10.00


Debian microSD 4GB for Aria-G25

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

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 |

DEBM8G-ARIA
EUR 12.00


Debian microSD 8GB for Aria-G25

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

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 |

DEBM16G-ARIA
EUR 16.00


Debian microSD 16GB for Aria-G25

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

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 |

DEBM32G-ARIA
EUR 22.00


Debian microSD 32GB for Aria-G25

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

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 |

DEBM64G-ARIA
EUR 35.00


Debian microSD 64GB for Aria-G25

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

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 |

DEBM128G-ARIA
EUR 58.00


Debian microSD 128GB for Aria-G25

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

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 |

DEBM8G-E-ARIETTA
EUR 20.00


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 |

DEBM4G-ARIETTA
EUR 10.00


Debian microSD 4GB for Arietta-G25

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

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 |

DEBM8G-ARIETTA
EUR 12.00


Debian microSD 8GB for Arietta-G25

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

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 |

DEBM16G-ARIETTA
EUR 16.00


Debian microSD 16GB for Arietta-G25

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

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 |

DEBM32G-ARIETTA
EUR 22.00


Debian microSD 32GB for Arietta-G25

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

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 |

DEBM64G-ARIETTA
EUR 35.00


Debian microSD 64GB for Arietta-G25

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

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 |

DEBM128G-ARIETTA
EUR 58.00


Debian microSD 128GB for Arietta-G25

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

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 |

DEBM8G-E-FOX
EUR 20.00


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 |

DEBM4G-FOX
EUR 10.00


Debian microSD 4G for FOX G20

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

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 |

DEBM8G-FOX
EUR 12.00


Debian microSD 8GB for FOX G20

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

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 |

DEBM16G-FOX
EUR 16.00


Debian microSD 16GB for FOX G20

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

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 |

DEBM32G-FOX
EUR 22.00


Debian microSD 32GB for FOX G20

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

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 |

Normally the microSD sold on this catalog are the following:

Unfortunately we can't ensure the availability of the same models so we could change them with an equivalent or better features/brand/model (usually Sony or SanDisk).

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