Note:
Flashing an OS image and restore OS from backup have identical methods. Any time there is a mention about flashing an OS, it also means restoring an OS from backup.
Which method for flashing / restoring the OS to use? They are sorted from easiest to hardest.
To flash OS into the Edge unit via the service web interface, you must first know the steps to enter service mode. The instructions are available in in this article.
State after the flashing process is finished
Note:
If the USB flash disk is not compatible, the unit will not start the OS image flashing and proceeds to service mode. In that case, you need to use a different flash disk or the above-mentioned flashing via the service interface.
When only .swu backup file is available, it is possible to flash via USB flashdisk.
Note:
If the USB flash disk is not compatible, the unit will not start the OS image flashing and proceeds to service mode. In that case, you need to use a different flash disk or the above-mentioned flashing via the service interface.
Attention:
The following guides are for more experienced users.
Attention:
This method can be used only to restore from backup from the same unit.
This procedure is only possible on devices with Linux OS and root access.
[114570.735872] usb 1-1.3: New USB device found, idVendor=0a5c, idProduct=0104, bcdDevice= 1.00 [114570.735903] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [114570.735917] usb 1-1.3: Product: Raspberry Pi multi-function USB device [114570.735928] usb 1-1.3: Manufacturer: Raspberry Pi [114570.735938] usb 1-1.3: SerialNumber: 10000000ff00a88e [114570.797566] usb-storage 1-1.3:1.0: USB Mass Storage device detected [114570.798207] scsi host0: usb-storage 1-1.3:1.0 [114570.806660] cdc_acm 1-1.3:1.1: ttyACM0: USB ACM device [114571.803910] scsi 0:0:0:0: Direct-Access mmcblk0 PQ: 0 ANSI: 2 [114571.805093] scsi 0:0:0:0: Attached scsi generic sg0 type 0 [114571.806559] sd 0:0:0:0: Power-on or device reset occurred [114571.808665] sd 0:0:0:0: [>>sda<<] 15269888 512-byte logical blocks: (7.82 GB/7.28 GiB) [114571.940909] sd 0:0:0:0: [sda] Write Protect is off [114571.940937] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00 [114572.072867] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sudo sh swu2rpiboot.sh /dev/sdX
Replace the sdX with the device, sda in this case. The backup must be named archive.swu and in directory from where the script is executed.
In case the .raw backup is not available and the device cannot be flashed or restored any other way, it is necessary to use .raw version of Base OS image. This image is intended to restore the device with corrupted boot sector. After restoring the device with this image it is recommended to flash the device with newest version of an OS image or with previously created backup.
Warning:
Using incorrect device could result in the loss of data on a different partition or device. Make sure to perform the recovery only on the block device made by rpiboot.
dd if=backup.raw of=/dev/sdX conv=fsync status=progress
Attention:
Do not use backups from models with greater storage then on the flashed unit. E.g. Using backup created on Unipi Edge model with 16 GB of eMMC to flash onto model with only 8 GB. This could lead to data loss or system corruption on the flashed unit.