Solved Transfer existing drive from BIOS motherboard to UEFI motherboard

Emrion

Active Member

Reaction score: 35
Messages: 171

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

Well-Known Member

Reaction score: 199
Messages: 405

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

Well-Known Member

Reaction score: 199
Messages: 405

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

Active Member

Reaction score: 35
Messages: 171

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.
 
OP
OP
Sevendogsbsd

Sevendogsbsd

Well-Known Member

Reaction score: 199
Messages: 405

Not sure - this box only boots FreeBSD and the efi partition is on the same disk as the system partition. All I know is it works :)
 

olli@

Well-Known Member
Developer

Reaction score: 274
Messages: 315

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.
 
OP
OP
Sevendogsbsd

Sevendogsbsd

Well-Known Member

Reaction score: 199
Messages: 405

Aaaarrrggghh. So, should just be a matter of copying the appropriate file to the efi partition, eh?
 

olli@

Well-Known Member
Developer

Reaction score: 274
Messages: 315

I think in most “standard” cases, both files should work fine. If you currently have either one and it works for you, there is no need to change.
 
OP
OP
Sevendogsbsd

Sevendogsbsd

Well-Known Member

Reaction score: 199
Messages: 405

So interestingly enough, I was having a minor issue where my display would go blank for 3 or 4 seconds and then come back. Not sure if related, but I went ahead and changed from /boot/loader.efi to /boot/boot1.efi as an experiment. Was an easy change so will run things for a few days to see if it makes a difference. Probably not related to the graphics issue but we'll see.
 
Top