Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeshift #88

Closed
thunderbird-93 opened this issue Jun 26, 2024 · 5 comments
Closed

Timeshift #88

thunderbird-93 opened this issue Jun 26, 2024 · 5 comments

Comments

@thunderbird-93
Copy link

Hi

First of all, thank you for all the great work to create an elegant and lightning fast installer. Debian is not the easiest distro, but your installer makes is so much better experience to get up and running in a breeze. Debian LUKS2 and TPM seems to be overly complicated. I followed number of guides and keep stumbling... Your installer makes it look effortless.

Everything looks perfect after install yet somehow timeshift refuses to configure. I run compatibility script from timeshift's git and it's not passing...

grep -E '^[^#].+/\s+btrfs' /etc/fstab | \
grep -oE 'subvol=[^,]+' | \
cut -d= -f2 | \
grep -qE '^/?@$' && \
echo 'OK' || \
echo 'Not OK'
Not OK

Would you please help me to meet timeshift criteria?

Many thanks!

@r0b0
Copy link
Owner

r0b0 commented Jun 27, 2024

The problem with that script is that our fstab does not have an entry for root. You can add one yourself - just open /etc/fstab as root, copy the line for /home and change from /home to / and change subvol from @home to @

But when I continue reading their requirements, there are other things that don't match - such as that we use the @ subvolume as default (as opposed of their requirement for this to be the the "top" subvolume) and we use systemd-boot and not grub.

@thunderbird-93
Copy link
Author

thunderbird-93 commented Jun 27, 2024

Thanks for looking into this. I really appreciate it. Meanwhile I've been digging and made some progress.

  1. Had to change installer.sh script
#mkdir -p ${target}/root/btrfs1
# map @ subvol to /
cat <<EOF > ${target}/etc/fstab
UUID=${btrfs_uuid} /home btrfs defaults,subvol=@home,${FSFLAGS} 0 1
UUID=${btrfs_uuid} / btrfs defaults,subvol=@,${FSFLAGS} 0 1
  1. Above step seemingly fulfilled timeshift requirements but still "no cigar". I had to set @ as default subvolume and adjust kernel parameters as suggested here.
sudo btrfs subvolume set-default 5 /

Changed rootflags in /boot/efi/loader/entries/{current_kernel}.conf. Not sure how to make it permanent to follow kernel updates...

# before
rootflags=compress=zstd:1
# after
rootflags=compress=zstd:1,subvol=@

That made timeshift play nicely. I hope this is helpful.

@r0b0
Copy link
Owner

r0b0 commented Jun 27, 2024

That's interesting.

You can add the subvol=@ flag to /etc/dracut.conf.d/90-luks.conf and also to /etc/kernel/cmdline

This should make it survive kernel and initrd updates.

Let me know if you encounter any side effects later.

@thunderbird-93
Copy link
Author

Glad to confirm subvol=@ survives kernel and initrd updates. I am running Debian Testing with critical security updates pinned to unstable. Today 6.9.7-1 kernel dropped in - no problems.

r0b0 added a commit that referenced this issue Jul 19, 2024
* include / in fstab
* explicitly set rootvol=@ in rootflags
* do not set @ as default subvolume

#88
@r0b0
Copy link
Owner

r0b0 commented Jul 21, 2024

I have tested timeshift with this new version and everything looks ok

@r0b0 r0b0 closed this as completed Jul 21, 2024
@romangg romangg mentioned this issue Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants