Skip to main content

Prepare MicroSD Card in Ubuntu

Overview

This guide will walk you through the process of preparing a MicroSD card for installing an operating system onto the CM3588. Before proceeding, ensure you have already downloaded the OS image you wish to install.

  1. FriendlyElec Debian
  2. FriendlyElect Ubuntu
  3. Armbian

Prepare the MicroSD Card

If your PC does not have an SD Card slot, you can use a USB MicroSD card reader.

info

If you wish to support my videos and these wikis, please consider using the below affiliate links for the MicroSD card and reader that I use, even if you do not purchase anything, clicking the links may help me earn a small commission

Once the card is inserted into your system, follow the instructions below to wipe and format the MicroSD card.

warning

It is extremely important to make sure you are selecting the correct device as all data will be wiped.

Identify the device on your system:

lsblk

For my system, it is /dev/sda, but it may vary for yours. Look for the size of the MicroSD card to identify it correctly. Since mine is 120GB, it makes sense it would be the entry that has 119.1G. To be extra sure, you can remove the MicroSD card and run the command again to see which entry disappears.

lsblk

Make sure to note the device name (e.g., /dev/sdX) of your MicroSD card. If any of the paritions are mounted, they should be unmounted at this time. This step is not always required, and in the example of above nothing has been mounted.

sudo umount /dev/sdX*

Next, wipe the MicroSD card. If partitions exist on the card, they will automatically be removed when you wipe it. Make sure to replace /dev/sdX with the actual device name of your MicroSD card.

warning

This will erase all data on the MicroSD card, so make sure you have backed up any important data before proceeding. Also make sure you are selecting the correct device as all data will be wiped.

sudo wipefs -a /dev/sdX

wipe

Flash the Image

Flashing the image can be done with a single command by using dd in the CLI.

If you have downloaded an image file that ends with .img.gz, you can use the following command to flash the image to the MicroSD card:

gzip -dc ~/Downloads/rk3588*.img.gz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync

If you have downloaded an image file that ends with .img.xz (such as Armbian), you can use the following command to flash the image to the MicroSD card:

xz -dc ~/Downloads/Armbian*.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync

In the above command, make sure you replace the path to the image with the actual path where you downloaded the image, and replace /dev/sdX with the actual device name of your MicroSD card. This command will decompress the image file and write it directly to the MicroSD card.

info

After it looks like it is complete, there may be a few minute delay before the prompt returns. This is normal as it is flushing the write cache to the MicroSD card.

Once complete, you should see a message indicating the number of bytes transferred and the time taken. This indicates that the image has been successfully flashed to the MicroSD card.

flush

Sync the Filesystem

To ensure that all data has been written to the MicroSD card, run the following command:

sync

This command flushes the filesystem buffers, ensuring that all data is written to the MicroSD card before you remove it. Finally, eject the drive to be sure it is safe to remove:

sudo eject /dev/sdX

The MicroSD card is now ready to be inserted into the CM3588 and booted up. Return to the guide which linked here and continue with the installation instructions.