Open thecodygriffin opened 4 months ago
Hi.
Thanks for documenting so thouroughly your tests and tries. I have the same issue as you do, and I can't seem to find an answer neither. For now, when I choose to boot into a snapshot I get stuck in terminal right when it prints: [Ok] Reached target graphical interface.
But, I noticed that I can make a snapshot boot, if I make it read-write enabled or rather read-only=false.
I've chosen to make a script that finds all snapshots in the snapshots dir and make them read-write, so I can boot them. I have no idea if that's dangerous in the long run, but I seem able to boot of my snapshots and restore them - which is what I would want.
I'm in the process of creating a path_unit and a service that would execute whenever it detects changes in my snapshots-dir, so all snapshots that are created are then set to read-only=false.
I'm hoping that the proper way, the overlayfs way, is implemented or someone else can discover what's going wrong - so I don't have to keep my somewhat hacky solution around.
Apparently, i have the same issue, i created it here Unable to boot into a snapshot since kernel 6.8 (read-only), but i can with 6.6, it's probably the same but with mkinitcpio.
I am on Manjaro/KDE, and i cannot boot any snapshot created with kernel 6.8. I do not have any issue with kernel 6.6. When i boot up into a snapshot, my system hangs, i can login into TTY, and there i clearly see my system is read-only although the grub-btrfs-overlayfs hook is well implemented and no issue if i choose kernel 6.6 when i boot my snapshot.
Like you if i set the 'ro' property of the snapshot to false, i can boot normally, witout issue, but not ideal solution.
it seems something has changed with kernel 6.8 (i cannot say how it is with 6.7 i did not install it) and the hook does not work anymore.
I've chosen to make a script that finds all snapshots in the snapshots dir and make them read-write, so I can boot them.
Would it be possible for you to share this script ?
At first i wanted to change existing snapper or btrfs-assistant internal scripts because we can create a R/W snapshot with snapper with --read-write option but there is apparently no possibility of customization.
Thank you
Summary Upon attempting to boot a read only snapshot created by Btrfs Assistant, Fedora hangs immediately prior to Gnome login.
References Thus far, I have thoroughly reviewed and followed the following information related to the topic:
92
Installation Steps
git clone https://github.com/Antynea/grub-btrfs
cd grub-btrfs
nano config
GRUB_BTRFS_SYSTEMD_VOLATILE="true"
GRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"
GRUB_BTRFS_MKCONFIG=/sbin/grub2-mkconfig
GRUB_BTRFS_SCRIPT_CHECK=grub2-script-check
sudo make install
sudo nano /etc/grub.d/02_tpm
Add the following lines to the 02_tpm file
sudo chmod +x /etc/grub.d/02_tpm
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo systemctl enable --now grub-btrfsd.service
cd ..
rm -rf grub-btrfs
What I Have Attempted Thus far I have attempted the following:
GRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS="rd.live.overlay.overlayfs=1"
in the/etc/default/grub-btrfs/config
fileGRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS="rd.live.overlay.readonly=1"
in the/etc/default/grub-btrfs/config
fileGRUB_BTRFS_SYSTEMD_VOLATILE="true"
in the/etc/default/grub-btrfs/config
fileAfter each update to the config file, I do the following:
sudo /etc/grub.d/41_snapshots-btrfs
to detect the snapshots for the grub menusudo grub2-mkconfig -o /boot/grub2/grub.cfg
to rebuild the grub menu (which I believe is redundant, but harmless)In each case, the result is the same.
Work-Around Once a week, I am manually creating a snapshot in Btrfs Assistant and changing it to read-write. Although less than ideal, these snapshots boot without fail and would allow me to recover my system in an absolute worst case scenario.
Goal I am hoping that I am overlooking something and that a fresh set of eyes can easily identify it and point me in the correct direction.
My preference is to declare and use
GRUB_BTRFS_SYSTEMD_VOLATILE="true"
in the/etc/default/grub-btrfs/config
file since it seems to be the simplest solution given my installation and snapshots satisfy the criteria for it to be used.I do not want to create subvolumes for /var and or any of its subdirectories. My goal with snapshots and grub-btrfs is to simplify recovery without adding to system complexity.
System Details
Latest Config