You are not logged in.

#1 2025-10-31 13:49:38

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 235
Website

[SOLVED]moving from systemd-boot to rEFInd

My arch linux box boot via systemd-boot. Now I want to dual boot arch with fydeOS and after a few unsuccessful installs I came to the conclusion it would be best to use rEFInd as boot-manager.
Before I go and potentially break everything, leaving me with an unbootable arch (I have a rescue live usb), I want to make sure I am going the good way.
What I did:
- installed rEFInd following wiki
- moved the  /boot/EFI/systemd folder to /boot/EFI/systemd.bck
- checked /boot/EFI/refind folder exists
- added the btrfs_x64.efi drviver to /boot/refind/drivers_x64 folder (my root partition is on a btrfs subvolume)
- modified the /boot/refind_linux.conf file with adding the following as first line:

"Boot with standard options"  "root=UUID=7b8af2ba-4125-4f76-bb17-287fb83ee821 rw rootflags=subvol=/@
ume initrd=/@\boot\initramfs-%v.img"

- modified the /boot/EFI/refind/refind.conf file this way:

also_scan_dirs +,/@/boot
--------
menuentry "Arch Linux" {
    icon     /EFI/refind/icons/os_arch.png
    volume   "Arch Linux"
    loader   /boot/vmlinuz-linux
    initrd   /boot/initramfs-linux.img
    options  "root=PARTUUID=72a68bca-e1a6-404c-9e6b-ece0503485 rw add_efi_memmap"
    submenuentry "Boot using fallback initramfs" {
        initrd /boot/initramfs-linux-fallback.img
    }
    submenuentry "Boot to terminal" {
        add_options "systemd.unit=multi-user.target"
    }
    disabled
}

More info:

# tree -L2 /boot
/boot
├── EFI
│   ├── BOOT
│   ├── fydeos
│   ├── Linux
│   ├── refind
│   ├── systemd.bck
│   └── tools
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── loader
│   ├── entries
│   ├── entries.srel
│   ├── keys
│   ├── loader.conf
│   └── random-seed
├── refind_linux.conf
├── shellx64.efi
└── vmlinuz-linux
------------------
cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>

# /dev/sda2 LABEL=root
UUID=7b8af2ba-4125-4f76-bb17-287fb83ee821       /               btrfs           defaults,compress=zstd:3,subvol=/@      0 0

# /dev/sda2 LABEL=root
UUID=7b8af2ba-4125-4f76-bb17-287fb83ee821       /.snapshots     btrfs           defaults,compress=zstd:3,subvol=/@snapshots     0 0

# /dev/sda2 LABEL=root
UUID=7b8af2ba-4125-4f76-bb17-287fb83ee821       /home           btrfs           defaults,compress=zstd:3,subvol=/@home  0 0

# /dev/sda1
UUID=4D42-7904          /boot           vfat            rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 2

So now, am I all set to reboot my machine and use rEFInd ?

Thank you for help

Last edited by gabx (2025-11-02 12:36:52)

Offline

#2 2025-10-31 14:02:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,247

Re: [SOLVED]moving from systemd-boot to rEFInd

gabx wrote:

- moved the  /boot/EFI/systemd folder to /boot/EFI/systemd.bck

Why would you do this? Get the system working with the new boot manager before doing something like this. Rename it back. All you need to do to test refind is choose it's entry in your firmware's boot manager instead of choosing systemd's entry.

gabx wrote:

- added the btrfs_x64.efi drviver to /boot/refind/drivers_x64 folder (my root partition is on a btrfs subvolume)

Completely unnecessary. The boot manager does not need to access your root partition, it needs to access the initramfs, which is on fat32 in your case.

Offline

#3 2025-10-31 14:40:42

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 235
Website

Re: [SOLVED]moving from systemd-boot to rEFInd

Scimmia wrote:
gabx wrote:

- moved the  /boot/EFI/systemd folder to /boot/EFI/systemd.bck

Why would you do this? Get the system working with the new boot manager before doing something like this. Rename it back. All you need to do to test refind is choose it's entry in your firmware's boot manager instead of choosing systemd's entry.
Where do I choose rEFInd instead of systemd ?

gabx wrote:

- added the btrfs_x64.efi drviver to /boot/refind/drivers_x64 folder (my root partition is on a btrfs subvolume)

