# Broken EFI partition



## nvaz (Dec 29, 2017)

Hi guys,
ok, I f*cked it up and accidentally deleted whatever there was inside the efi partition (stupid story, don't even ask), so now my system won't boot, obviously.
Is there any way I can just reinstall or write to that partition whatever data EFI needs to have in there? I'm reallly trying to avoid reinstalling everything again.

Hope you can help


----------



## Maelstorm (Dec 29, 2017)

You didn't give the layout of your system, so it's kinda hard to tell what it was that may have been deleted.  If you deleted the partition which has /boot then you may have to do a full reinstall.  We need more information.

EDIT:

I don't have a FreeBSD box that is UEFI, but I found this page in the wiki that might help you.

https://wiki.freebsd.org/UEFI


----------



## nvaz (Dec 29, 2017)

Hi,
the partition per se is still there, I just accidentally deleted its contents when rm-ing other stuff. I will give it a try to the link and see if I can recreate the partition.
In case I had to install everything again, is there any way to skip certain partitions when manual partitioning your disk? I couldn't find a way to tell the installer not to format my home partition.


----------



## ondra_knezour (Dec 29, 2017)

You shall be able to either dd the /boot/boot1.efifat image to your EFI partition or mount it using mdconfig(8) and copy what you need.


----------



## nvaz (Dec 29, 2017)

Hi guys,
A simple dd fixed the problem! Had I known it was that damn easy yesterday 
Thanks everyone for your answers.

PS: Yeah, I know UEFI is not that popular amongst BSD's, but honestly I haven't had any problems with it at all, and this one doesn't really count since it was my fault.


----------

