Need help for stupid: restotre efi boot

Harry Schmalzbauer freebsd at omnilan.de
Fri Mar 30 18:15:42 UTC 2018


 Bezüglich Alex V. Petrov's Nachricht vom 29.03.2018 22:26 (localtime):
> How restore efi boot, after command:
> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0

Hmm, I'm not sure I understand your problem, but I guess ada0p1 might
have been your "efi" partition before you corrupted it with the command
you quoted.
If so, just do:
newfs_msdos /dev/ada0p1
mount_msdosfs /dev/ada0p1 /mnt
mkdir -p /mnt/EFI/BOOT
cp /boot/boot1.efi /mnt/EFI/BOOT/BOOTx64.efi
echo "BOOTx64.efi" > /mnt/EFI/BOOT/startup.nsh

The latter is optinal for most UEFI implementations, likewise is the
partition type (which should be "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b"
– gpart knows it under the alias "efi").
I'd suggest you check with "gaprt show ada0" and "gpart modify -t efi -i
1 ada0" before the newfs!

Hope this helps,

-harry



More information about the freebsd-fs mailing list