Btrfs Assistant 1.0 is coming, testers needed

Yes, but you can change a bit (optional)
Change

HOOKS="base udev autodetect modconf block keyboard keymap consolefont filesystems grub-btrfs-overlayfs"

to

HOOKS=(base udev autodetect modconf block keyboard keymap consolefont filesystems grub-btrfs-overlayfs)

I just added to the file, it now reads


# HOOKS
grub-btrfs-overlayfs
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.

This is OK?
What is the difference in changing "… " and "(… )?

Done!

No difference, but "" is deprecated.


No, delete this grub-btrfs-overlayfs below # HOOKS that is just text.

So where should I put it and how?

Answer: NO

Sorry I misunderstood.

1 Like

No need to apologize. I am misunderstanding all the time! :rofl:

Changed “…” to (…)

#    usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block keyboard keymap consolefont filesystems grub-btrfs-overlayfs)

Now where should I put “grub-btrfs-overlayfs” or is it OK with this change?

Hi @Zesko
Where I should put grub-btrfs-overlayfs in /etc/mkinitcpio.conf?
Any specific command or whatever or just append grub-btrfs-overlayfs at the end of file or at the end of “Hooks” section?

Yes, that is right.

So, can I boot NOW to a previous snapshot?
I only need to create the .desktop file to notify me I am booting to a snapshot?

Sorry for lots of questions. This think is critical and I don’t want to mess it up!

UPDATE:
I rebooted, selected an earlier snapshot.
But -as I understood snapshots are read only- I could update the system normally with “yay -Syu” and it installed an update. So I assume it did not actually boot to the selected snapshot!

Following step by step what i wrote above:


You should follow step by step again before reboot:

then

then

remake grub.cfg

grub-mkconfig -o /boot/grub/grub.cfg

then reboot and select the newest snapshot into booting

Then restore any snapshot in Btrfs Assistant, then reboot.

Now, I am on Btrfs Assistant 1.0 is coming, testers needed - #160 by Zesko
Starting wit step no. 2. 1. Run sudo mkinitcpio -P

sudo mkinitcpio -P

:point_up:Done
Then
3. 1. Create a new root snapshot with the ability grub-btrfs-overlayfs, but all old snapshots do not have this ability.
Done manually through BTRFS Assistant


Now, to the Desktop notification:
Created with touch command

[limo@lenovo ~]$ ls /usr/local/bin/
btrfs-assisant-detects-snapshot
[limo@lenovo ~]$ 

Copied the code int the newly created file.
Then

[limo@lenovo ~]$ sudo chmod +x /usr/local/bin/btrfs-assisant-detects-snapshot
[sudo] password for limo: 
[limo@lenovo ~]$ 

then

sudo touch /etc/xdg/autostart/btrfs-assistant-detects-snapshot.desktop

then copied the code

[Desktop Entry]
Name=Snapshot Detect
Icon=btrfs-assistant
Exec=/usr/local/bin/btrfs-assisant-detects-snapshot
Terminal=false
Type=Application

to the .desktop file.
Will reboot, just in case normally, then reboot to an earlier snapshot and see how it goes.
Hopefully it will go fine!

UPDATE:
After I posted I found a reply from @Zesko above, so, I followed him as follows:

 sudo touch /etc/systemd/system/grub-btrfs.path

and pasted the code
then

sudo systemctl daemon-reload
[limo@lenovo ~]$ sudo systemctl reenable --now grub-btrfs.path
Created symlink /etc/systemd/system/multi-user.target.wants/grub-btrfs.path → /etc/systemd/system/grub-btrfs.path.
[limo@lenovo ~]$ 

That is just a manual snapshot as before?

UPDATE:
Now I did

sudo grub-mkconfig -o /boot/grub/grub.cfg

and got

Found snapshot: 2022-08-02 18:33:39 | timeshift-btrfs/snapshots/2022-08-02_18-33-39/@ | ondemand        | N/A                                                                      |
Found snapshot: 2022-08-02 17:10:24 | timeshift-btrfs/snapshots/2022-08-02_17-10-24/@ | ondemand        | N/A                                                                      |
Found 50 snapshot(s)
Unmount /tmp/grub-btrfs.L8wWhHpyIp .. Success
done

Hopefully it is OK now.
Will reboot normally, then reboot to a snapshot.

Manual or automatic creation snapshot does not matter.

You can create a new snapshot manually now

I mentioned this to you above. But that is what is it is supposed to do. When you boot into a snapshot, it just boots. Then you can choose what you want to do. Btrfs Assistant at one time checked to see if you were booted into a snapshot but I removed that functionality.

There is a good chance you were booted into your snapshot at this point.

Be careful recommending solutions blindly without understanding the state of the users system.

He is using snapper-support so this change will probably create double snapshots.

1 Like

@limotux I just want to point out that your snapshots were probably working perfectly before all the changes you made. It appears that all the changes you made to /etc/mkinitcpio.conf were cosmetic.

I am goingto be away from computer for about 90 minutes. But I strongly suspect you should revert this change:

sudo systemctl reenable --now grub-btrfs.path

You probably should use disable --now on that and ensure the other path unit you were already using is still enabled.

OK… as @dalto said I did

[limo@lenovo ~]$ sudo systemctl disable --now grub-btrfs.path
Removed "/etc/systemd/system/multi-user.target.wants/grub-btrfs.path".
[limo@lenovo ~]$ 

I hope it is safe to reboot now!
OK? Should reboot NOW?

I understood from @Zesko that "… " is deprecated and (… ) is better…
But anyway, if it just “cosmetic” so it is OK I believe.

How would I know!

systemctl status grub-btrfs-snapper.path

Now I really am going to be away fro 90 minutes. :wink:

[limo@lenovo ~]$ systemctl status grub-btrfs-snapper.path
● grub-btrfs-snapper.path - Monitors for new snapshots
     Loaded: loaded (/usr/lib/systemd/system/grub-btrfs-snapper.path; enabled; preset: disabled)
     Active: active (waiting) since Sat 2022-08-13 13:39:59 EET; 1h 17min ago
      Until: Sat 2022-08-13 13:39:59 EET; 1h 17min ago
   Triggers: ● grub-btrfs-snapper.service

Aug 13 13:39:59 lenovo systemd[1]: Started Monitors for new snapshots.
[limo@lenovo ~]$ 

I don’t even know what does that mean!

OK… keep well.
We will miss you really