Recovery¶
Important: If you came here since you cannot get Armbian running on your board please keep in mind that in 95 percent of all cases it is either a faulty/fraud/counterfeit SD card or an insufficient power supply that is causing these sorts of does not work issues!
The following are presented in (more or less) increasing levels of despair. But keep heart! :) And proceed in order.
U-Boot Shell Access¶
If you broke the system you can try to get in this way. You have to get to u-boot command prompt, using either a serial adapter or monitor and usb keyboard.
- Note: USB support in u-boot is currently not enabled on all H3 boards.
After switching power on or rebooting, when u-boot loads up, press some key on the keyboard (or send some key presses via terminal) to abort default boot sequence and get to the command prompt:
Bash Session | |
---|---|
Enter the following commands, replacing root device path if necessary.
- Note: these are for booting with mainline kernel; check
boot.cmd
for your device for commands related to legacy kernel.
For serial:
Bash Session | |
---|---|
For monitor:
Bash Session | |
---|---|
Then:
Bash Session | |
---|---|
System should eventually boot to bash shell:
Bash Session | |
---|---|
Now you can try to fix your broken system.
Replacing /boot¶
When something goes terribly wrong and you are not able to boot the system (and cannot gain access via u-boot as outlined above), this is the way to proceed. You will need some Debian based Linux machine where you can mount the failed SD card. With this procedure you will reinstall the kernel and hardware settings. In most cases this should be enough to unbrick the board.
It is recommended to issue a filesystem check before mounting. Replace X
and Y
below with your device and partition(s), respectively (if not a flash based device, it may even be /dev/sdXY
, etc).
Bash Session | |
---|---|
Mount the SD card.
Make another temporary directory somewhere else (in our example ~/tmp/recovery
) and download the Linux root, kernel, firmware and dtb packages for your board and currently used OS.
- Note: This example is only for Nanopi Neo 2 with Ubuntu Focal, current kernel (mainline) and Armbian 20.08.13 firmware. Alter package names according to your device name, SOC-family, kernel and firmware version!
Extract all the Debian packages (.deb
files) to the mounted sd card.
Bash Session | |
---|---|
Navigate to /mnt/sdcard/boot
and create symlinks:
Bash Session | |
---|---|
If you upgrade from some very old build, you might need to update your boot script.
- Note: The following example is for Allwinner boards.
- Note: You will need a
u-boot-tools
package on your host system.
Bash Session | |
---|---|
Unmount SD card.
Move it to the board and power on. Check serial output for errors if problems persist.
Flashing boot loader¶
Sometimes we need to flash boot loader from some other Linux. Attach an SD card reader with your SD card and proceed this way:
Move it to the board and power on. Check serial output for errors if problems persist.