Step 2

Firmware Selection and Flashing

This guide covers ImmortalWrt image selection, SD card flashing, and first-boot verification.

4 min readUpdated Aug 10, 2026The LuCI interface opens
On this page
  1. Pre-flash checks
  2. Download the correct image
  3. EXT4 and SQUASHFS
  4. Recommended method: balenaEtcher
  5. Windows notes
  6. macOS: recommended and command-line methods
  7. 1. Identify the SD card
  8. 2. Unmount it
  9. 3. Write the extracted image
  10. 4. Eject it
  11. First boot
  12. Verification
  13. Common failures

Firmware Selection and Flashing

This guide covers ImmortalWrt image selection, SD card flashing, and first-boot verification.

Acceptance result: after the Pi has booted for 2–5 minutes, the computer can open http://192.168.1.1.

Pre-flash checks

  1. The device is a Raspberry Pi 4B, 400, or CM4.
  2. The firmware target is bcm27xx / bcm2711.
  3. Existing data on the SD card has been backed up.

Writing an .img or .img.gz replaces the partition table on the card. Verify the target disk by device name and capacity before writing.

Download the correct image

Search for the device in the ImmortalWrt Firmware Selector, or use a project Release explicitly labeled for Raspberry Pi 4B / 400 / CM4.

A first-install disk image commonly ends in .img.gz. Do not download .apk or .ipk package files, and do not mistake a checksum for a firmware image.

Extracted ImmortalWrt image for Raspberry Pi 4
Example image filename. The release number may differ, but the target platform, device model, and filesystem must match the selected firmware.

EXT4 and SQUASHFS

FilesystemCharacteristicsRecommendation
SQUASHFSRead-only system layer plus writable overlay; supports factory resetPreferred for a first installation
EXT4Directly writable root filesystem; more familiar offline partition resizingChoose when you have a specific EXT4 requirement

Writing a fresh disk image overwrites the target card for both types. Configuration retention depends on the backup and upgrade workflow; SQUASHFS does not mean a fresh image automatically preserves old settings.

balenaEtcher runs on Windows, macOS, and Linux and normally reads .img.gz directly.

  1. Install it from the balenaEtcher website.
  2. Select Flash from file and choose the downloaded image.
  3. Select the SD card as the target.
  4. Confirm the target by capacity and device name.
  5. Start flashing and wait for both writing and verification.
  6. Safely eject the card.

If Etcher cannot read the compressed image, extract .gz to .img and retry.

Windows notes

Windows may ask to format a partition or say that the drive is inaccessible after flashing. Cancel the prompt. Windows normally cannot read the Linux partitions in the image.

The older Win32 Disk Imager interface looks like this:

Select and write the IMG file

When using that tool:

  • select the extracted .img, not .gz
  • confirm that the drive letter belongs to the SD card
  • click Write, not Read

Clicking Read copies the card into the image file. Extract a clean image again and use Write.

Common issue after clicking Read

Prefer balenaEtcher. Use dd only when you understand macOS disk device names.

1. Identify the SD card

Run this before and after inserting the card:

diskutil list

Identify the new disk by capacity, such as /dev/disk6. Do not copy the example number.

2. Unmount it

diskutil unmountDisk /dev/disk6

3. Write the extracted image

sudo dd if=/full/path/immortalwrt.img of=/dev/rdisk6 bs=4m
sync
  • if is the image
  • of is the whole SD card, not one partition
  • /dev/rdiskN is normally faster than /dev/diskN
  • press Control + T to ask macOS dd for status

macOS flashing example

4. Eject it

diskutil eject /dev/disk6

First boot

  1. Insert the card while the Pi is powered off.
  2. Connect Ethernet; wired access is easier for first-boot troubleshooting.
  3. Power on and wait 2–5 minutes.
  4. Open http://192.168.1.1.

Wireless defaults can differ between images. A missing SSID is not enough to conclude that flashing failed; test Ethernet first.

Verification

  • The flashing tool completed writing and verification
  • You did not accept the Windows format prompt
  • The activity LED shows card access after power-on
  • LuCI opens or the computer receives a network address from the Pi

Continue with first login in the quick start.

Common failures

SymptomCheck first
The flashing tool cannot find the imageConfirm .img.gz; extract to .img if necessary
The card looks empty in WindowsLinux partitions are not normally readable; do not reformat
No card activity on the PiPower, card contact, and device-target match
192.168.1.1 does not openWait for first boot, keep one computer network active, check address conflicts
macOS dd reports busy or permission errorsRun unmountDisk and target the whole disk