How to get refind booting from 2 diff bsd slices

Hi all,
Refind is nearly perfectly working booting win and FBsd (on nda0p5). I have two Bsd slices on nda0,
but i can not convice it to boot from either Bsd slice nda0p5 or slice nda0p8.
May be some idea how to get it working?
This is my refind conf
----------------------
timeout 10
scanfor manual
log_level 3

menuentry "Windows 10" {
icon /EFI/refind/icons/os_win8.png
volume gptid/261d4e42-e1ea-443b-b950-642ab66dfdd3
loader /EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "FreeBSD/amd64 14.2-loader nda0p5" {
options "rootdev=nda0p5:/boot/loader.efi"
icon /EFI/refind/icons/os_freebsd.png
volume gptid/261d4e42-e1ea-443b-b950-642ab66dfdd3
loader /EFI/freebsd/loader.efi
}

menuentry "FreeBSD/amd64 14.1-loader nda0p8" {
options "rootdev=nda0p8:/boot/loader.efi"
icon /EFI/refind/icons/freebsd40.png
volume gptid/261d4e42-e1ea-443b-b950-642ab66dfdd3
loader /EFI/freebsd_B/loader.efi
}
--------------------

Thanks for looking over this, Anton
 
menuentry "FreeBSD 14.1 on nda0p8" {
icon /EFI/refind/icons/freebsd40.png
volume 261d4e42-e1ea-443b-b950-642ab66dfdd3 # Better use labels
loader /EFI/freebsd_B/loader.efi
options "root=/" # probably unnecessary
}

And, of course, you cannot use the same id for any partition ;)
 
Thanks for answers
But in the meantime refind stops working with "initializing" and no idea why, probably playing around too much
Greetings, Anton
 
Hi, after learning more about it, refind perfectly working
Any ideas how to tell refind to boot from slice nda0p5 or nda0p8?
does /boot/loader.efi accept parameters to load from certain slice, as i see no method in refind itself ?
at the moment it looks like
efibootmgr=
BootOrder : 0006, 0007, 0002, 0003, 0004, 0001, 0000
+Boot0006* rEFInd
Boot0007* Windows Boot Manager
Boot0002 USB:
Boot0003 Expansion IPV4 Network
Boot0004 Expansion IPV6 Network
Boot0001 USB:
Boot0000* WD_BLACK SN770 2TB-23351J801766

refind.conf =
timeout 10
scanfor manual
log_level 3

