Solved how to add freeBSD to efibootmgr

I've got 2 installs of freeBSD one each on separate SSDs with there efi on that same ssd. What command do I have to run to get partition/slice information this does not have ldblk

the <-- x install shows where the loader.efi file lives on both OSes
Code:
BSD13:~$ gpart show
=>        34  4000797293  nvd0  GPT  (1.9T)
          34        2014        - free -  (1.0M)
        2048     1083392     1  ms-recovery  (529M)
     1085440      204800     2  efi  (100M) <- first install
     1290240       32768     3  efi  (16M)
     1323008   455708672     4  ms-basic-data  (217G)
   457031680   105652224     6  linux-data  (50G)
   562683904   432504832     7  linux-data  (206G)
   995188736   102400000     9  linux-data  (49G)
  1097588736   239075328     5  freebsd-ufs  (114G)
  1336664064     8388608     8  freebsd-swap  (4.0G)
  1345052672      344064        - free -  (168M)
  1345396736  2237601792    10  !44479540-f297-41b2-9af7-d131d5f0458a  (1.0T)
  3582998528   311302144    12  !44479540-f297-41b2-9af7-d131d5f0458a  (148G)
  3894300672   106496000    11  ms-basic-data  (51G)
  4000796672         655        - free -  (328K)

=>        34  3907029101  ada0  GPT  (1.8T)
          34        2014        - free -  (1.0M)
        2048  3412809728     1  !44479540-f297-41b2-9af7-d131d5f0458a  (1.6T)
  3412811776    24578048     8  linux-data  (12G)
  3437389824      532480     5  efi  (260M) <-- second install
  3437922304   202891264     6  freebsd-ufs  (97G)
  3640813568     7520256     7  freebsd-swap  (3.6G)
  3648333824    28585984     4  !44479540-f297-41b2-9af7-d131d5f0458a  (14G)
  3676919808    70311936     2  linux-data  (34G)
  3747231744   159797248     3  !44479540-f297-41b2-9af7-d131d5f0458a  (76G)
  3907028992         143        - free -  (72K)


Code:
userx@FBSD13:~$ sudo efibootmgr
Boot to FW : false
BootCurrent: 0000
Timeout    : 0 seconds
BootOrder  : 0000, 0006, 0005, 0004, 0003, 0002, 0001, 0012, 0013, 0014, 0015, 0016, 0017, 0018, 0019
+Boot0000* ubuntu
 Boot0006* slackware-15.0+
 Boot0005* void
 Boot0004* mx
 Boot0003* slackware-15.0
 Boot0002* Windows Boot Manager
 Boot0001* rEFInd Boot Manager
 Boot0012* NVMe: SPCC M.2 PCIe SSD                      
 Boot0013* ATA HDD: Samsung SSD 870 EVO 2TB                 
 Boot0014* ATAPI CD:
 Boot0015* USB HDD:
 Boot0016* USB CD:
 Boot0017* PCI LAN:
 Boot0018* USB LAN:
 Boot0019* USB FDD:
