I have installed Armbian on my Cubieboard 2 and Banana Pi, and a few hours ago for some reason I want to upgrade the kernel from 4.1.2 to 4.1.6 on both of them, then the story begins...
I.
First, below is a list of partitions on Banana Pi (same on Cubieboard 2)
(notice that I attached a SATA hard drive on it, and created 2 primary partitions)
➜ ~ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 ~~~G ~~~G ~~~G 16% / (where system actually resides)
/dev/sda2 ~~~G ~~~G ~~~G 81% /data (data storage)
/media/mmc/boot 7.3G 813M 6.2G 12% /boot (SD card, used for booting)
I installed my system on /dev/sda1 using
/root/nand-sata-install
To upgrade kernel, I followed the instruction on website, i.e., run the following command as root:
wget -q -O - http://upgrade.armbian.com | bash
After the upgrade completed, I immediately (didn't reboot) used apt-get to upgrade packages
apt-get update && apt-get dist-upgrade
List of installed packages
# installed when I run wget -q -O - http://upgrade.armbian.com | bash
2015-09-15 17:12:24 install libboost-iostreams1.54.0:armhf <none> 1.54.0-4ubuntu3.1
2015-09-15 17:12:25 install libept1.4.12:armhf <none> 1.0.12
2015-09-15 17:12:26 install libsigc++-2.0-0c2a:armhf <none> 2.2.10-0.2ubuntu2
2015-09-15 17:12:26 install aptitude-common:all <none> 0.6.8.2-1ubuntu4
2015-09-15 17:12:28 install libcwidget3:armhf <none> 0.5.16-3.5ubuntu1
2015-09-15 17:12:29 install libxapian22:armhf <none> 1.2.16-2ubuntu1
2015-09-15 17:12:30 install aptitude:armhf <none> 0.6.8.2-1ubuntu4
# installed when I run apt-get update && apt-get dist-upgrade
2015-09-15 17:46:07 install linux-image-next-sunxi:armhf <none> 4.2
2015-09-15 17:48:59 install linux-firmware-image-next-sunxi:armhf <none> 4.2
2015-09-15 17:49:00 install linux-headers-next-sunxi:armhf <none> 4.2
2015-09-15 17:49:21 install linux-u-boot-bananapi:armhf <none> 4.2
2015-09-15 17:49:36 install linux-dtb-next-sunxi:armhf <none> 4.2
2015-09-15 17:49:37 install linux-trusty-root-next-bananapi:armhf <none> 4.2
II.
Then I reboot. Banana Pi goes into a infinite boot loop (Cubieboard 2 also goes into the same loop after upgrading)
first, the screen shows some message:
U-Boot 2015.07-dirty (Aug 25 2015 #$@%$^%)
(...some text I think not related to the issue...)
and the screen flashed into next screen, again with some message:
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
(...messages...)
Rebooting in 10 secconds..
then the first screen, second, first, second, first, second...
After some investigation, I found that /boot/boot.cmd seems to be the culprit of the boot loop, the first line in the file gave the wrong root partition:
setenv bootargs console=tty1 root=/dev/sda2 rootwait rootfstype=ext4 ......
It should be /dev/sda1, so I corrected that to /dev/sda1 and run the following command, then reboot, everything goes fine.
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
I know how to fix it, but has anyone find out the root cause of this issue?
Thanks.