jam183 Posted February 14, 2017 Posted February 14, 2017 I customized my Armbian install with 2 operating systems on two partitions. In armbianEnv.txt I use rootdev to specify the default partition. I would like to set it so that if booting from the default rootdev fails (triggering panic or root-wait, etc.), it will instead try to boot with rootdev/root set to the other partition. Is that possible?
Igor Posted February 14, 2017 Posted February 14, 2017 I would say it is, but you will need to play around u-boot scripts.
jam183 Posted February 14, 2017 Author Posted February 14, 2017 The problem is I believe those errors are given by the kernel, so u-boot has already passed things off to the kernel by that point. Maybe I'm misunderstanding. I will read the scripts again, thanks.
zador.blood.stained Posted February 14, 2017 Posted February 14, 2017 You can try enabling ext4 write support in u-boot (depends on your device), then create an empty file in u-boot script and removing this file after successful boot up. Then you can check in u-boot script if this file exists, it should be a good indication of a failed boot.
jam183 Posted February 14, 2017 Author Posted February 14, 2017 You can try enabling ext4 write support in u-boot (depends on your device), then create an empty file in u-boot script and removing this file after successful boot up. Then you can check in u-boot script if this file exists, it should be a good indication of a failed boot. Oh, interesting. Uboot checks for file, if present load failover, else write file, load kernel, OS deletes file on boot. That works! My board is the Orange Pi Zero. I will try to implement this, thanks.
Recommended Posts