I know this is not directly related to openhHAB oder openHABian but it might be of interest for a few non-expert linux users like me…
Via a cronjob I make a copy of my SD-Card with dd like dd if=/dev/sda of=/dev/sdb bs=16M
Backup works absolutely fine: I switched of my Raspberry, I unplugged SDA Card, I left SDB Card where it is and switched on Raspberry again. openHAB is running fine. so this is a perfect failover solution at least if your SD-Card is out of order.
The question is, what happens if Raspberry is booting. How does the OS decide which SD-Card to boot from as both Cards are bootable? To ask this question in a different way: How can I “force” the OS to boot from SDA, not from SDB?
I read it crefully but cannot find any information as to that the backup-Card is bootable.
All I can read is, at least this is how I understand it, that I need to setup up a new image and restore from backup-Card.
But I would be thankful if someone with Linux skills could answer my question as this helps me to better understand the matter.
No, sorry. Turn to a Linux forum. openHABian provides the functionality to all users and it’s more than enough work for me to support that. Additional DIY solutions that do more or less the same will just mean additional work and time needed to invest to sort out issues and that I’m not keen on.
Sorry - I disagree. The backup concept was created at the time where it was not possible to boot from USB drives. This has changed.
BUT, please do not answer here any further and waste your time. I really appreciate your work and your time and I really do not expect, that especially you are answering low level questions like mine (this is not ironic ar sarcastic) - I really mean it.
And this results again in the discussion as to wether it makes sense to replace the SD-Card with a USB SSD. I know your opinion already and do not want to diskuss this further with respect to your time
Hmm. That boot-loader will be copied to the target-SD as well, so that there are 2 (competing) bootmanagers.
For a better understanding I would like just to ask, how Raspberry makes the “decision” where to boot from if you have to bootable SD-Cards/SSDs attached to it. Does it give the SD slot a higher priority by default against a USB device?
Comparing to a PC the bootorder is predefined in its built-in BIOS. So everything is clear where a PC has to boot from even BEFORE a bootloader comes into the game.