EndOS encrypted BTRFS, swap partition with snapper, hibernation and multiboot

Hi there,
since i got a bigger SSD for my notebook i want to do a clean fresh install of endeavourOS with encrypted BTRFS, swap partition, snapper and hibernation in multiboot with windows 11.

For now i use encrypted ext4, hibernate, timeshift and multiboot.

Before i really install on real system i tested ob VM (without multiboot). I installed endeavourOS with BTRFS and encryption using calamares.
After booting into the system i installed snapper snap-pac grub-btrfs. Enabled grub-btrfs, snapper-timeline and snapper-cleanup.

After setting btrfs-default volume to my 256, taking a snapshot, update grub using grub-mkconfig i tried to boot up into a snapshot and got

Failed to start Remount Root and Kernel File Systems.

System won’t start.

After a little research i tested out a couple of things:

  1. outcomment the / mount line on /etc/fstab → The Failed to start Error disapears, but systemsboot stucks
  2. creating 95-bootbackup_pre.hook and 95-bootbackup_post.hook like mentioned at https://wiki.archlinux.org/title/System_backup#Snapshots_and_/boot_partition → nothing changed
  3. removed the “resume=…” argument in grub-menu from the snapshot → nothing changed

any idea where the problem is?

There is no need to do this. It won’t help anything.

You don’t need to do this if you are using grub.

Using snapper or manually?

Do you have the eos-dracut package installed?

Ah okay. Watched a youtube-video for handling btrfs subvolumes, they did it. Thats why i did it to.

Okay.

I tried both.

No, endeavouros/eos-dracut is not installed, but extra/dracut is. I ran dracut-rebuild.

That seems pretty strange. Can you share the output of pacman -Q | grep -E "dracut|grub|mkinitcpio"

Through testing i had to delete the VM and create it again. This time i did not change btrfs default subvolume and i did not create the 95-bootbackup-hooks.

It seems that i did have eos-dracut installed:

dracut 059-6
eos-dracut 1.3-1
grub 2:2.12-2
grub-btrfs 4.13-1

Maybe it is important:
I also changed the /etc/calamares/modules/mount.conf before install. in section btrfsSubvolumes i changed

/var/cache to /.snapshots; 
/@cache to /@snapshots
/var/log to /var
/@log to /@var

After install i did

umount /.snapshots
rm -r /.snapshots
snapper -c root create-config /
btrfs subvolume delete /.snapshots
mkdir /.snapshots
mount -a

Now after creating snapshots. One via pre and post pacman

pacman -S neofetch

And one with

snapper -c root create -d “BASE”
grub-mkconfig -o /boot/grub/grub.cfg

and try to boot from them i get the Failed to start Remount Root and Kernel File Systems Message and boot stuck at Reached target Graphical Interface.

You shouldn’t do this on an Arch-based system. /var should be part of the root since pacman stores files there that need to be in-sync with the root.

Can I make a suggestion? Don’t make any changes. Just install EndeavourOS using btrfs, encryption and the default subvolumes it creates. Then install snapper, snap-pac, grub-btrfs and inotify-tools. Lastly systemctl enable --now grub-btrfsd

Then just configure snapper as normal without that other nonsense.

snapper -c root create-config /
1 Like

Thanks for your help so far and thanks for your suggestion which i followed.

I installed endeavouros without any changed an just activated encryption, btrfs and swap with hibernation. After install OS i did

yay -S snapper snap-pac grub-btrfs inotify-tools
sudo systemctl enable --now grub-btrfsd
sudo snapper -c root create-config /
yay -S neofetch
sudo snapper -c root create -d “BASE”
sudo grub-mkconfig -o /boot/grub/grub.cfg

I am still not able to boot any snapshot (pre and post neofetch, BASE).

Still

Failed to start Remount Root and Kernel File Systems Message

and boot stuck at Reached target Graphical Interface.

Can you share the output of findmnt --real

