• Root/
  • Linux/
  • Preparing install media
  • Preparing Linux installation media requires:

    1. Device (typically laptop/desktop computer) capable of writing to a USB flash drive
    2. USB flash drive
    3. ISO file containing install data
    4. program capable of writing ISO file to USB flash drive

    Remember that all data on USB flash drive will be irreversibly deleted during process.

    Universal

    This method works on Linux, Windows and macOS

    balena Etcher

    1. Download balena Etcher
    2. Insert USB flash drive into USB port
    3. Start Etcher
    4. Press Select image and choose ISO file
    5. Select USB flash drive ❗ all data on selected device will be irreversibly destroyed
    6. Press Flash
    7. Wait for process to complete

    Linux

    1. Insert USB flash drive into USB port
    2. Prepare INPUT path (path to ISO file). Command that lists all path to files with name ending on .iso: find / -type f -name *.iso 2>/dev/null
    3. Prepare OUTPUT path (path to USB flash drive). Do not add partition number (it's should be something like /dev/sd?). Command to list all disk devices: lsblk -d -o PATH,SIZE,MODEL,SERIAL -I 8 You only need first value, other are provided to help you with identification.

    ❗ All data on OUTPUT device will be irreversibly destroyed

    dd

    1. sudo dd bs=4M if=INPUT of=OUTPUT conv=fsync oflag=direct status=progress
    2. sudo sync

    pv

    ❕ progress is useless; it does not include data being actually written on device
    1. sudo pv INPUT > OUTPUT
    2. sudo sync

    cp

    ❕ no progress indication
    1. sudo cp INPUT OUTPUT
    2. sudo sync

    Windows

    Rufus

    1. Download Rufus
    2. Insert USB flash drive
    3. Start Rufus
    4. Select ISO file
    5. Select USB flash drive ❗ all data on selected device will be irreversibly destroyed
    6. Press Start

    macOS

    cat

    1. Prepare OUTPUT path (path to USB flash drive). Command to list all device names: diskutil list
    2. Unmount USB flash drive (/dev/diskN): diskutil unmountDisk /dev/diskN
    3. Write ISO to OUTPUT (/dev/rdiskN instead of /dev/diskN) sudo sh -c "cat INPUT > /dev/rdiskN"

    External resources

    Last update: 2024-06-17