You are not logged in.
Pages: 1
A bunch of Linux-based systems implement A/B booting: where they keep two boot configurations around, and if the system fails to boot or shows errors after an upgrade, it reboots to the previous working configuration. Usually it involves two /boot partitions, where one is being booted from, and the other being upgraded, so the working one is still around even after the update.
I've seen this mostly done for embedded (GUI-less, unattended, or mobile) systems, but IMHO it would be nice to have that for a full desktop or server. Here is some documentation how they do it at Balena: https://www.balena.io/docs/reference/OS … rollbacks/ -- a bit convoluted!
Has anybody implemented such a thing based on Arch, or good ideas how to go about it?
I'm particularly intrigued by potentially combining this with btrfs (or such) filesystem snapshots. You could basically upgrade a working system into a new file system snapshot, leaving the current system unchanged, and then mount /boot and / from the new snapshot upon reboot. If that works, that becomes the baseline and the old snapshots can be deleted. If it does not work, the system reboots with the old snapshot and the new one gets deleted.
Thoughts?
Offline
Jin, Jîyan, Azadî
Offline
Has anybody implemented such a thing based on Arch
Yes. Lots of people have already done this. Just search the wiki for a solution that is compatible with your filesystem.
I'm particularly intrigued by potentially combining this with btrfs (or such) filesystem snapshots. You could basically upgrade a working system into a new file system snapshot, leaving the current system unchanged, and then mount /boot and / from the new snapshot upon reboot. If that works, that becomes the baseline and the old snapshots can be deleted. If it does not work, the system reboots with the old snapshot and the new one gets deleted.
Thoughts?
Yes, you can. This is already implemented in various solutions in the repos...
Offline
Just search the wiki for a solution that is compatible with your filesystem.
I did, but didn't find anything. Searching for "A/B" or "boot recover" or "last good state" and variations ... What's the magic incantation that escapes me?
Offline
What's the magic incantation that escapes me?.
I'm particularly intrigued by potentially combining this with btrfs (or such) filesystem snapshots.
btrfs? then drill down to the snapshots section?
Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.
Offline
I have two kernels installed on my Arch boxes: on my laptop - custom + vanilla, and on my desktop - vanilla + LTS. Additionally, I have two initramfs on both: mkinitcpio + dracut. That gives me multiple options to boot if something screws up, as was the case with the move to compressing modules, where I had not enabled it in my custom kernel, so I had to boot into vanilla to fix it.
That was the first time in at least 7 or 8 years that I haven't been able to boot an Arch box. Allan has got sloppy.
Offline
jernst wrote:What's the magic incantation that escapes me?.
jernst wrote:I'm particularly intrigued by potentially combining this with btrfs (or such) filesystem snapshots.
btrfs? then drill down to the snapshots section?
I'm aware of how btrfs snapshots work. What I don't know, and might take a while to find out, is how to use them with an A/B bootloader configuration. The link in my original post to Balena shows a structure for a non-btrfs setup. Between all of those systemd.services etc this is something I'd much rather reuse from somebody who figured it out than me trying from scratch. That's why I asked.
Offline
Highly interested in this too!
Any updates @jernst?
Offline
Pages: 1