Interview Prep/Linux/Packages, kernel and boot

You need to roll back a whole server to its state before a risky change, not just one package. What can you use?

AdvancedScenarioPackages, kernel and boot
Answer

Situation read → Filesystem or volume snapshots.

What I'd do →

  1. Cloud: snapshot the volume (or AMI) before the change; restore by creating a volume from it.
  2. LVM: lvcreate -s -n root_pre -L 10G /dev/vg0/root; to roll back, lvconvert --merge /dev/vg0/root_pre and reboot.
  3. Btrfs/Snapper (SUSE, Fedora): snapper create, then snapper rollback.
  4. For VMs: hypervisor snapshot, deleted after the change succeeds.

Why → One step returns OS, config and packages to a known state.

Interview tip → Snapshots aren't backups; delete them after the change because they hurt performance and fill.

All Linux questions Roadmap: Linux

More on Packages, kernel and boot