findmnt --real
TARGET SOURCE                   FSTYPE   OPTIONS
/      /dev/mapper/luks-626004dd-6815-464c-8b9b-2ece97f04b62[/@]
│                               btrfs    rw,noatime,compress=zstd:3,space_cache=v2,subvolid=256,subvol=/@
├─/home
│      /dev/mapper/luks-626004dd-6815-464c-8b9b-2ece97f04b62[/@home]
│                               btrfs    rw,noatime,compress=zstd:3,space_cache=v2,subvolid=257,subvol=/@home
├─/run/user/1000/doc
│      portal                   fuse.por rw,nosuid,nodev,relatime,user_id=1000,group_id=1001
├─/var/log
│      /dev/mapper/luks-626004dd-6815-464c-8b9b-2ece97f04b62[/@log]
│                               btrfs    rw,noatime,compress=zstd:3,space_cache=v2,subvolid=259,subvol=/@log
└─/var/cache
       /dev/mapper/luks-626004dd-6815-464c-8b9b-2ece97f04b62[/@cache]
                                btrfs    rw,noatime,compress=zstd:3,space_cache=v2,subvolid=258,subvol=/@cache

btrfs subvolume list /
ID 256 gen 65 top level 5 path @
ID 257 gen 65 top level 5 path @home
ID 258 gen 40 top level 5 path @cache
ID 259 gen 64 top level 5 path @log
ID 260 gen 19 top level 256 path var/lib/portables
ID 261 gen 19 top level 256 path var/lib/machines
ID 262 gen 45 top level 256 path .snapshots
ID 263 gen 34 top level 262 path .snapshots/1/snapshot
ID 264 gen 35 top level 262 path .snapshots/2/snapshot
ID 265 gen 44 top level 262 path .snapshots/3/snapshot

//Edit:
Okay i don’t really know what to do next. I tested out a little bit:

  1. created a new EndveavourOS VM without swap-partition, just btrfs and encryption → same error
  2. created a new EndveavourOS VM with swap-partition but without encryption → same error
  3. I installed on a real notebook (swap-partition, btrfs, encryption) → same error

//Edit2:
4. created a new EndveavourOS VM without swap-partition, without encryption just btrfs → same error

Looking for a solution i found https://bbs.archlinux.org/viewtopic.php?id=178329

Tested to comment out the / mount of /etc/fstab. The error while booting a snapshot disapperas. But boot still stuck at

[OK] Startet Simple Desktop Display Manager.
[OK] Reached target Graphical Interface.

Okay, after testing out 1000 things i guess now the main problem ist display manager.
Neither sddm nor light-dm are able to start a snapshot.

Failed to read display number from pipe
Could not start Display server on vt 1

Found no solution for this right now.

Just to be sure, you didn’t remove eos-dracut as part of your many troubleshooting steps, correct?

It is needed to properly boot a read-only snapshot.

No i didn’t removed it.
For almost every test i create a new VM with a new install. I also test on a real notebook to make sure its not a VM related problem.

But even on real notebook i get the same results as on the VMs.

So right now i don’t really have a clue what to do next. I also tested a installation with timeshift. With timeshift created snapshots i am able to boot into them - but timeshift-autosnap won’t work. And because snapper is the recommended i really like to get this to work.

Running dracut-rebuild gets me booting right into a grub-shell.

Can you try switching to the LTS kernel and see if you get a different result? I haven’t looked into it too much yet but I do see this recent issue here:

Oh wow, first sign of success :slight_smile: Thanks so far BluishHumility!

I installed 6.6.25-1-lts and removed 6.8.2, booted into LTS, created snapshots, booted into a snaphot and it works! So i guess it is a kernel-related issue (at least for a couple of people).

I wanted to test it with another kernel, 6.7 or something, but repositories only shows hardened an zen-kernels.

Apperently i have to use LTS-Kernel then. I will test it on the real notebook also later on.

So regarding to my first post in this topic the problem, not be able to boot a snapshot, has nothing to do with the original error message

