Unable to boot back into regular root after booting into a snapshot #299
-
My QuestionsI am making a discussion instead of an issue, because there is probably something wrong in my setup, and not grub-btrfs itself here (since it worked just fine on my previous Garuda installation). Please also read the other sections, I have formulated the questions with the assumption that the rest was read.
Thank you kindly in advance for any help, fixes, inputs or suggestions! My SetupI have used I make my snapshots with yabsnap instead of Snapper, because it seems like a simpler tool which does exactly what I need it to do. I am mentioning this, in case it is related to the issue.
What I ExpectedSo here is how it went previously on Garuda:
The IssueHere is how it went on my ArchLinux installation:
Also the fact that the root filesystem was read-only prevented me from fixing things by making a YabSnap rollback scriptEspecially note the #!/bin/bash
# Save this to a script, review and run as root to perform the rollback.
set -uexo pipefail
mkdir -p /run/mount/_yabsnap_internal_0
mount /dev/nvme0n1p3 /run/mount/_yabsnap_internal_0 -o subvolid=5
cd /run/mount/_yabsnap_internal_0
mv @ @snapshots/rollback_20230925202616_@
btrfs subvolume snapshot /.snapshots/@root-20230925125807 @
echo Please reboot to complete the rollback.
echo
echo After reboot you may delete -
echo "# sudo btrfs subvolume delete /.snapshots/rollback_20230925202616_@" RelatedDiscussion #125 seems related and might have resolved my read-only filesystem issue. However, it would still not have allowed me to boot into my regular system. Edit: fix typo |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
We need to sort things out here first. Grub-btrfs is not making snapshots nor does it 'restore' them. The only thing it does is generating the snapshot list in the grub menu. It does not matter what you use as an underlying tool to generate snapshots (timeshift, snapper or you can even do it manually using plain btrfs-progs) The only thing grub-btrfs needs is btrfs-progs to get a list of snapshots to work with. (Well and it needs grub obviously) Even though most of this has not much to do with grub-btrfs I will try to answer your questions as best as I can.
I don't think persistent snapshots are what is causing this. Because your /boot is where your grub resides and /boot is usually not part of the snapshot. I rather think the tool you used for rolling back did something wrong in your grub.cfg. I have had that before with timeshift. [https://forums.gentoo.org/viewtopic-t-1144572-highlight-.html]
No, grub-btrfs does not generate snapshots.
I havent tested this but they basically all do the same thing in one way or another. They boot you into a snapshot using the subvolid in the kernel command line, then make a snapshot from that running snapshot into @, replacing the root snapshot.
I don't know. But it surely was not grub-btrfs. Grub-btrfs is only a bash script that hooks into grub. It does not do GUI. |
Beta Was this translation helpful? Give feedback.
No, there is none. grub-btrfs reads the current snapshots on the system and write the snapshot list into the grub menu. Thats all.
Lets define the word 'restore' here. Restoring a system to an older state using btrfs-snapshots is (at least for me) when you put the old snapshot in the place of the root snapshot (the 'root snapshot' is the one that is usually booted by default by grub and usually is called @ or @/. This is the one you would call
main
ormaster
but for btrfs it isn't different from any other snapshot).Restoring is a thing that is very easy to achieve with btrfs: move the old snapsh…