Venom1991 / refind-btrfs

Generate rEFInd manual boot stanzas from Btrfs snapshots
GNU General Public License v3.0
144 stars 8 forks source link

SOLVED! - Systemd service Fails -- ModuleNotFoundError: No module named 'transitions' #58

Closed luthepa1 closed 2 months ago

luthepa1 commented 2 months ago

Hi all,

I am having trouble with the refind-btrfs.service failing. I have been at this all night and I am not making any headway. I am using CachyOS linux (arch) and so everything python is installed through pacman (thus python is externally-managed-environment). python-transitions is installed. Can anyone help me please?

Details of my system:

Error message from systemd (journalctl outputs same error information)

❯ systemctl status refind-btrfs
× refind-btrfs.service - Generate rEFInd manual boot stanzas from Btrfs snapshots
     Loaded: loaded (/usr/lib/systemd/system/refind-btrfs.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2024-05-29 00:24:00 AEST; 18min ago
   Main PID: 606 (code=exited, status=1/FAILURE)
        CPU: 266ms

May 29 00:24:00 c63amg python[606]:   File "<frozen runpy>", line 148, in _get_module_details
May 29 00:24:00 c63amg python[606]:   File "<frozen runpy>", line 112, in _get_module_details
May 29 00:24:00 c63amg python[606]:   File "/usr/lib/python3.12/site-packages/refind_btrfs/__init__.py", line 36, in <module>
May 29 00:24:00 c63amg python[606]:     from refind_btrfs.utility.injector_modules import CLIModule, WatchdogModule
May 29 00:24:00 c63amg python[606]:   File "/usr/lib/python3.12/site-packages/refind_btrfs/utility/injector_modules.py", line 27, in <module>
May 29 00:24:00 c63amg python[606]:     from transitions.core import State
May 29 00:24:00 c63amg python[606]: ModuleNotFoundError: No module named 'transitions'
May 29 00:24:00 c63amg systemd[1]: refind-btrfs.service: Main process exited, code=exited, status=1/FAILURE
May 29 00:24:00 c63amg systemd[1]: refind-btrfs.service: Failed with result 'exit-code'.
May 29 00:24:00 c63amg systemd[1]: Failed to start Generate rEFInd manual boot stanzas from Btrfs snapshots.

Best regards,

Paul.

Venom1991 commented 2 months ago

@luthepa1

Did you try rebuilding Python packages which originate from the AUR? This issue is similar to yours.

luthepa1 commented 2 months ago

@Venom1991 - I fixed it!

the python-transitions pkg was installed from CachyOS own repo which I noticed is install to python-3.10 site packages location. What I had to do was to uninstall this package and then install from AUR instead (paru -S aur/python-transitions) which then installs to the python-3.12 site packages location. After this the refind-btrfs.service works correctly.

Now I am having to deal with snapshots not being bootable. It seems from looking at the log file refind/refind-btrfs cannot find my vmlinuz-linux-cachyos stating it's an invalid loader file but I think I should probably create a new thread for help on this error. FYI I have a seperate ext4 boot partition.

==========System information==========
04:09:23 - rEFInd 0.14.2 built with GNU-EFI
04:09:23 - rEFInd boot partition GUID: CDF59361-E236-447C-8B51-3DD558CB16A6
04:09:23 - Platform: x86-64/X64/AMD64 (64-bit)
04:09:23 - Log level is 1
04:09:23 - Menu timeout is 3
04:09:23 - Firmware: American Megatrends 5.27
04:09:23 - EFI Revision 2.80
04:09:23 - Secure Boot inactive
04:09:23 - Shim is not available
04:09:23 - CSM is not available
04:09:23 - Error 2; Unable to retrieve EFI variable capacity
04:09:23 - System does support text mode
04:09:23 - System does not support UGA Draw graphics mode
04:09:23 - System does support GOP graphics mode
04:09:23 - Setting up Secure Boot (if applicable)

==========Loading drivers==========
04:09:23 - Starting ext4_x64.efi
04:09:23 - Using load options ''
04:09:23 - Note: ext4_x64.efi is a driver
04:09:23 - 'EFI\refind\drivers_x64\ext4_x64.efi' is a valid loader file
04:09:23 - Launching 'ext4_x64.efi'
04:09:23 - Program has returned 0

----------Next loader----------

==========Scanning for volumes==========
04:09:23 - Identified volume ' whole disk volume', of type whole disk
04:09:23 - Identified volume 'EFI', of type FAT
04:09:23 - Identified volume 'boot', of type ext4
04:09:23 - Identified volume 'root', of type Btrfs
04:09:23 - Identified 4 volumes

==========Initializing basic features==========
04:09:23 - Adjusting default_selection with PreviousBoot values
04:09:23 - Trying to create a 'vars' directory in which to hold variables
04:09:23 - Entering InitScreen()
04:09:23 - Setting watchdog timer
04:09:23 - Setting screen resolution and mode
04:09:24 - Setting volume icons....

==========Scanning for boot loaders==========

----------Scanning for internal EFI-mode boot loaders----------
04:09:24 - Called ScanEfiFiles() on an invalid volume
04:09:24 - Scanning EFI files on EFI
04:09:24 - Scanning EFI files on boot
04:09:24 - 'vmlinuz-linux-cachyos' is a valid loader file
04:09:24 - Adding loader entry for 'vmlinuz-linux-cachyos'
04:09:24 - Searching for an initrd to match 'vmlinuz-linux-cachyos' on 'boot'
04:09:24 - Located initrd is '\initramfs-linux-cachyos.img'**
04:09:24 - Searching for an initrd to match '\vmlinuz-linux-cachyos' on 'boot'
04:09:24 - Located initrd is '\initramfs-linux-cachyos.img'
04:09:24 - Called ScanEfiFiles() on an invalid volume

----------Scanning for external EFI-mode boot loaders----------

----------Scanning for bootable EFI-mode optical discs----------

----------Scanning for user-configured boot stanzas----------
04:09:24 - Adding manual loader for 'bzImage-3.3.0-rc7'
04:09:24 - Searching for an initrd to match 'bzImage-3.3.0-rc7' on 'EFI'
04:09:24 - Located initrd is '(null)'
04:09:24 - Entry is disabled
04:09:24 - Adding manual loader for '\boot\vmlinuz-linux-cachyos'
04:09:24 - Searching for an initrd to match '\boot\vmlinuz-linux-cachyos' on 'EFI'
04:09:24 - Located initrd is '(null)'
04:09:24 - Adding manual loader for '\EFI\ubuntu\grubx64.efi'
04:09:24 - Entry is disabled
04:09:24 - Adding manual loader for '\EFI\elilo\elilo.efi'
04:09:24 - Entry is disabled
04:09:24 - Adding manual loader for '\EFI\Microsoft\Boot\bootmgfw.efi'
04:09:24 - Entry is disabled
04:09:24 - Adding manual loader for '\EFI\tools\shell.efi'
04:09:24 - Entry is disabled
04:09:24 - Adding manual loader for '\System\Library\CoreServices\boot.efi'
04:09:24 - Entry is disabled
04:09:24 - Entry is disabled

----------Scanning for user-configured boot stanzas----------

----------Scanning for user-configured boot stanzas----------
04:09:24 - Adding manual loader for '\boot\vmlinuz-linux-cachyos'
04:09:24 - Searching for an initrd to match '\boot\vmlinuz-linux-cachyos' on 'EFI'
04:09:24 - Located initrd is '(null)'

==========Scanning for tools==========
04:09:24 - Scanning for tools 'memtest86.efi,memtest86_x64.efi,memtest86x64.efi,memtest86+x64.efi' in 'EFI\tools,\,EFI\refind'
04:09:24 - Scanning for tools 'fwupx64.efi' in 'EFI\tools,\,EFI\refind'
04:09:24 - Scanning for tools 'MokManager.efi,HashTool.efi,HashTool-signed.efi,KeyTool.efi,KeyTool-signed.efi,mmx64.efi' in 'EFI\tools,\,EFI\refind'
04:09:24 - Scanning for tools 'fwupx64.efi' in 'EFI\tools,\,EFI\refind'

==========Entering main loop==========

==========Launching 'Boot Arch Linux (rwsnap_2024-05-29_13-35-22_ID382) from EFI'==========
04:09:29 - Starting vmlinuz-linux-cachyos
04:09:29 - Using load options 'quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_13-35-22_ID382 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced initrd=\boot\initramfs-linux-cachyos.img'
04:09:29 - Invalid loader file!
04:09:29 - Error: Not Found while loading vmlinuz-linux-cachyos**
04:09:30 - Setting screen resolution and mode

----------Next loader----------

==========Launching 'Boot vmlinuz-linux-cachyos from boot '==========
04:09:32 - Starting vmlinuz-linux-cachyos
04:09:32 - Using load options 'quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@ root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced initrd=\initramfs-linux-cachyos.img'
04:09:32 - '\vmlinuz-linux-cachyos' is a valid loader file
04:09:32 - Launching 'vmlinuz-linux-cachyos'
Venom1991 commented 2 months ago

@luthepa1

That initrd option found in the last two boot sequences is different: initrd=\boot\initramfs-linux-cachyos.img (doesn't work) versus initrd=\initramfs-linux-cachyos.img (works).

Could you paste the output of running the refind-btrfs command here? I suppose refind-btrfs included the \boot path prefix and it shouldn't have because you have a separate /boot partition. Also, please paste your manual boot stanza here, as well.

luthepa1 commented 2 months ago

reset-setup-refind-btrfs-output.txt

arch_linux_vmlinuz-linux-cachyos.conf.txt

Oh! I missed that. Good eye! Maybe I made a mistake somewhere.

refind-btrfs command output ❯ sudo rm -fvr /var/lib/refind-btrfs/local_db && sudo refind-btrfs --run-mode one-time [sudo] password for c63amg: removed '/var/lib/refind-btrfs/local_db' Initializing the block devices using lsblk. Initializing the physical partition table for device '/dev/zram0' using lsblk. Analyzing the 'refind-btrfs.conf' file. Initializing the live partition table for device '/dev/zram0' using findmnt. Initializing the physical partition table for device '/dev/nvme0n1' using lsblk. Initializing the live partition table for device '/dev/nvme0n1' using findmnt. Found the ESP mounted at '/boot/efi' on '/dev/nvme0n1p1'. Found the root partition on '/dev/nvme0n1p3'. Found a separate boot partition on '/dev/nvme0n1p2'. Searching for snapshots of the '@' subvolume in the '/.snapshots' directory. Found subvolume '@' mounted as the root partition. Found 51 snapshots of the '@' subvolume. Searching for the 'refind.conf' file on '/dev/nvme0n1p1'. Analyzing the 'refind.conf' file. Analyzing the 'theme.conf' file. Found 1 boot stanza matched with the root partition. Initializing the static partition table for subvolume '@/.snapshots/61/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/60/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/59/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/58/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/57/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/56/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/55/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/49/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/48/snapshot' from its fstab file. Initializing the static partition table for subvolume '@/.snapshots/47/snapshot' from its fstab file. Found 10 snapshots for addition. Creating the '/root/.refind-btrfs' destination directory with 750 permissions. Creating a new writable snapshot from the read-only '@/.snapshots/61/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_13-35-22_ID382'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_13-35-22_ID382/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/60/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_13-21-20_ID380'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_13-21-20_ID380/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/59/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_12-56-10_ID377'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_12-56-10_ID377/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/58/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_12-34-04_ID375'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_12-34-04_ID375/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/57/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_12-23-03_ID354'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_12-23-03_ID354/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/56/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_12-18-12_ID353'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_12-18-12_ID353/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/55/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_12-08-15_ID345'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_12-08-15_ID345/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/49/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_10-37-58_ID331'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_10-37-58_ID331/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/48/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_10-36-57_ID330'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_10-36-57_ID330/etc/fstab' file. Creating a new writable snapshot from the read-only '@/.snapshots/47/snapshot' snapshot at '/root/.refind-btrfs/rwsnap_2024-05-29_10-36-56_ID329'. Modifying the '/root/.refind-btrfs/rwsnap_2024-05-29_10-36-56_ID329/etc/fstab' file. Creating the 'btrfs-snapshot-stanzas' destination directory. Writing to the 'btrfs-snapshot-stanzas/arch_linux_vmlinuz-linux-cachyos.conf' file. Appending 1 'include' directive to the 'refind.conf' file.

Manual boot stanza - arch_linux_vmlinuz-linux-cachyos.conf menuentry "Arch Linux (rwsnap_2024-05-29_14-09-40_ID395)" { icon /EFI/refind/icons/vol_internal.png volume "Arch Linux" loader /boot/vmlinuz-linux-cachyos initrd /boot/initramfs-linux-cachyos.img options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_14-09-40_ID395 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" submenuentry "Arch Linux (rwsnap_2024-05-29_13-35-22_ID382)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_13-35-22_ID382 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_13-21-20_ID380)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_13-21-20_ID380 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_12-56-10_ID377)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_12-56-10_ID377 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_12-34-04_ID375)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_12-34-04_ID375 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_12-23-03_ID354)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_12-23-03_ID354 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_12-18-12_ID353)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_12-18-12_ID353 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_12-08-15_ID345)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_12-08-15_ID345 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_10-37-58_ID331)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_10-37-58_ID331 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } submenuentry "Arch Linux (rwsnap_2024-05-29_10-36-57_ID330)" { options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@root/.refind-btrfs/rwsnap_2024-05-29_10-36-57_ID330 root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" } }

Venom1991 commented 2 months ago

@luthepa1

No, I need the source boot stanza that you've defined yourself in the refind.conf file (the one on your ESP). Judging by the tool's output, a separate /boot partition was detected and paths (loader and initrd) were not adjusted (more info).

If the initrd=\boot\initramfs-linux-cachyos.img line is present in your own boot stanza then I have no idea why that one would even work. Also, is the /boot/refind_linux.conf (auto-generated by refind-install) file present on your system?

EDIT: Did you also enable rEFInd's manual scanning feature as explained here (first paragraph)?

luthepa1 commented 2 months ago

my bad. Please see below.

I just tried again but removing "/boot/" from the "loader" & "initrd" lines from my manual entry but that didn't work either.

note: just saw you updated last post and I will check now

`#

refind.conf

Configuration file for the rEFInd boot menu

#

timeout 3

log_level 1

use_nvram false

resolution 1920 1280

enable_touch

use_graphics_for osx,linux

extra_kernel_version_strings linux-lts,linux,linux-cachyos,linux-cachyos-cfs,linux-cachyos-bore,linux-cachyos-tt,linux-cachyos-bmq,linux-cachyos-pds,linux-cachyos-lts

menuentry "Arch Linux" { icon /EFI/refind/icons/vol_internal.png volume "Arch Linux" loader vmlinuz-linux-cachyos initrd initramfs-linux-cachyos.img options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@ root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced" submenuentry "Boot using fallback initramfs" { initrd initramfs-linux-cachyos-fallback.img } submenuentry "Boot to terminal" { add_options "systemd.unit=multi-user.target" }

}

Nord theme

include themes/nord/theme.conf

include btrfs-snapshot-stanzas/arch_linux_vmlinuz-linux-cachyos.conf`

Venom1991 commented 2 months ago

This part of the log's output is critical:

----------Scanning for user-configured boot stanzas---------- 04:09:24 - Adding manual loader for '\boot\vmlinuz-linux-cachyos' 04:09:24 - Searching for an initrd to match '\boot\vmlinuz-linux-cachyos' on 'EFI' 04:09:24 - Located initrd is '(null)'

I don't see how your manual boot stanza could possibly work. Of course, refind-btrfs cannot know this and it simply uses it as-is to generate a new boot stanza intended for booting into snapshots.

----------Next loader----------

==========Launching 'Boot vmlinuz-linux-cachyos from boot '========== 04:09:32 - Starting vmlinuz-linux-cachyos 04:09:32 - Using load options 'quiet loglevel=3 zswap.enabled=0 nowatchdog splash splash rw rootflags=subvol=/@ root=UUID=169ee619-6e1c-44c3-9204-da93e29eeced initrd=\initramfs-linux-cachyos.img' 04:09:32 - '\vmlinuz-linux-cachyos' is a valid loader file 04:09:32 - Launching 'vmlinuz-linux-cachyos'

I suppose this is where rEFInd falls back to using the auto-generated /boot/refind_linux.conf file.

luthepa1 commented 2 months ago

perhaps I should just uninstall and delete everything and start again.

Venom1991 commented 2 months ago

@luthepa1

Not necessarily, try thoroughly reading the wiki and also deleting the /boot/refind_linux.conf file once you've managed to boot from your manual boot stanza (not before that, obviously).

luthepa1 commented 2 months ago

OMG! OMG!! OMG!!!

ok, I finally got everything working (refind + refind-btrfs) on arch CachyOS. For anyone who finds this post because they are have the same issues, I will list everything I did below.

Here is my system CachyOS

fstab:

$ cat /etc/fstab

UUID=F10A-8604 /boot/efi vfat defaults,umask=0077 0 2 UUID=df9b2b0e-4d26-4132-af5b-360bd61e7278 /boot ext4 defaults,noatime,commit=60 0 2 UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe / btrfs subvol=/@,defaults,noatime,compress=zstd,commit=120 0 0 UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe /home btrfs subvol=/@home,defaults,noatime,compress=zstd,commit=120 0 0 UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe /root btrfs subvol=/@root,defaults,noatime,compress=zstd,commit=120 0 0 UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe /srv btrfs subvol=/@srv,defaults,noatime,compress=zstd,commit=120 0 0 UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe /var/cache btrfs subvol=/@cache,defaults,noatime,compress=zstd,commit=120 0 0 UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe /var/tmp btrfs subvol=/@tmp,defaults,noatime,compress=zstd,commit=120 0 0 UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe /var/log btrfs subvol=/@log,defaults,noatime,compress=zstd,commit=120 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 lsblk: $ lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE MOUNTPOINTS zram0 [SWAP] nvme0n1 ├─nvme0n1p1 vfat FAT32 F10A-8604 509.2M 0% /boot/efi ├─nvme0n1p2 ext4 1.0 Boot df9b2b0e-4d26-4132-af5b-360bd61e7278 1.6G 9% /boot └─nvme0n1p3 btrfs 02abb4f6-ba0a-473a-b268-a3ef989c53fe 453.4G 2% /var/tmp /var/log /srv /var/cache /root /home / blkid: $ blkid /dev/nvme0n1p2 /dev/nvme0n1p2: LABEL="Boot" \ UUID="df9b2b0e-4d26-4132-af5b-360bd61e7278" \ BLOCK_SIZE="4096" \ TYPE="ext4" \ PARTLABEL="Boot" \ **PARTUUID="97f97f5e-cf89-4637-aca8-2ee500899ee3"** So the things import to my refind.conf located on the ESP partition are these: 1. I have a separate boot partition (as above - nvme0n1p2) 2. For the manual stanza, the "volume" param needs to point to the boot partition. You can use PARTLABEL but I prefer UUID. NOTE: you need to use GUID which you can find by using blkid command, referenced by "PARTUUID". IMPORTANT! 3. loader and initrd paths are relative to the **root of volume**. If /boot is a separate partition (e.g. /dev/nvme0n1p2), the loader and initrd paths would be **/vmlinuz-linux and /initramfs-linux.img, respectively**. 4. refind.conf - Ensure that **scanfor** includes **manual** or these entries will not appear in rEFInd's menu. My refind.conf manual stanza: timeout 3 log_level 1 use_nvram false resolution 1920 1280 enable_touch **scanfor manual,internal,external,optical** extra_kernel_version_strings linux-lts,linux,linux-cachyos,linux-cachyos-cfs,linux-cachyos-bore,linux-cachyos-tt,linux-cachyos-bmq,linux-cachyos-pds,linux-cachyos-lts menuentry "CachyOS" { icon /EFI/refind/icons/os_linux.png **volume 97f97f5e-cf89-4637-aca8-2ee500899ee3** loader /vmlinuz-linux-cachyos initrd /initramfs-linux-cachyos.img options "quiet loglevel=3 zswap.enabled=0 nowatchdog splash rw rootflags=subvol=/@ root=UUID=02abb4f6-ba0a-473a-b268-a3ef989c53fe add_efi_memmap" submenuentry "Boot using fallback initramfs" { initrd /initramfs-linux-cachyos-fallback.img } submenuentry "Single User Mode" { add_options "single" } submenuentry "Boot to terminal" { add_options "systemd.unit=multi-user.target" } } include themes/nord/theme.conf include btrfs-snapshot-stanzas/boot_vmlinuz-linux-cachyos.conf So all this has be done before, making sure you manual stanza in refind.conf is working before I proceeded forward with running the refind-btrfs script. As for refind-btrfs, I did not need to make any changes. It just worked ;-) Paul.
Venom1991 commented 2 months ago

That's great, just bear in mind that in case your kernel received an update you might not be able to boot into snapshots which were created before that update due to a mismatch between, for example, the Nvidia kernel module and the kernel itself. There are other examples, of course. It might work and it might not but that's just how it is with a separate /boot partition, currently. See this issue.

luthepa1 commented 2 months ago

thanks @Venom1991 ! Really appreciate your time helping me out.