Closed averyfreeman closed 2 months ago
Okay, so here is the current situation:
snapper rollback
, what snapper actually does is that it makes a new rw subvolume, and change the default btrfs subvolume to the new rw subvolume. It expects that when you choose to boot the system from the default menu entry, the kernel param will not include any hardcoded root subvolume, and that the kernel will automatically boot into the default btrfs subvolume. Snapper does not actually mess with grub configs.rootflags=subvol=${rootsubvol}
will add a kernel parameter telling the kernel to just always boot into what is the effective root subvolume when the config is generated. This does not work with snapper rollback
, because it will keep booting into the subvolume that you no longer want. Therefore, I delete it.I hope this clears it up. Feel free to reopen if you have any further questions :)
@averyfreeman I had a quick look at your fork, so I think I will mention this here:
snap-pac handles making pre and post snapshots with snapper. grub-btrfs generates grub menu entries for the snapshots it detects (pre, post, AND timeline).
snap-pac-grub is unnecessary, if you intend to use this setup. grub-btrfs already does that job for you.
Thanks for getting back to me, I appreciate it - yes, I think I was still confused about what was happening when I threw snap-pac-grub
in the mix a few weeks ago (my bad)
In fstab
, it looks like snapshot to be mounted as root is identified by x-initrd.mount
- is that right?
just a rootflag ... so funny, I've seen that so many times but it just now clicked what it is doing
Could you clear one other big-picture thing up for me, please? (sorry to be so needy)
Why do we have a separate /root
during setup? am I correct in thinking this is what becomes snapshot 1?
Do you keep date at 1999 in info.xml
purposefully, or was that an issue with string substitution? It's very minor, but I have this working if you want a PR.
In
fstab
, it looks like snapshot to be mounted as root is identified byx-initrd.mount
- is that right?
No. We just set the default subvolume with btrfs subvolume set-default
. Snapper automatically sets the new default subvolumes whenever you do a snapper rollback
and what not.
Why do we have a separate
/root
during setup? am I correct in thinking this is what becomes snapshot 1?
It's the same logic as splitting out /home
. We don't want to roll /home
back with the rest of the system, do we? Then we don't wanna roll root's home back either.
Do you keep date at 1999 in
info.xml
purposefully, or was that an issue with string substitution? It's very minor, but I have this working if you want a PR.
Ah I was just being lazy and hardcoded it. I fixed it in https://github.com/TommyTran732/Arch-Setup-Script/commit/a5e2f37b751af7d35ce972bd7eb9a7eb8315ce8b. Thank you though :)
Awesome. Thanks again for getting back to me.
Hi, love the script. Big fan of OpenSUSE's snapper layout, have never tried adapting it to Arch before - have only ever used
sd-boot
on Arch.Wondering what you think of the difference between the way you've handled deleting these lines in
/etc/grub.d/{10_linux,20_linux_zen}
:And the way MicroOS's version of
10_linux
(this is adiff
):Just to be clear, the removal you suggest should result in this, correct?:
That full switch statement on MicroOS is this:
Here's a full diff between the two: