Email or username:

Password:

Forgot your password?
Top-level
tippfehlr

@akhil that explains it – although instead of

mv /mnt/subvol_root /mnt/subvol_root.broken
btrfs subvol snapshot /mnt/snapshots/X/snapshot /mnt/subvol_root

i could also do

btrfs subvol snapshot -r /mnt/@ /mnt/@ backup
fd -E /mnt/@/.snapshots /mnt/@ -x rm -rf
mv /mnt/@/.snapshots/^/snapshot/* /mnt/@/

the first is harder to mess up though, true.
I guess I should migrate :)

3 comments
AkhIL

@tippfehlr
If you remove this line from /etc/grub.d/10_linux:
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
re-run `grub-mkconfig -o /boot/grub/grub.cfg`, remove root's `subvol` option from the fstab, to allow the system boot from the default btrfs subvolume set by `btrfs subvolume set-default`, and then run:
snapper create
snapper --ambit classic rollback <snapshot id>
and reboot.

Then you can drop your @ subvolume and use snapper's rollback command to rollback the root.

Make sure you actually using snapshot as the live root before removing your @ subvolume. I had to repair my system with a bootable flash drive because I did not know about the subvol option in the grub config.

@tippfehlr
If you remove this line from /etc/grub.d/10_linux:
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
re-run `grub-mkconfig -o /boot/grub/grub.cfg`, remove root's `subvol` option from the fstab, to allow the system boot from the default btrfs subvolume set by `btrfs subvolume set-default`, and then run:
snapper create
snapper --ambit classic rollback <snapshot id>
and reboot.

tippfehlr

@akhil that seems like a nice config :)
I don't use grub though, currently using systemd-boot. Maybe refind at some point.
If I need to actually rollback I'll probably do it manually

AkhIL

@tippfehlr systemd-boot config also has hardcoded subvolume in Arch. Let me know if you find what should be modified to get systemd-boot use the default subvolume.

Go Up