Solved Transfer existing drive from BIOS motherboard to UEFI motherboard

Emrion

Member

Thanks: 6
Messages: 43

#26
I read uefi(8) and it seems you're right. But the problem is: that works with loader.efi. I did it several times.
Concerning my trial with boot1.efi maybe I typed something wrong. I will try again.

I should read more and you should test more. Anyway, I don't want to flood this thread anymore.
 
OP
OP
Sevendogsbsd

Sevendogsbsd

Member

Thanks: 6
Messages: 69

#27
This is all very useful for me since I am going to try convert my install - was going to use gparted to resize "/" smaller, then create an efi partition, copy in the appropriate file, but gparted does not support UFS resizing. I may just reinstall the whole OS - Maybe it would be a good exercise - unfortunately I did not create a separate /usr partition so I have dumped a package install list in anticipation of reinstalling. You all aren't flooding the thread, I am reading all of this and absorbing :)
 
OP
OP
Sevendogsbsd

Sevendogsbsd

Member

Thanks: 6
Messages: 69

#28
So, to close this out finally...I did complete reinstall of the system and some updated partitioning (for other reasons) at the same time. Bottom line, during the install I created an /efi partition, set it to type "efi", 200MB, based on someone's advice here; name escapes me, finished the install, dropped to a shell, then followed the instructions here: UEFI FreeBSD Wiki. Bounced the machine, changed the UEFI/BIOS settings to UEFI only, and viola`, she boots!

I thought about leaving it alone, but I wanted to future proof. Thanks for all of the info, appreciate it.
 

Emrion

Member

Thanks: 6
Messages: 43

#29
And the instructions in UEFI FreeBSD Wiki advise to copy loader.efi, not boot1.efi. This is where I took my own method (I gave this link in my second post). Nevertheless, olli@ was right, the official method speak of boot1.efi. I tried again with this last file and it works. Reading quickly the respective codes, I can't figure out why both files are actually working. Maybe loader.efi works only if the efi partition (ESP) is on the same disk than the system partition?

Anyway, glad you eventually got what you wanted.
 

olli@

Member
Developer

Thanks: 26
Messages: 45

#31
And the instructions in UEFI FreeBSD Wiki advise to copy loader.efi, not boot1.efi. This is where I took my own method (I gave this link in my second post). Nevertheless, olli@ was right, the official method speak of boot1.efi. I tried again with this last file and it works. Reading quickly the respective codes, I can't figure out why both files are actually working. Maybe loader.efi works only if the efi partition (ESP) is on the same disk than the system partition?
Actually, I did notice the conflict between the Wiki entry (loader.efi) and the rest of the documentation (boot1.efi), so I researched how the actual build system in /usr/src creates the efifat image. This is done in the boot1.efifat target in stand/efi/boot1/Makefile – and that one uses boot1.efi, so I assumed this would be the correct way to do it. And in fact it does work fine, so I used boot1.efi whenever I had to create an ESP entry for FreeBSD so far.

However, this forum thread made me perform some further research. I came across a few interesting documents:
A post by Warner Losh in the arch@ mailing list
A document proposing a FreeBSD boot protocol
To summarize: boot1.efi apparently was only a temporary stop-gap, until the standard loader had usable EFI support. Actually it was planned to remove boot1.efi for 12.0 release, but that didn't happen because of a few minor edge cases that loader.efi doesn't handle well enough yet. Some commit messages indicate that these issues are related to console settings, reading command line arguments and boot.config (r335349, r336270), and determining currdev (r332416). Some of these have been fixed in HEAD meanwhile.
 
Top