1 1
EtlARM

Upgrade failed on CubieTruck

Recommended Posts

I have Armbian 4.5 Jessy Legacy 3.4.109 running in the internal NAND and tried to do apt-get update+upgrade what bricked the device. As precaution I setup an identical system on a CubieBoard 2, where the upgrade went fine. After two days of testing on this test board, I tried it the same way on my real server but it failed. The board is not completely bricked, but network is not working anymore which limits my access dramatically.
 
This is what I did and the output during upgrade:


root@Cube# uname -a
Linux Cube 3.4.109-sun7i #5 SMP PREEMPT Wed Oct 14 20:33:00 CEST 2015 armv7l GNU/Linux
 
root@Cube# apt-get update
Get:1 http://security.debian.orgjessie/updates InRelease [63.1 kB]
Hit http://apt.armbian.comjessie InRelease
Hit http://apt.armbian.comjessie/main armhf Packages
Ign http://httpredir.debian.orgjessie InRelease
Get:2 http://httpredir.debian.orgjessie-updates InRelease [136 kB]
Get:3 http://security.debian.orgjessie/updates/main Sources [106 kB]
Get:4 http://httpredir.debian.orgjessie Release.gpg [2,373 B]
Get:5 http://security.debian.orgjessie/updates/contrib Sources [1,434 B]
Get:6 http://security.debian.orgjessie/updates/non-free Sources [14 B]
Ign http://apt.armbian.comjessie/main Translation-en
Get:7 http://security.debian.orgjessie/updates/main armhf Packages [184 kB]
Get:8 http://httpredir.debian.orgjessie Release [148 kB]
Get:9 http://httpredir.debian.orgjessie-updates/main Sources [2,296 B]
Get:10 http://security.debian.orgjessie/updates/contrib armhf Packages [1,131 B]
Get:11 http://security.debian.orgjessie/updates/non-free armhf Packages [14 B]
Get:12 http://security.debian.orgjessie/updates/contrib Translation-en [1,211 B]
Get:13 http://security.debian.orgjessie/updates/main Translation-en [101 kB]
Get:14 http://security.debian.orgjessie/updates/non-free Translation-en [14 B]
Get:15 http://httpredir.debian.orgjessie-updates/contrib Sources [32 B]
Get:16 http://httpredir.debian.orgjessie-updates/non-free Sources [32 B]
Get:17 http://httpredir.debian.orgjessie-updates/main armhf Packages/DiffIndex [367 B]
Get:18 http://httpredir.debian.orgjessie-updates/contrib armhf Packages [32 B]
Get:19 http://httpredir.debian.orgjessie-updates/non-free armhf Packages [32 B]
Get:20 http://httpredir.debian.orgjessie-updates/contrib Translation-en [14 B]
Get:21 http://httpredir.debian.orgjessie-updates/main Translation-en [2,506 B]
Get:22 http://httpredir.debian.orgjessie-updates/non-free Translation-en [14 B]
Hit http://httpredir.debian.orgjessie/main Sources
Hit http://httpredir.debian.orgjessie/contrib Sources
Hit http://httpredir.debian.orgjessie/non-free Sources
Hit http://httpredir.debian.orgjessie/main armhf Packages
Hit http://httpredir.debian.orgjessie/contrib armhf Packages
Hit http://httpredir.debian.orgjessie/non-free armhf Packages
Get:23 http://httpredir.debian.orgjessie/contrib Translation-en [38.4 kB]
Get:24 http://httpredir.debian.orgjessie/main Translation-en [4,585 kB]
Get:25 http://httpredir.debian.orgjessie/non-free Translation-en [72.2 kB]
Fetched 5,446 kB in 57s (94.5 kB/s)
Reading package lists... Done

root@Cube# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  isc-dhcp-client isc-dhcp-common linux-firmware-image-sun7i linux-headers-sun7i linux-image-sun7i linux-jessie-root-cubietruck
6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 425 kB/21.8 MB of archives.
After this operation, 817 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://security.debian.org/jessie/updates/main isc-dhcp-client armhf 4.3.1-6+deb8u2 [230 kB]
Get:2 http://security.debian.org/jessie/updates/main isc-dhcp-common armhf 4.3.1-6+deb8u2 [195 kB]
Fetched 425 kB in 0s (1,095 kB/s)
(Reading database ... 51277 files and directories currently installed.)
Preparing to unpack .../isc-dhcp-client_4.3.1-6+deb8u2_armhf.deb ...
Unpacking isc-dhcp-client (4.3.1-6+deb8u2) over (4.3.1-6) ...
Preparing to unpack .../isc-dhcp-common_4.3.1-6+deb8u2_armhf.deb ...
Unpacking isc-dhcp-common (4.3.1-6+deb8u2) over (4.3.1-6) ...
Preparing to unpack .../linux-firmware-image-sun7i_4.81_armhf.deb ...
Unpacking linux-firmware-image-sun7i (4.81) over (4.51) ...
Preparing to unpack .../linux-headers-sun7i_4.81_armhf.deb ...
Unpacking linux-headers-sun7i (4.81) over (4.51) ...
Preparing to unpack .../linux-image-sun7i_4.81_armhf.deb ...
Unpacking linux-image-sun7i (4.81) over (4.51) ...
Preparing to unpack .../linux-jessie-root-cubietruck_4.81_armhf.deb ...
Unpacking linux-jessie-root-cubietruck (4.81) over (4.5) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17+deb8u2) ...
Setting up isc-dhcp-common (4.3.1-6+deb8u2) ...
Setting up isc-dhcp-client (4.3.1-6+deb8u2) ...
Setting up linux-firmware-image-sun7i (4.81) ...
Setting up linux-headers-sun7i (4.81) ...
Setting up linux-image-sun7i (4.81) ...
Setting up linux-jessie-root-cubietruck (4.81) ...

root@Cube# reboot


After the final reboot I was not able to connect to the server anymore (via network).
 
When connecting a monitor and keyboard, I can login, the system works somehow, but I'm not able to establish network connection. When looking to the file dates in /boot and issuing "uname -a" it seems to me, that old 109 kernel is still active. This produces conflicts in /lib/modules/3.4.109-sun7i/modules.deb.bin which is probably the cause for not working network.
 
Has anybody a clue what went wrong during the upgrade process?
 
What is the best way to recover the system?
Might it be sufficient to replace /boot/uImage ? Where do I get the 110 version (the official download image is 109)?
 
I have a rsync (live) backup from the moment before the upgrade. But as it failed once, it will probably fail again when I try to install updates. Therefore I would prefer to fix the current state.

Share this post


Link to post
Share on other sites

Some feedback from my investigation:

It seems that the upgrade process put the kernel as /boot/zImage into /dev/nand1

As uEnv.txt points to uImage it is obvious, that the old kernel is started.

 

I have tried to edit uEnv.txt to point to zImage and as second experiment I copied zImage to uImage.

When doing so, the device is not starting anymore, just network leds are blinking, HDD remains silent...

Copying back the 109 version enables boot again, but with the problems from above.

 

What finally helped was a:

apt-get --reinstall install linux-image-sun7i

so probably the 110 version in zImage was faulty? Any clue how this could happen?

 

 

(For testing I have now a fresh SD-Card version of Armbian 4.5. In this case the upgrade went as intended.)

Share this post


Link to post
Share on other sites

I just try with fresh Debian Jessie 4.5.

 

1. Download

2. Install to NAND

3. apt-get update & upgrade

4. working normally

 

Upgrade might fail if you change some (critical) things, if you ran out of space, ...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
1 1