How does recovery work?

I would like to know how in technical terms the recovery at boot time after a failed update works.
Is there a document describing that?
I already looked into the guides and user guides.

Greetings
Peter

1 Like

It 's quite simple. If you go to /boot/system/packages, you have all packages that are installed but also an “administrative” directory which contains previous states directories and a file “activated packages”.
Each of this previous states directories contains a file “activated packages” in addition to packages that were removed by an update or that you have removed from HaikuDepot. When you used HaikuDepot to install a simple app, nothing is removed and so some of these directories contains only the activated packages file.

When at boot you specify a certain state, the system will use the corresponding “activated packages” file to know what packages were present at that time and will activate them. For those not present in the package directory, it will parse states directories going back to time till it arrives on specified state.

That’s the advantage of the system, if you have room you can go several months back in time with a beta or several weeks if you update daily a nightly.

I almost forgot… Dig in old blog articles, you will find all sort of things about package management.

3 Likes