userx@FBSD13:~$ sudo efibootmgr -v
Boot to FW : false
BootCurrent: 0000
Timeout    : 0 seconds
BootOrder  : 0000, 0006, 0005, 0004, 0003, 0002, 0001, 0012, 0013, 0014, 0015, 0016, 0017, 0018, 0019
+Boot0000* ubuntu HD(2,GPT,b73c0a35-5728-4ed7-8784-302ed6eee5a8,0x109000,0x32000)/File(\EFI\ubuntu\shimx64.efi)
                     nvd0p2:/EFI/ubuntu/shimx64.efi (null)
 Boot0006* slackware-15.0+ HD(2,GPT,b73c0a35-5728-4ed7-8784-302ed6eee5a8,0x109000,0x32000)/File(\EFI\slackware-15.0+\grubx64.efi)
                              nvd0p2:/EFI/slackware-15.0+/grubx64.efi (null)
 Boot0005* void HD(2,GPT,b73c0a35-5728-4ed7-8784-302ed6eee5a8,0x109000,0x32000)/File(\EFI\void\grubx64.efi)
                   nvd0p2:/EFI/void/grubx64.efi (null)
 Boot0004* mx HD(2,GPT,b73c0a35-5728-4ed7-8784-302ed6eee5a8,0x109000,0x32000)/File(\EFI\mx\grubx64.efi)
                 nvd0p2:/EFI/mx/grubx64.efi (null)
 Boot0003* slackware-15.0 HD(2,GPT,b73c0a35-5728-4ed7-8784-302ed6eee5a8,0x109000,0x32000)/File(\EFI\slackware-15.0\grubx64.efi)
                             nvd0p2:/EFI/slackware-15.0/grubx64.efi (null)
 Boot0002* Windows Boot Manager HD(2,GPT,b73c0a35-5728-4ed7-8784-302ed6eee5a8,0x109000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
                                   nvd0p2:/EFI/Microsoft/Boot/bootmgfw.efi (null)
 Boot0001* rEFInd Boot Manager HD(2,GPT,b73c0a35-5728-4ed7-8784-302ed6eee5a8,0x109000,0x32000)/File(\EFI\refind\refind_x64.efi)
                                  nvd0p2:/EFI/refind/refind_x64.efi (null)
 Boot0012* NVMe: SPCC M.2 PCIe SSD                       PciRoot(0x0)/Pci(0x1,0x7)/Pci(0x0,0x0)/NVMe(0x1,30-39-13-11-21-a7-79-64)
 Boot0013* ATA HDD: Samsung SSD 870 EVO 2TB                  PciRoot(0x0)/Pci(0x8,0x2)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)
 Boot0014* ATAPI CD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
 Boot0015* USB HDD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
 Boot0016* USB CD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
 Boot0017* PCI LAN: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
 Boot0018* USB LAN: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,e854bca4cae7704ca322b00da0376322)
 Boot0019* USB FDD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)


Unreferenced Variables:
 Boot0011  Boot Menu FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
 Boot0010  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
userx@FBSD13:~$ ls /boot/efi/EFI
boot    freebsd
userx@FBSD13:~$ ls /boot/efi/EFI/boot
bootx64.efi
userx@FBSD13:~$ ls /boot/efi/EFI/freebsd
loader.efi
 
there is an example in the efibootmgr(8) man page:
# efibootmgr -a -c -l /mnt/EFI/freebsd/loader.efi -L FreeBSD-11
this will create a boot entry called "FreeBSD-11" using the loader currently mounted at /mnt/EFI/freebsd/loader.efi. Don't worry, efibootmgr knows how to translate that path into something that will always work. In general steps:
1) mount the EFI partition you want somewhere (if not mounted already)
2) run the efibootmgr command to create a new boot variable
3) unmount the EFI partition if you mounted it in step 1.
repeat as many times as needed. Enjoy.
 
there is an example in the efibootmgr(8) man page:
# efibootmgr -a -c -l /mnt/EFI/freebsd/loader.efi -L FreeBSD-11
this will create a boot entry called "FreeBSD-11" using the loader currently mounted at /mnt/EFI/freebsd/loader.efi. Don't worry, efibootmgr knows how to translate that path into something that will always work. In general steps:
1) mount the EFI partition you want somewhere (if not mounted already)
2) run the efibootmgr command to create a new boot variable
3) unmount the EFI partition if you mounted it in step 1.
repeat as many times as needed. Enjoy.
so I can be in the system and just -l /boot/efi/EFI/freebsd/loader.efi then boot into my other one and do the same w/different name to prevent conflict

I'll give it a shot and see what happens,

Code:
userx@FBSD13:~$ sudo efibootmgr -a -c -l  /boot/efi/efi/freebsd/loader.efi -L "FreeBSD 2"
Code:
sudo efibootmgr -v
Boot to FW : false
BootCurrent: 0001
Timeout    : 0 seconds
BootOrder  : 0007, 0001, 0006, 0005, 0004, 0003, 0002, 0000, 0012, 0013, 0014, 0015, 0016, 0017, 0018, 0019
 Boot0007* FreeBSD 2 HD(5,GPT,057eb514-c9b6-11ed-8382-9b9864bd6bdf,0xcce26800,0x82000)/File(\efi\freebsd\loader.efi)
                        ada0p5:/efi/freebsd/loader.efi /boot/efi//efi/freebsd/loader.efi
let be reboot and see if that catches,
thanks!
 
Back
Top