jam183 Posted February 14, 2017 Share 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? Link to comment Share on other sites More sharing options...
Igor Posted February 14, 2017 Share Posted February 14, 2017 I would say it is, but you will need to play around u-boot scripts. Link to comment Share on other sites More sharing options...
jam183 Posted February 14, 2017 Author Share 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. Link to comment Share on other sites More sharing options...
zador.blood.stained Posted February 14, 2017 Share 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. Link to comment Share on other sites More sharing options...
jam183 Posted February 14, 2017 Author Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts