3 ms·
Another nice trick of this family (with reboots, or without with using systemd-nspawn) lies with clever btrfs usage. Long story short: * use btrfs, and create
by rdslw 10y ago
Another nice trick of this family (with reboots, or without with using systemd-nspawn) lies with clever btrfs usage. Long story short:
* use btrfs, and create your main root filesystem as a btrfs partition subvolume and another btrfs subvolume for snapshots (also a sub of master btrfs partition)
* to start any experiment (e.g. installing whole gnome and 500 different packages you MIGHT WANT TO REVERT in the future) create before the risky operation snapshot (btrfs subvolume snapshot / /.snapshots/yournameofsnap) of current filesystem
* experiment in any way :)
* switch between old root (snapshot you created) or the new one with (btrfs subvoulme set-default)
* delete any of them (btrfs subvolume delete)
btrfs copy-on-write allows all of these commands to happen instantly without (almost) any actual copying. Also booting from both volumes is possible without any additional steps as long as master btrfs partition is the one to be booted from UEFI.
https://wiki.archlinux.org/index.php/Btrfs https://wiki.archlinux.org/index.php/Btrfs
- floatboth 10y agoCongratulations, you've reinvented ZFS Boot Environments :)
- LeoPanthera 10y agoOnly to a very high level. btrfs snapshots are writable, but share blocks, so you can boot directly from a snapshot. It's a better system.