Completely unnecessary. The boot manager does not need to access your root partition, it needs to access the initramfs, which is on fat32 in your case.
OK, I see

Offline

#4 2025-10-31 14:45:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,247

Re: [SOLVED]moving from systemd-boot to rEFInd

Your firmware's boot manager. Usually you hit F12 or something at boot to show the menu. Once you have things working, you can change the default. See efibootmgr.

Offline

#5 2025-10-31 14:58:15

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 235
Website

Re: [SOLVED]moving from systemd-boot to rEFInd

OK, I see what you mean. I will use efibootmgr to add this new entry
Below is the output of efibootmgr command:

# efibootmgr --unicode
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 000B,0011,0010,0006,0004,0007,0008,000A,000C,000D
Boot0000  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0001  Boot Menu     FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
Boot0002  Diagnostic Splash     FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0003  Recovery      FvFile(ab4579c4-3bc5-4489-a88e-0f21e6cebf85)
Boot0004* ATAPI CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot0005* CD-ROM        VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,be9d0102e211f3489efa0b983c96839b)
Boot0006* ATA HDD0      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot0007* ATA HDD1      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot0008* Other HDD     VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f609)
Boot0009* ATA HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot000A* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot000B* USB HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot000C* USB CD        VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot000D* USB FDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot000E* IDER BOOT CDROM       PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,1,0)
Boot000F* IDER BOOT Floppy      PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,0,0)
Boot0010* Fedora        HD(1,GPT,62ddc297-a4bd-4958-ba44-b1d7dfcd9d42,0x800,0x200000)/\EFI\fedora\shimx64.efi
Boot0011* GRUB  HD(1,GPT,3b4bd809-6f29-4609-8b03-f89a28db4993,0x800,0x200000)/\EFI\GRUB\grubx64.efi

A few remarks:
- I can't see anything related to systemd-boot
- the list looks very long (maybe shall I delete unwanted entries?)
- there is nothing about GRUB neither Fedora in my ESP. Why are they in this list? I can see I boot first from USB, then from 0011, which is GRUB. Why GRUB when I use systemd-boot?

Last edited by gabx (2025-10-31 15:13:43)

Offline

#6 2025-10-31 15:04:09

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,247

Re: [SOLVED]moving from systemd-boot to rEFInd

Installing refind should have already done that.

Offline

#7 2025-10-31 15:14:54

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 235
Website

Re: [SOLVED]moving from systemd-boot to rEFInd

Scimmia wrote:

Installing refind should have already done that.

Well, looking at the efibootmgr output post above, I can't see anything about refind. The output tells I boot from 011, GRUB entry in \EFI\GRUB\grubx64.efi, but I don't have the GRUB folder in my EFI folder.

Last edited by gabx (2025-10-31 15:27:30)

Offline

#8 2025-10-31 15:55:52

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 235
Website

Re: [SOLVED]moving from systemd-boot to rEFInd

I tried to reinstall rEFInd, and got this warning (already got it the first time I installed rEFInd.

gabx@larmor ➤➤ /home % gabx@larmor ➤➤ /home % sudo refind-install
ShimSource is none
Installing rEFInd on Linux....
ESP was found at /boot using vfat
Copied rEFInd binary files

Copying sample configuration file as refind.conf; edit this file to configure
rEFInd.

Creating new NVRAM entry

ALERT: There were problems running the efibootmgr program! You may need to
rename the refind_x64.efi binary to the default name (EFI/BOOT/bootx64.efi
on x86-64 systems, EFI/BOOT/bootia32.efi on x86 systems, or
EFI/BOOT/bootaa64.efi on ARM64 systems) to have it run!

Existing //boot/refind_linux.conf found; not overwriting.

ALERT:
Installation has completed, but problems were detected. Review the output for
error messages and take corrective measures as necessary. You may need to
re-run this script or install manually before rEFInd will work.

But I still can't see any entry when running efibootmgr

Last edited by gabx (2025-10-31 15:58:46)

Offline

#9 2025-11-02 12:36:31

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 235
Website

Re: [SOLVED]moving from systemd-boot to rEFInd

I marked the thread solved, even if it is not really solved. In fact, I sticked to systemd-boot to dual boot arch with fydeos.
Please visit this forum post if you want to know how to set up the dual boot with systemd-boot.

Last edited by gabx (2025-11-02 12:37:29)

Offline

Board footer

Powered by FluxBB