Simon Porter Posted August 7, 2017 Posted August 7, 2017 So I apologise in advance because I'm sure it's probably on this forum but I could not work out the buzzwords to find it. For whatever reason, I upgraded the cubietruck with armbian which has been on since forever and rebooted for the first time this year. On reboot it failed to find /boot and a few other things and kept bootlooping, resetting itself and then following the same procedure. I already had installed the system to my SATA SSD, so this isn't a huge deal. I've flashed the latest armbian release onto the SD card and it boots fine. Now, I see there is an install to sata option in armbian-config but it gives me the warning that it will wipe /dev/sda (my SATA). I don't really want to do that if at all possible. Is there a simple way to remount the root to my SSD without running the install script? I am sure it would take me far too long to reverse engineer the install script to work out the nuances it is doing behind the scenes. Or is the only alternative to backup all contents of the SSD and then flash it back afterwards? Or is even that not advised? Cheers,
Igor Posted August 7, 2017 Posted August 7, 2017 Make sure you have the same kernel as you have on hard drive. On SD edit /boot/armbianEnv.txt ... change or add rootdev=/dev/sda1 (or its UUID=xxxxxxxxxxxxxxxxxxxxxxx) and reboot.
Simon Porter Posted August 7, 2017 Author Posted August 7, 2017 Thanks for reply. I did that change to armbianEnv.txt and did a shutdown -r now, but it didn't come back up. So preusmably I have mismatched kernel's? So I guess I need to find which is higher and upgrade the other? Hopefully if the SD is lower, I can just change armbianEnv.txt back to SD Card, reboot, upgrade and then make the change. Thanks, I'll give that a go!
Simon Porter Posted August 7, 2017 Author Posted August 7, 2017 So I've tried using /dev/sda1 and the UUID of the disk but neither seem to work. On booting it loads a black screen with flashing white cursor. I'm not sure what log might help diagnose the problem. I've mounted sda1 when booting from SD card with the system on SD card and by looking at /mnt/etc/fstab I can see what disk it was using for / and it is definitely /dev/sda1. I can't see anything in /mnt/boot so presumably this is expected if it's still booting from SD card and not the disk. I can't work out how to tell if the kernel is still the same as it was. The kernel looks to be stored in /boot which would have been on the old SD card I lost access to I guess. For what its worth the /mnt/usr/src contains /mnt/usr/src/linux-headers-4.9.7-sunxi /mnt/usr/src/linux-headers-4.11.6-sunxi /mnt/usr/src/linux-headers-4.11.6-sunxi/arch/arm/mach-sunxi /mnt/usr/src/linux-headers-4.9.12-sunxi and there's also /mnt/lib/modules/4.11.6-sunxi So potentially I might be mismatched 4.11.5 (current newly flashed SD) with 4.11.6 (lost SD card)? Though I'm not sure if this is the cause of the issue I'm seeing and I'm not sure how I managed to get that mismatched kernel version, certainly not on purpose!
Simon Porter Posted August 8, 2017 Author Posted August 8, 2017 So I couldn't complete an apt-get dist-upgrade on the SD card. It looked like it was gone, it would hang in various places even after a fresh flash of the armbian image. Then gparted stopped being able to delete and recreate the paritions. So, I have a fresh new SanDisk 16gb, flashed the image, ran the dist-upgrade to make the kernels match and changed the armbianEnv.txt to match the SSD. It still boots to a black screen with flashing white cursor and ssh reports "Connection refused". Is there anything else I can try before I bite the bullet and wipe the SSD?
Igor Posted August 8, 2017 Posted August 8, 2017 If you don't have a serial console to debug, try full verbose boot with console=display and verbosity=9 within /boot/armbianEnv.txt ... attach a photo of the screen.
Simon Porter Posted August 8, 2017 Author Posted August 8, 2017 Thank you so much for your help! That was just the ticket I needed, and stupidly, I should have realised that myself. After doing that it was booting up into emergency mode. It wouldn't recognize my root password, so I switched back to SD system mount, rebooted, mounted the system on SSD, chroot, changed root pass. Then noticed that fstab on the SSD was trying to mount /media/mmcboot with a UUID which I'm not sure what that was, presumably my old SD. Put the UUID from the current SD card fstab list into the SSD fstab as /media/mmcboot and rebooted and voila! I'm back in business, all services ticking along. Thanks again for the pointers, it worked wonders. 1
Recommended Posts