Serengeti schrieb:
Nach welcher Anleitung bist du dafür vor gegangen? Würde ich auch gerne mal ausprobieren.
Moin,
ist bei den Ubuntu-Varianten etwas schwieriger da habe ich es normal installiert (USB-Platte). Manuel die Hauptplatte eingerichtet rüberkopiert und Grub neu eingerichtet, da gibt es jetzt auch einen Film Arch my way von 0 - 4 früher hies es Btrfs Magic 1 - 5. Subvolume für / , home, Daten, pkg, usw.
Meine subvolume:
sudo btrfs subvolume list -p .
ID 258 gen 69339 parent 5 top level 5 path @
ID 259 gen 69339 parent 5 top level 5 path @home
ID 260 gen 69092 parent 5 top level 5 path @pkg
ID 261 gen 67085 parent 5 top level 5 path @snapshots
ID 262 gen 69326 parent 5 top level 5 path @daten
ID 263 gen 66866 parent 258 top level 258 path @/var/lib/machines
ID 368 gen 65751 parent 5 top level 5 path @kubuntu-home
ID 372 gen 66057 parent 5 top level 5 path @kubuntu-root
ID 379 gen 67087 parent 261 top level 261 path @snapshots/testing-root
ID 382 gen 66534 parent 261 top level 261 path @snapshots/testing-home
ID 745 gen 67053 parent 261 top level 261 path @snapshots/11-03-17-root
ID 746 gen 67054 parent 261 top level 261 path @snapshots/11-03-17-home
habe es etwas anders gemacht wie nick, nutze die Hauptinstallation und testing ist meine Sicherung (entspricht das System vor dem Update)
Hier = https://www.youtube.com/results?search_query=Arch+may+way
Die 3 Scripte sind (müssen angepasst werden!!!):
#!/bin/bash
# System Update
# ---------------------------
# Snapshot - Rollback - Btrfs
# ---------------------------
MV=/usr/bin/mv
BTRFS=/usr/bin/btrfs
SED=/usr/bin/sed
REFLECTOR=/usr/bin/reflector
PACMAN=/usr/bin/pacman
# ---------------------------
# Snapshot System
# ---------------------------
$BTRFS subvolume delete /.snapshots/OLDSTABLE
$MV /.snapshots/STABLE /.snapshots/OLDSTABLE
$BTRFS subvolume snapshot / /.snapshots/STABLE
$SED -i 's/TESTING/STABLE/g' /.snapshots/STABLE/etc/fstab
# ---------------------------
# Update System
# ---------------------------
$PACMAN -Syu
install.sh
#!/bin/bash
# Software Install
# ---------------------------
# Snapshot - Rollback - Btrfs
# ---------------------------
MV=/usr/bin/mv
BTRFS=/usr/bin/btrfs
SED=/usr/bin/sed
PACMAN=/usr/bin/pacman
# ---------------------------
# Snapshot System
# ---------------------------
$BTRFS subvolume delete /.snapshots/OLDSTABLE
$MV /.snapshots/STABLE /.snapshots/OLDSTABLE
$BTRFS subvolume snapshot / /.snapshots/STABLE
$SED -i 's/TESTING/STABLE/g' /.snapshots/STABLE/etc/fstab
# ---------------------------
# Install Software
# ---------------------------
$PACMAN -S $*
rollback.sh
#!/bin/bash
# System Rollback
# ---------------------------
# Snapshot - Rollback - Btrfs
# ---------------------------
MV=/usr/bin/mv
BTRFS=/usr/bin/btrfs
SED=/usr/bin/sed
PACMAN=/usr/bin/pacman
SYNC=/usr/bin/sync
REBOOT=/usr/bin/reboot
# ---------------------------
# Rollback System
# ---------------------------
$BTRFS subvolume delete /.snapshots/TESTING
$BTRFS subvolume snapshot / /.snapshots/TESTING
$SED -i 's/STABLE/TESTING/g' /.snapshots/TESTING/etc/fstab
$SYNC
$REBOOT