Posted on

How to recover the OAK Appliance

To recover the OAK Appliance you have to preparing an 8G at least SD card, a 16G at least USB flash disk. Also, the USB flash disk has to formatted to vfat or ext4 to support bigger than 4G file in single.

Download the recovery image from this link, and the OAK Appliance 1.0.1 version firmware from this link. After downloading the image, use this https://www.balena.io/etcher/ SD writing tool to burn the recovery image to an 8G at least SD card, copy the OAK Appliance image to a USB flash disk after unzipping it.

When done, open the OAK Appliance enclosure, insert the recovery SD card to the SD slot as below picture shows position

SD Card slot poistion

Plug the power and ethernet cable of OAK appliance, the OAK Appliance will try to booting up the recovery image from SD card, wait up 50 seconds, try to SSH log into it with 192.168.4.98, username/password pi/pi.

Plug the USB flash disk to OAK Appliance, the OAK Appliance should be recognized it as below shows

[   12.267134] usb 2-1: new high-speed USB device number 2 using ehci-platform
[ 12.434215] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 12.435974] scsi host0: usb-storage 2-1:1.0
[ 14.078740] scsi 0:0:0:0: Direct-Access Lexar USB Flash Drive 1100 PQ: 0 ANSI: 6
[ 14.079803] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 14.080498] sd 0:0:0:0: [sda] 250068992 512-byte logical blocks: (128 GB/119 GiB)
[ 14.081585] sd 0:0:0:0: [sda] Write Protect is off
[ 14.081598] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 14.082680] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 14.090422] sda:
[ 14.094997] sd 0:0:0:0: [sda] Attached SCSI removable disk

Mount it to /mnt folder like below shows

root@OAK-APP-Lite:~# mount /dev/sda /mnt/
root@OAK-APP-Lite:~# cd /mnt/
root@OAK-APP-Lite:/mnt# ls -l
-rwxr-xr-x 1 root root 3847225344 Jan 3 2019 switchpi-oakapp-1.0.1.img
-rwxr-xr-x 1 root root 596906364 Mar 18 2019 switchpi-oakapp-1.0.1.img.zip

And then use the DD command to burn it to the OAK Appliance eMMC disk, make sure you use the correct mmc device id, as the OAK Appliance recognized SD and eMMC to same device but different ID, for the OAK Appliance, the ID mostly is 2, and should like below shows(you might have an 8G eMMC, but the ID should same to 4G)

[    2.163098] sunxi-mmc 1c11000.mmc: base:0xffff000008ded000 irq:9
[ 2.284309] mmc2: new high speed MMC card at address 0001
[ 2.290236] mmcblk2: mmc2:0001 4FPD3R 3.64 GiB
[ 2.295020] mmcblk2boot0: mmc2:0001 4FPD3R partition 1 4.00 MiB
[ 2.301165] mmcblk2boot1: mmc2:0001 4FPD3R partition 2 4.00 MiB
[ 2.308457] mmcblk2: p1 p2
root@OAK-APP-Lite:/mnt# dd if=switchpi-oakapp-1.0.1.img of=/dev/mmcblk2 bs=4M

The above command will take about 2 minutes to finish, when done, it looks like below

917+1 records in
917+1 records out
3847225344 bytes (3.8 GB, 3.6 GiB) copied, 182.244 s, 21.1 MB/s

Then umount the USB flash disk, power off the OAK Appliance with commands

root@OAK-APP-Lite:/mnt# cd 
root@OAK-APP-Lite:~# umount /mnt/
root@OAK-APP-Lite:~# poweroff

Wait up to 30 seconds, unplug the power supply and remove the SD card, and start again OAK Appliance, you should get the OAK Appliance fully recovered.

What’s the next

You can follow this link to configure your OAK Appliance again.

Leave your message to below if you have any trouble when you try to recover your OAK Appliance