Bananian

Upgrade to 15.08 from 15.04

15 6970
I was about to do this but there was a warning that this may break SATA systems. I have BananaPi first edition which boots from an SD card and then runs from a 120 GB SATA SSD. Can I do this upgrade and if so what do I need to do?

Thanks.
Edited by johnvick at Sat Aug 22, 2015 16:55

Just looked into this a bit more. On a spare SD card I installed 15.08. The new boot loader script is this:

#--------------------------------------------------------------------------------------------------------------------------------
# Boot loader script to boot with different boot methods for old and new kernel
# Credits: https://github.com/igorpecovnik - Thank you for this great script!
#--------------------------------------------------------------------------------------------------------------------------------
if load mmc 0:1 0x00000000 uImage-next
then
# mainline kernel >= 4.x
#--------------------------------------------------------------------------------------------------------------------------------
setenv bootargs console=ttyS0,115200 console=tty0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
load mmc 0:1 0x49000000 dtb/${fdtfile}
load mmc 0:1 0x46000000 uImage-next
bootm 0x46000000 - 0x49000000
#--------------------------------------------------------------------------------------------------------------------------------
else
# sunxi 3.4.x
#--------------------------------------------------------------------------------------------------------------------------------
setenv bootargs console=ttyS0,115200 console=tty0 console=tty1 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1680x1050p60 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
setenv bootm_boot_mode sec
load mmc 0:1 0x43000000 script.bin
load mmc 0:1 0x48000000 uImage
bootm 0x48000000
#--------------------------------------------------------------------------------------------------------------------------------
fi

What I guess is that if I do an in place upgrade with the existing 15.04 (with os on SSD) then change root=/dev/mmcblk0p2 in the above boot script on the SD card to root=/dev/sda1 it should work?

Anyone any views on this?

Another try. Fresh SD, installed Bananian 15.04. Moved the OS to an 8 GB USB drive (I don't have a spare SSD but the principle should be the same). Upgraded to 15.08. Ignored the warning about it breaking a SATA system. All seemed to go well. After the final reboot the OS loaded from the SD card. I edited the boot loader script to try to get it to run from /dev/sda1 but it didn't work.

I can't be the only person who wants to upgrade a SATA system?

Edited by johnvick at Sun Aug 23, 2015 00:43

OK got this sorted out with some help from the Facebook Bananian feed - please note I have modeifed their instructions, try at your own risk. I did this first with a spare SD card and USB drive to check it worked.

#Run the update - do not reboot

apt-get install u-boot-tools

#edit boot.cmd to your needs

mount /dev/mmcblk0p1 /boot

cd /boot

nano boot.cmd

#rebuild boot.scr

mkimage -C none -A arm -T script -d boot.cmd boot.scr

reboot

Phew, thought I'd lost lots of data (or potentially hacked!) but then realised the upgrade change the boot sequence.

Golden rule, always read the warnings

Anyway, this fixed it for me! Cheers.

ebasta  
When you say "#Run the update - do not reboot".  Do you mean bananian-update or do you mean updating debian first and then bananian-update?

tkaiser  
ebasta replied at Tue Aug 25, 2015 21:39
When you say "#Run the update - do not reboot".  Do you mean bananian-update or do you mean updating ...

After bananian-update you have to alter the contents of boot.cmd and run mkimage otherwise after the next reboot the rootfs will point to the second partition on the SD card and not to the right partition on your SATA or USB disk.

BTW: Using a reference like root=/dev/sda1 instead of "root=UUID=<Partition unique GUID>" is always a bad idea as I tried to outline a while ago

The best way is to use a GPT, check the PARTUUID with gdisk and use this for root=UUID= in boot.cmd (or uEnv.txt with older systems) since device identifiers like sda, sdb might not be persistent across reboots when more than one disk device (a thumb drive is enough) is connected :-)

ebasta  
I guess my question is this: when I run bananian-update i from 15.04 i get this:
Bananian 15.04 was the last release based on Debian 7/Wheezy.

Now you have two options:
-------------------------
1.) Upgrade to Debian 8/Jessie
2.) Stay at Debian 7/Wheezy

Bananian 15.08 (and later versions) will only be available for Debian 8/Jessie.
Debian 7/Wheezy is still supported and will receive kernel and security updates.

Upgrade instructions:
---------------------
1.) sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
2.) apt-get update
3.) apt-get upgrade
4.) apt-get dist-upgrade
5.) shutdown -r now

More detailed instructions on debian.org:

https://www.debian.org/releases/jessie/armhf/release-notes/ch-upgrading.en.html
Am i to follow the instructions here or is bananian-update broken on my system?

No follow those instructions to upgrade to Jessie and once this is done do bananian-update, and then follow the instructions above. Or else stay with what you have.

You have to log in before you can reply Login | Sign Up

Points Rules