Difference between revisions of "Flashing Removable Media"
Stephen304 (talk | contribs) m (Stephen304 moved page Flashing with Etcher to Flashing Removable Media without leaving a redirect) |
Stephen304 (talk | contribs) (→CLI) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Devices that support removable media are relatively easy to flash with a custom firmware. The process involves simply writing a file to the drive. Several methods of doing this are outlined below. | |
== Prerequisites == | == Prerequisites == | ||
− | In order to flash a firmware file | + | In order to flash a firmware file to removable media, you will need 2 things: |
− | |||
# A firmware file to flash | # A firmware file to flash | ||
# Removable media that is compatible with your device | # Removable media that is compatible with your device | ||
− | If you don't have the firmware file, the wiki page for your device should include a download link as well as details on what type of media is compatible. Once you have these, | + | If you don't have the firmware file, the wiki page for your device should include a download link as well as details on what type of media is compatible. Once you have these, choose a method below to flash the firmware. |
+ | |||
+ | == Etcher == | ||
+ | Etcher is a program that writes disk images to digital media. It is designed to be easy to use and resistant to errors, making it useful for flashing devices that use removable storage. | ||
+ | |||
+ | We recommend using Etcher to write the firmware due to its ease of use. | ||
− | == Installing Etcher == | + | === Installing Etcher === |
Etcher can be downloaded from the [https://www.balena.io/etcher/ Etcher website] or using your package manager. It comes in 2 versions: A graphical version that enables drag and drop functionality and a command line version that enables power users to script and automate flashing. | Etcher can be downloaded from the [https://www.balena.io/etcher/ Etcher website] or using your package manager. It comes in 2 versions: A graphical version that enables drag and drop functionality and a command line version that enables power users to script and automate flashing. | ||
− | == Flashing with Etcher == | + | === Flashing with Etcher === |
− | === Graphical Etcher === | + | ==== Graphical Etcher ==== |
After installing etcher: | After installing etcher: | ||
Line 22: | Line 26: | ||
# Click "Flash!" and wait for it to finish | # Click "Flash!" and wait for it to finish | ||
− | === CLI Etcher === | + | ==== CLI Etcher ==== |
Flashing the firmware with the CLI version of Etcher is as simple as running: | Flashing the firmware with the CLI version of Etcher is as simple as running: | ||
Line 28: | Line 32: | ||
Etcher will ask which drive to write to and proceed to write the firmware. | Etcher will ask which drive to write to and proceed to write the firmware. | ||
+ | |||
+ | == CLI == | ||
+ | You can locate your removable media by running <code>sudo fdisk -l</code> the following commands: | ||
+ | |||
+ | Take note of the output. It should contain something like <code>/dev/mmcblk0</code>. That's your memory card. | ||
+ | |||
+ | The firmware builder may produce a compressed image file. The following command uncompresses the file and sends it to the removable media. '''Be sure to replace the bold filename with the firmware file for your specific device and the bold path to removable media with the path on your system before running the command.''' | ||
+ | |||
+ | <code>zcat <b>openwrt-massmesh-meshnode-mvebu-cortexa53-globalscale_espressobin-squashfs-sdcard.img.gz</b> | sudo dd of=<b>/dev/mmcblk0</b></code> | ||
== Next Steps == | == Next Steps == | ||
Once the firmware has been written to the removable media, return to the page for your device to continue. | Once the firmware has been written to the removable media, return to the page for your device to continue. |
Latest revision as of 09:17, 4 July 2019
Devices that support removable media are relatively easy to flash with a custom firmware. The process involves simply writing a file to the drive. Several methods of doing this are outlined below.
Contents
Prerequisites
In order to flash a firmware file to removable media, you will need 2 things:
- A firmware file to flash
- Removable media that is compatible with your device
If you don't have the firmware file, the wiki page for your device should include a download link as well as details on what type of media is compatible. Once you have these, choose a method below to flash the firmware.
Etcher
Etcher is a program that writes disk images to digital media. It is designed to be easy to use and resistant to errors, making it useful for flashing devices that use removable storage.
We recommend using Etcher to write the firmware due to its ease of use.
Installing Etcher
Etcher can be downloaded from the Etcher website or using your package manager. It comes in 2 versions: A graphical version that enables drag and drop functionality and a command line version that enables power users to script and automate flashing.
Flashing with Etcher
Graphical Etcher
After installing etcher:
- Open the application and connect your removable media to your commputer
- Click "Select image" and choose the firmware file that you downloaded from your device page
- Click "Select drive" and choose the removable media you wish to write to
- Click "Flash!" and wait for it to finish
CLI Etcher
Flashing the firmware with the CLI version of Etcher is as simple as running:
etcher firmware.img.gz
Etcher will ask which drive to write to and proceed to write the firmware.
CLI
You can locate your removable media by running sudo fdisk -l
the following commands:
Take note of the output. It should contain something like /dev/mmcblk0
. That's your memory card.
The firmware builder may produce a compressed image file. The following command uncompresses the file and sends it to the removable media. Be sure to replace the bold filename with the firmware file for your specific device and the bold path to removable media with the path on your system before running the command.
zcat openwrt-massmesh-meshnode-mvebu-cortexa53-globalscale_espressobin-squashfs-sdcard.img.gz | sudo dd of=/dev/mmcblk0
Next Steps
Once the firmware has been written to the removable media, return to the page for your device to continue.