Failed to start Remount Root and Kernel File Systems.

Solution for this seems to comment out the “/” mount in /etc/fstab.

journalctl -b -p err

endos-pc systemd-remount-fs[552]: /usr/bin/mount for / exited with exit status 32.
endos-pc systemd[1]: Failed to start Remount Root and Kernel File Systems.

Does is have any negative effect to comment out the line in /etc/fstab?:

#/dev/mapper… / btrfs subvol=/@,noatime,compress=zstd 0 0

Solution to boot into a snapshot as from BluishHumility referenced is to use LTS-Kernel. At least it seems to be, i will test it out today a little bit more.

You should not leave it like that. It sounds like there is an issue with your fstab. Have you modified it for any purpose?

This looks fine. Does the /dev/mapper part match the output from findmnt above?

I did not modified the /etc/fstab primary. I modified only to test if the Remount fs error still appears with the / commented out (i found this solution somewhere in arch-forum)

So i tested out a little bit:

running the original LTS kernel, no snapshot and / is not outcommented:

findmnt --real

/ /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@] btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=256,subvol=/@
├─/home /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@home] btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=257,subvol=/@home
├─/run/user/1000/doc
│ portal fuse.portal rw,nosuid,nodev,relatime,user_id=1000,group_id=1001
├─/var/cache /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@cache] btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=258,subvol=/@cache
├─/var/log /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@log] btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=259,subvol=/@log

cat /etc/fstab
UUID=7ECC-2F22 /boot/efi vfat fmask=0137,dmask=0027 0 2
/dev/mapper/luks-a6b66b0d-5fb4-4a5d-a18b-f4859b35cea0 swap swap defaults 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f / btrfs subvol=/@,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /home btrfs subvol=/@home,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /var/cache btrfs subvol=/@cache,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /var/log btrfs subvol=/@log,noatime,compress=zstd 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
vfat rw,relatime,fmask=0137,dmask=0027,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount

running a snapshot and / is not outcommented:

findmnt --real
/home /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@home] btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=257,subvol=/@home
/run/user/1000/doc
portal fuse.portal rw,nosuid,nodev,relatime,user_id=1000,group_id=1001
/var/cache /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@cache] btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=258,subvol=/@cache
/var/log /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@log] btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=259,subvol=/@log
/boot/efi /dev/sda1

cat /etc/fstab
UUID=7ECC-2F22 /boot/efi vfat fmask=0137,dmask=0027 0 2
/dev/mapper/luks-a6b66b0d-5fb4-4a5d-a18b-f4859b35cea0 swap swap defaults 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f / btrfs subvol=/@,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /home btrfs subvol=/@home,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /var/cache btrfs subvol=/@cache,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /var/log btrfs subvol=/@log,noatime,compress=zstd 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

running a snapshot and / is outcommented:

findmnt --real
/home /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@home] btrfs rw,noatime,ssd,space_cache=v2,subvolid=257,subvol=/@home
/run/user/1000/doc
portal fuse.portal rw,nosuid,nodev,relatime,user_id=1000,group_id=1001
/var/cache /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@cache] btrfs rw,noatime,ssd,space_cache=v2,subvolid=258,subvol=/@cache
/var/log /dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f[/@log] btrfs rw,noatime,ssd,space_cache=v2,subvolid=259,subvol=/@log
/boot/efi /dev/sda1

cat /etc/fstab
UUID=7ECC-2F22 /boot/efi vfat fmask=0137,dmask=0027 0 2
/dev/mapper/luks-a6b66b0d-5fb4-4a5d-a18b-f4859b35cea0 swap swap defaults 0 0
#/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f / btrfs subvol=/@,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /home btrfs subvol=/@home,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /var/cache btrfs subvol=/@cache,noatime,compress=zstd 0 0
/dev/mapper/luks-63e0389e-3fe6-483f-9ac2-63aee37e5e7f /var/log btrfs subvol=/@log,noatime,compress=zstd 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0