# Another UEFI related thread: How does bsdinstall create a UEFI partition?



## ColdfireMC (Oct 26, 2014)

This morning, I decided to install 10.1-RC3, to test UEFI boot. After the headache of dealing with my buggy Intel firmware, the holy CD booted in UEFI mode, everything went normal, but at the partition menu of bsdinstall the auto configuration option created an additional EFI partition in the target harddisk, instead of appending the FreeBSD UEFI bootloader (I don't know how to quote it), to the existing one in another hardisk. After all, everything went fine... So what's the problem? The problem is this extra EFI partition, my motherboard and its firmware are quite dumb, and I must select bootloaders every boot if I have more tan one if I want to boot a NON-Windows bootloader I don't know if rEFInd is capable to find EFI bootloaders on more tan one harddisk. I decided to install this UEFI bootloader by hand, but I can't find any document explaining that process, I only find GPT and protective MBR related documentation and old boot code creation.

So my questions are:


Why Auto Configuration makes an additional EFI partition for bootloader, instead to append it to the existing one (the most common behavior)?
How can I make an EFI partition, and install the UEFI bootloader by hand?


----------



## youngunix (Oct 27, 2014)

I've installed FreeBSD on two UEFI motherboards and never had any issues, actually, it boots just fine. What's so special about using a UEFI FreeBSD? And are you following this guide to do the install?
A normal guided partition should look like this (no additional partitions):


----------



## ColdfireMC (Oct 27, 2014)

youngunix said:


> I've installed FreeBSD on two UEFI motherboards and never had any issues, actually, it boots just fine. What's so special about using a UEFI FreeBSD? And are you following this guide to do the install?
> A normal guided partition should look like this (no additional partitions):


You are still using BIOS! Besides, that guide is related to create installation media, not a working UEFI layout.

Finally noticed that default behavior is like I said (weird) :Install EFI partition containing bootloader in the target hard disk, but if I delete this partition and commit, bsdinstall(8) will append bootloader to the existing partition at the "default" hard disk automatically (I have to confess that I made this with null faith) . So it's simple, but I still believe that UEFI documentation is somewhat like poor, and bsdinstall(8) still needs some fine tuning, also UEFI bootloader isn't publishing a "ID" saying something like "FreeBSD" to the UEFI Shell, my firmware only says "Internal UEFI Shell- Harddisk" (generic name for a UEFI bootloader on that motherboard, In fact, there are more than one entries with this name), other loaders put names (Windows, Fedora, Ubuntu...).

So problem does not exist, but still have those questions.


----------



## youngunix (Oct 31, 2014)

> You are still using BIOS!


 Are you telling me or asking if I'm using BIOS?



> Finally noticed that default behavior is like I said (weird) :Install EFI partition containing bootloader in the target hard disk, but if I delete this partition and commit, bsdinstall(8) will append bootloader to the existing partition at the "default" hard disk automatically (I have to confess that I made this with null faith) . So it's simple, but I still believe that UEFI documentation is somewhat like poor, and bsdinstall(8) still needs some fine tuning, also UEFI bootloader isn't publishing a "ID" saying something like "FreeBSD" to the UEFI Shell, my firmware only says "Internal UEFI Shell- Harddisk" (generic name for a UEFI bootloader on that motherboard, In fact, there are more than one entries with this name), other loaders put names (Windows, Fedora, Ubuntu...).
> 
> So problem does not exist, but still have those questions.


Well, they just managed to get it working. A few months ago, running FreeBSD on a UEFI hardware caused some issues at boot. So it still a work-in-progress, have faith.


----------



## SirDice (Oct 31, 2014)

youngunix said:


> Are you telling me or asking if I'm using BIOS?


Telling you. The setup you have uses legacy boot, not UEFI boot.


----------



## youngunix (Nov 1, 2014)

SirDice said:


> Telling you. The setup you have uses legacy boot, not UEFI boot.


So, in order to use a UEFI boot, I have to run the same steps as ColdfireMC? And is the UEFI installation instruction included in the handbook? I'm not seeing any except https://wiki.freebsd.org/UEFI.


----------



## reub2000 (Nov 1, 2014)

youngunix said:


> So, in order to use a UEFI boot, I have to run the same steps as ColdfireMC? And is the UEFI installation instruction included in the handbook? I'm not seeing any except https://wiki.freebsd.org/UEFI.


Of course the instructions aren't included in the handbook, it hasn't been included in a release yet.

Also, in order to use EFI the first partition needs to be a special FAT partition.


----------



## youngunix (Nov 2, 2014)

reub2000 said:


> Of course the instructions aren't included in the handbook, it hasn't been included in a release yet.
> 
> Also, in order to use EFI the first partition needs to be a special FAT partition.


Thanks for the clarifications, my reasons exactly to not test UEFI since FreeBSD still hasn't gotten along with it yet.


----------



## ColdfireMC (Nov 8, 2014)

youngunix said:


> Thanks for the clarifications, my reasons exactly to not test UEFI since FreeBSD still hasn't gotten along with it yet.


ftp://ftp.freebsd.org/pub/FreeBSD/r...ES/10.1/FreeBSD-10.1-RC3-amd64-uefi-disc1.iso


----------

