| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An Arch Linux installation at the PC lab of the NTUA ECE school, including automatic filesystem reversion.
We choose Arch for its rolling release model, avoiding major distribution upgrades and any incompatibilities therein, or even a reinstallation. Also, for its excellent documentation (one of the best and most complete distribution wikis online), its large, committed community of users and maintainers (a strong history is an assuring sign for the future), as well as the fact that the software in its repositories is on the bleeding edge, following upstream versions very closely.
We choose Xfce due to its satisfying compromise between low hardware requirements and a complete, user friendly environment. Another reason for is the ease with which it can be configured to make a Windows user feel at home with its user interface.
LightDM is the display manager of choice, owing to its straightforward approach, full functionality and configurability, as well as the fact that it is independent of any particular desktop environment.
Supporting initial installation (provisioning), there are:
We use Ansible for managing the systems once deployed, in a centralized, uniform and convenient manner (see ansible/). Owing to its agentless architecture (SSH access and a python interpreter are the only requirements on the managed hosts), its widespread use and its straightforward approach for simple tasks, it is preferred over the alternatives (e.g. Puppet and Chef).
The desktop environment is configured with Windows users in mind. System actions the user should (not) be able to perform and how are:
The goal is for every user to find the system in a specific desired state when they log in, independently of what the previous user might have performed. To achieve this we employ filesystem snapshots, as provided by BTRFS.
In particular, during system bootup the whole filesystem is reverted using a snapshot of the desired state. In addition to that, at every user login, /home is reverted as well (can't do it for root, would require to unmount it). These actions are performed as late as possible (not e.g. at shut down and logout, respectively), in order to give the system administrator a chance to intervene before the modified state is lost, e.g. for troubleshooting.
The btrfs file system is hosted on a single disk partition. Subvolumes are organized in a flat layout:
toplevel (volume root directory, mounted at /root/btrfs-root)
+-- root.next (subvolume root directory, to be mounted at / at next boot)
+-- root.curr (subvolume root directory, mounted at /)
+-- root.bak (subvolume root directory, snapshot of the desired state for /)
+-- home (subvolume root directory, mounted at /home)
\-- home-snap (subvolume root directory, snapshot of the desired state for /home)
A typical lifecycle includes (see boot process for reference):
cp root.next root.bakcurrent=$(get_current_subvolume)
mv current root.curr
cp root.bak root.nextcp home-snap homecurrent=$(get_current_subvolume)
mv current root.nextNOTE: When on UEFI, the EFI system partition (mounted at /efi) is not covered by the reversion mechanism.
Make a change under /home permanent (e.g. change user settings for the desktop environment): either make the desired change in home-snap directly (it will take effect the next time the user logs in) or change home and then recreate home-snap from it (user should not be logged in when the new snapshot is taken).
Make a change to the system permanent (e.g. add/remove/upgrade packages): run replace-snap.sh. This effectively sets as the desired state for the root filesystem the state of the currently booted subvolume when the system is next powered off. Use with caution.
NOTE: Always re-generate the GRUB configuration (i.e. run grub-mkconfig) after running replace-snap.sh. This is necessary to always boot from root.next. A grub-mkconfig wrapper is provided to enforce this.
| Back | FazBrowse Home | New Git URL |