menuentry "Windows 10" {
icon /EFI/refind/icons/os_win8.png
loader /EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "FreeBSD 14.2" {
icon /EFI/refind/icons/os_freebsd.png
loader /EFI/freebsd/loader.efi
}

menuentry "FBSD BackUp 13.2" {
icon /EFI/refind/icons/freebsd40.png
volume 254b2c27-1aac-11f0-8c59-842afdbd631a
loader /EFI/freebsd/loader.efi
}

at the moment trying with refinds volume using gparts rawuuid

Thanks for Ideas, Anton
 
using volume gives refind error
invalid loader file , Not found while loading loader.efi
at least i do not understand, whats when loaded, or to configure....
 
rEFInd only loads the boot loader (loader.efi in this case). You need to convince loader.efi to load the correct boot / root device.
So far, I have not been able to get this working.
 
Any ideas how to tell refind to boot from slice nda0p5 or nda0p8?
Those are partitions, not slices. Slices are indicated with an s, i.e. ada0s1 or da2s3. Slices only exist on MBR partitioned disks.

And you only have one EFI partition, thus also only one /EFI/FreeBSD/loader.efi. REFInd doesn't boot FreeBSD, rEFInd starts loader.efi, it's loader.efi that boots FreeBSD.
 
Yes, thanks, mixed slices partitions...
and thats after some learning about refind, i asked if it is possible to give loader.efi some arguments on the way
at least ist works now and i have a little more understanding
Greetings,Anton
 
waasnsteffl, assuming both FreeBSD file systems are UFS, try this:

/boot/efi/efi/refind/refind.conf
Code:
menuentry "FreeBSD-14.2" {
    icon ...
    loader /efi/freebsd/loader.efi
    options "currdev=disk0p5:"
}
# (Mind the colon at end of the currdev line)

menuentry "FBSD BackUp 13.2" {
    icon ...
    loader /efi/freebsd/loader.efi
}

For nda0p8: /boot/efi/efi/freebsd/loader.env
Code:
currdev=disk0p8:
(Mind the colon at end of the line)

"options currdev.." has no effect on both entries, only in one. For the second use loader.env.

This setup works in a VM test system (no Windows installed, though, but this shouldn't matter), rEFInd version 0.14.2.

Docs:

rEFInd configuration "options" token: https://www.rodsbooks.com/refind/configfile.html#stanzas
currdev: loader_simp(8)
loader.env: loader.efi(8)
 
Hi all, and sorry for long time not posting/answering. I still try to get refind booting from ndaop6 partition workin
this is the refind.conf at the moment
timeout 10
log_level 3

menuentry "Windows 10" {
icon /EFI/refind/icons/os_win8.png
loader /EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "FreeBSD 14.3 on nda0p5" {
icon /EFI/refind/icons/os_freebsd.png
loader /EFI/freebsd/loader.efi
}

menuentry "FBSD nda0p6" {
icon /EFI/refind/icons/freebsd40.png
loader /EFI/FBSD6/loader.efi
}

menuentry "FBSD nda0p8" {
icon /EFI/refind/icons/freebsd40.png
loader /EFI/FBSD8/loader.efi
}

#Boot to FW : false
#BootCurrent: 0008
#Timeout : 0 seconds
#BootOrder : 0008, 0003, 0004, 0001, 0002
#+Boot0008* rEFInd
I dicovered, that when you use in menuentry "FreeBSD 14.3" /EFI/freebsd/loader.env with "currdev=disk0p6:" system boots freebsd on nda0p6 and not nda0p5, which it does without loader.env in EFI/freebsd/
but if you want to use this within menuentry "FBSD nda0p6" with "currdev=disk0p6" in /EFI/FBSD6/loader.env, it will not be accepted.
I looked at pretty long refind.log files ( firefox to read utf-8), but loader.env is never mentioned. Is this used from loader.efi?

I tried also rodbooks info sites, but found it not so helpful for me and my english... felt like "too many characters.." ( "too may notes" - what an austrian Kaiser said to young mozart )


Thanks and Greetings, Anton
 
I looked at pretty long refind.log files ( firefox to read utf-8), but loader.env is never mentioned. Is this used from loader.efi?
Yes, it is used by loader.efi(8)
Rich (BB code):
   Additional Environment Variables
     loader.efi loads some extra variables early in startup from
     /efi/freebsd/loader.env from the EFI partition.  Only simple variables
     can be set here.  It can be useful to specify the root filesystem:

           rootdev=disk0s1a

but don't use loader.env.

Assuming all FreeBSD nda0p* partitions are UFS (not ZFS. That would require a different variable value naming), set in refind.conf "rootdev" instead of "currdev" in the "options" stanza. Some time ago I discovered that the environment variable "rootdev" is better suited in specifying the root file system in boot manager configurations.

Set "loader" of all FreeBSD menu entries to /efi/freebsd/loader.efi, no need to copy loader.efi in multiple /efi subdirectories, it wouldn't make any difference anyway.

Please pay attention to the colon at the end of the "options" "rootdev" value.

EDIT: I checked it in VirtualBox, apparently the colon is not strictly necessary.

/efi/refind/refind.conf
Rich (BB code):
timeout 10
log_level 3

menuentry "Windows 10" {
icon /EFI/refind/icons/os_win8.png
loader /EFI/Microsoft/Boot/bootmgfw.efi
}


menuentry "FreeBSD 14.3 on nda0p5" {
    icon /EFI/refind/icons/os_freebsd.png
    loader /EFI/freebsd/loader.efi
    options "rootdev=disk0p5:"
}

menuentry "FBSD nda0p6" {
    icon /EFI/refind/icons/freebsd40.png
    loader /EFI/freebsd/loader.efi
    options "rootdev=disk0p6:"
}

menuentry "FBSD nda0p8" {
    icon /EFI/refind/icons/freebsd40.png
    loader /EFI/freebsd/loader.efi
    options "rootdev=disk0p8:"
}

#Boot to FW : false
#BootCurrent: 0008
#Timeout : 0 seconds
#BootOrder : 0008, 0003, 0004, 0001, 0002
#+Boot0008* rEFInd
 
Back
Top