Antynea / grub-btrfs

Include btrfs snapshots at boot options. (Grub menu)
GNU General Public License v3.0
688 stars 73 forks source link

Unable to restore or delete files after running snapshot on Grub #297

Open D3vil0p3r opened 10 months ago

D3vil0p3r commented 10 months ago

I'm using Arch Linux with Zen Kernel and I'm using grub-btrfs + snapper-support package. I performed a test where: 1- I removed neofetch package 2- Created a file hello.txt 3- Removed malcontent package 4- Rebooted 5- Restoring on Grub by selecting the Snapshot related to the PRE-Install of neofetch package.

When I land on the system, effectively I see that I still have neofetch and malcontent packages installed as expected, but I see that hello.txt file still exists and I expected it was deleted since it didn't exist when I installed neofetch package.

Is there a way to manage files on snapshots by grub-btrfs or it works only with pacman packages?

Schievel1 commented 10 months ago

The snapshots you can boot with are always snapshot of the root subvolume (@) Could it be that you created the hello.txt file on a different subvolume?

D3vil0p3r commented 10 months ago

I created it in my home folder. It has a different subvolume?

Schievel1 commented 10 months ago

It depends on how you setup your machine but most often yes, home is on a different subvolume

Maybe you can test that again and create the file in /hello.txt.

Otherwise what you think is going on here, that restoring subvolumes only restores files installed/ removed by pacman isn't possible. Subvolumes are always restored as a whole and they are not coupled with any program like pacman.