Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Mar 2019 20:10:01 +0100
From:      Matthias Oestreicher <matthias@smormegpa.no>
To:        freebsd-questions@freebsd.org
Subject:   Re: Failed to load '/boot/loader.efi'
Message-ID:  <6737c29e1674ce03a3c253a7c92cdc4e07686536.camel@smormegpa.no>
In-Reply-To: <a37066b2-c2ac-8d15-a531-8be43161e442@gjunka.com>
References:  <a37066b2-c2ac-8d15-a531-8be43161e442@gjunka.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Am Samstag, den 02.03.2019, 21:07 +0000 schrieb Grzegorz Junka:
> Hello,
> 
> I am trying to configure UEFI loader to boot FreeBSD 12. The UEFI
> shell 
> prints the following:
> 
> > > FreeBSD EFI boot block
> 
>    Loader path: /boot/loader.efi
> 
>    Initializing modules: ZFS UFS
>    Load Path: \efi\boot\BOOTx64.efi
>    Load Device:
> PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x2)/Pci(0x4,0x0)/Pci(0x0,0x0)/NVMe
> (0x1,8D-7F-B1-71-55-38-25-00)/HD(1,GPT,F4EC62C3-B000-4A60-AAA6-
> 7079751A497D,0x800,0x64000)
>    BootCurrent: 0003
>    BootOrder: 0000 0005 0006 0003[*]
>    Probing 12 block devices......+...*.... done
>      ZFS found the following pools: tank7
>      UFS found no partitions
> Failed to load '/boot/loader.efi'
> panic: No bootable partions found!
> 
> I can import the ZFS pool fine when booting a memstick livefs. Why 
> loader.efi isn't importing it?
> 
> efibootmgr -v gives the following
> 
> BootCurrent: 0005
> Timeout : 5 seconds.
> BootOrder: 0000, 0005, 0006, 0003
>    Boot0* Windows Boot Manager 
> HD(5,GPT,5804e565-b8f6-4f47-9314-
> 9eb4cfb79697,0x1d55e000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EF
> I) 
> nvd1p5:/EFI/MICROSOFT/BOOT/BOOTMGFW.EFI (null)
> * Boot5* UEFI OS 
> HD(1,GPT,f4ec62c3-b000-4a60-aaa6-
> 7079751a497d,0x800,0x64000)/File(\EFI\BOOT\BOOTX64.EFI) 
> nvd1p1:/EFI/BOOT/BOOTX64.EFI (null)
>    Boot6* Hard Drive BBS(HD,,0x0)
>    Boot3 UEFI: Built-in EFI Shell 
> VenMedia(5023b95c-db26-429b-a648-bd47664c8012)
> 
> I've manually created /EFI/BOOT/BOOTx64.EFI by copying
> /boot/boot1.efi 
> from the livefs. The content of /EFI is just one file:
> 
> EFI/Boot/bootx64.efi
> 
> Can I somehow install the /boot/boot1.efifat manually to try to make
> it 
> working? I am installing FreeBSD 12 by partitioning disk manually so 
> bsdsysinstall doesn't run, and it seems there were some changes
> around 
> the EFI partition recently, e.g. support for /efi/freebsd/loader.efi.
> 
> Thanks
> 
> GrzegorzJ

Hei Grzegorz,

Are you trying to dual boot with windows?

If not and you are just trying to manually install FreeBSD and want to
boot ZFS filesystem via UEFI, then you have to create an EFI partition
and copy the EFI bootcode from /boot/boot1.efi onto it.

The EFI partition can be anywhere on the disk, like first, last or in
the middle somewhere. You need 200M of free space. If you are out of
free space, I usually just shrink the swap partition to get 200M of
free space. Note that to boot UEFI, a GPT partitioning scheme is
required. MBR scheme does not work.

Disclaimer: Caution is required when installing bootcode, you can
easily wipe your precious data, so be careful and doublecheck every
command!



If you already have created a pool and no space is left of your ZFS
drive, please post the output from:

% gpart show <your zfs disk>

and we'll see where we can steal some space for the EFI partition.



In case you have an EMPTY disk (e.g. /dev/ada0) or a disk you want to
WIPE use the following commands to install EFI bootcode and then go on
with creating a ZFS partition and pool, etc...
DO NOT RUN THEM IF YOU ALREADY HAVE IMPORTANT DATA ON YOUR DISK.

# gpart destroy -F ada0
# gpart create -s gpt ada0
# gpart add -t efi -s 200m ada0
# gpart bootcode -p /boot/boot1.efifat ada0


Regards
Matthias
> 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe@freebsd.org"







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6737c29e1674ce03a3c253a7c92cdc4e07686536.camel>