BranchFS is a new virtual filesystem for SkyOS.
The main purposes for BranchFS are:
- Make it possible to create a branch of an entire filesystem. This means that right after branching the filesystem all filesystem modifications are reversible to the previous state. This can especially be interesting when updating your system with drivers or other critical components, or if you want to install a few applications and make sure that you can revert your system to a working state.
By branching the read-only ISO9660 LiveCD filesystem, one can immediately convert a read only medium to a full read-write system, branching future the modifications on volatile (Ramdisk) or non-volatile devices (harddisk, USB drive, …)
Using BranchFS alien filesystem "magically" get full SkyFS attribute style support. This makes it possible to use all filesystem with the IndexFeeder, meaning, the entire filesystem content can be indexed
A reversible system
At anytime you can branch your system. By pressing a hotkey (CTRL+ALT+F12) a little window will appear on the desktop telling you that the system will get branched on the next reboot. (The actual branching just takes a few seconds)
If the branch device is a volatile device like a ramdisk, all modifications from now on will be lost on reboot.
On an non-volatile branch device all modifications are permanent until you manually revert (CTRL+ALT+F11) your system. After reverting your system will be in the exact state it has been in before branching.
The proof-of-concept phase of BranchFS/ Reversible-System has successfully finished and developing is progressing rapidly.
Branching a LiveCD to an USB disk
Imagine following situation:
You have a LiveCD and two USB sticks.
By branching the LiveCD to an USB stick right after booting the LiveCD you can make any modification to your system, meaning the LiveCD magically converted into a full modifiable read/write device. For instance, you can update the system, compile applications or configure the system as you desire.
If you reboot your computer, but this time with the other USB stick plugged in, you have a immediately a fresh system, and you can make different configurations to it.
You can now switch between the two modified systems by just switching the USB stick and rebooting.
To conclude, you have a LiveCD with around 600MB of data.
- USB Stick 1 contains a branch for lets say a game setup. (~30MB after configuration on installation of Quake II)
- USB Stick 2 contains a full development suite and source code for your project. (~20MB).
So with just two 32MB USB sticks you have two full dedicated installations, one configured for playing and one configured for developing. No changes to the game system can interference with your development configuration.
How to make a branch
Making a branch is a rather easy operation, you just specify the filesystem you want to branch (you can branch any filesystem, be it SkyFS, ISO9660 or any other physical filesystem), you select a device which will hold the filesystem differences (ramdisk, partition, USB device, …) and activate ‘Branching’ via a hotkey. Immediately after activating ‘Branching’ you can make any modification your desire, knowing that you always can revert to the state your system has been in right before activating ‘Branching’.
BranchFS makes it possible to make a reversible filesystem. By using your system partition you can revert to a previous state (with just one reboot) and and when using a CD BranchFS makes it possible to make changes to the content.
BranchFS is still in heavy development but branching a LiveCD works quite well already. The first SkyOS LiveCD will be based on BranchFS.
Furthermore, BranchFS is designed to be well intergrated into the system, meaning there is no manual configuration required expect specifing the device you want to branch to. (using a system manager plugin)
(This is well intended and there are no plans to allow for complex manual configuration as you can do with other similar filesystems.)