Write Image to SD Card

This guide provides step-by-step instructions on how to write an image to an SD card using Balena Etcher. Balena Etcher is a user-friendly and open-source tool designed for flashing operating system images to SD cards, USB drives, and other removable storage devices. It simplifies the process of writing images to storage media like sd-cards.

 BalenaEtcher UI


Prerequisites

  • Computer with Windows, Linux or MacOS
  • Administrator Rights
  • SD card reader on your computer
  • Image file to write to the SD card (e.g. .wic, .img, .iso)

Download and install Balena Etcher on your computer:

Balena Etcher Download

Insert the SD card into your computer's SD card reader.

Launch Balena Etcher on your computer.

  1. Click on the “Flash from file” button.
  2. Select the image file you want to write to the SD card.
  1. Click on the “Select target” button.
  2. Choose your SD card from the list.
Make sure you select the correct SD card. The size and name of the card can be used here.

Important!

Ensure that you have backed up any important data on the SD card before starting this process, as it will be overwritten!
  1. Click on the “Flash!” button to start writing the image to the SD card.
  2. Balena Etcher will validate the write process.
  1. Once the flashing process is complete, Balena Etcher will display a success message.
  2. Safely eject the SD card from your computer.

This guide provides step-by-step instructions on how to write an image to an SD card using the dd command on a Linux system.

Prerequisites:

  • Linux computer
  • SD card reader on your computer
  • Image file to write to the SD card

Insert the SD card into your computer's SD card reader.

Open a terminal and run the following command to list connected storage devices:

lsblk

Identify your SD card device from the list. It will typically be something like /dev/sdX, where X is a letter corresponding to your SD card.

Make sure you select the correct SD card.
You can also write to eMMCs. In this case, the name changes to /dev/mmcblkX

Important!

Ensure that you have backed up any important data on the SD card before starting this process, as it will be overwritten!

Run the dd command to write the image to the SD card. Replace /path/to/image.wic with the path to your image file, and /dev/sdX with your SD card device:

sudo dd if=/path/to/image.wic of=/dev/sdX conv=fsync bs=1M status=progress

This command reads the image file (if) and writes it to the SD card device (of). The status=progress option provides real-time progress information.

After dd completes, run the following command to sync and ensure all data is written to the SD card:

sudo sync

Eject the SD card from your computer:

sudo eject /dev/sdX

The SD card is now ready for use.

  • Last modified: 2024/01/19 15:24