Hi you all!
I need help, i’ve installed fedora 35 with btrfs after updating to 37 i’ve also installed new version of timeshift and found that i can make only rsync bakup. To fix this i followed instruction at A quick guide to setting up BTRFS Timeshift on Fedora 33
after that i have these:
$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 181.9M 1 loop /var/lib/snapd/snap/postman/179
loop1 7:1 0 55.5M 1 loop /var/lib/snapd/snap/core18/2409
loop2 7:2 0 47M 1 loop /var/lib/snapd/snap/snapd/16010
sda 8:0 0 931.5G 0 disk
├─sda2 8:2 0 340G 0 part
└─sda3 8:3 0 591G 0 part
sdb 8:16 0 111.8G 0 disk
├─sdb1 8:17 0 600M 0 part /boot/efi
├─sdb2 8:18 0 1G 0 part /boot
└─sdb3 8:19 0 110.2G 0 part /home
/
zram0 252:0 0 6.7G 0 disk [SWAP]
#
# /etc/fstab
# Created by anaconda on Sun Jan 16 02:06:15 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=d07eea42-8da3-4271-819f-6ba8fedd30d5 / btrfs subvol=@,compress=zstd:1 0 0
UUID=84f170e2-9c0b-4a6d-b2d9-75b84f7e3522 /boot ext4 defaults 1 2
UUID=2384-6038 /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=d07eea42-8da3-4271-819f-6ba8fedd30d5 /home btrfs subvol=@home,compress=zstd:1 0 0
I can make BTRFS snapshots, but cannot restore snapshot from timeshift (deleted files hasnt recover). Also at grub I see snapshots, that i cannot find anywhere.
I mean, that if I have deleted a file (in downloads for example) and I see it in backup with browsing manually, so after me restoring snapshot the file is still deleted.
I’ve just found that files are restored (but after some of time).
So after restoring files are still deleted, but after a while they are.
creating snapshot and restoring complete very fast (less then a minute), but result of restoring shows itself after a while.
its very strange…
So I have still a problem with grub it show restore points, that I don’t have (for example, all of my snapshots had made at Ferdora 37, but on loading I see restore point from Fedora 35)
Just to be clear, you are rebooting after restoring, correct? Restoring a snapshot without rebooting would be not ideal if it is moving the snapshots around to do the restore. The mounted filesystem would still be the old filesystem in that case.
You need to use something to ensure that the grub menu is being rebuilt when you take snapshots. I think grub-btrfs ships with a service for that now.
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found Fedora Linux 37 (Workstation Edition) on /dev/sdb3
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
/etc/grub.d/41_snapshots-btrfs: line 569: /boot/grub/grub-btrfs.new: No such file or directory
I think that comment is off the mark.
By default grub is installed with fedora, and the document linked simply shows how to recover if the system is hosed and a recovery is needed.
That document has nothing to do with what happens with btrfs or snapshots as it is related to grub and the OS only.
News of my problems: I reinstall grub 2 and broke it. I have black screen with grub recover. Started from live usb and chroot to mounted system. Now when i’m trying to install grub (as step of Bootloading with GRUB2 :: Fedora Docs) i have this:
# sudo grub2-install /dev/sdb
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
# ls /usr/lib/grub
arm64-efi i386-pc
UPD. Fixed by installing package, now this is a problem:
# sudo grub2-install /dev/sdb
grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot.
and still a problem:
# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Found Fedora Linux 37 (Workstation Edition) on /dev/sdb3
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
/etc/grub.d/41_snapshots-btrfs: line 569: /boot/grub/grub-btrfs.new: No such file or directory
UPD. 2 fix snapshots folder at /etc/default/grub-btrfs/config
Another problem is that you should update only /boot/grub2/grub.cfg and never touch /boot/efi/EFI/fedora/grub.cfg.
If your system is configured to boot with UEFI, then you need to restore the default config by reinstalling the package grub2-common.
Also GRUB 2 - Fedora Project Wiki tell us # rm /boot/efi/EFI/fedora/grub.cfg (but forgot about configure new one)
By the way my initial problem has been correlated with this step, namely irrelevant snapshots at grub. One mistake in configuring Grub-btrfs made all of this painful investigation
Be careful to not mix the LVM and Btrfs instructions.
The Btrfs steps are fine, but the LVM steps are outdated due to a certain change.
After the chroot command, both LVM and Btrfs instructions should be the same.
I actively use LVM and can confirm this issue.