Greetings all,
I seem to have a problem as per the subject line. Since I need to install the bootcode on a USB flash drive, I have the following code running from a shell:
The first problem is an error:
The second is similar:
It seems that I am following wiki:
(1) https://wiki.freebsd.org/UEFI
(2) https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
I do not believe that anything is misspelled, so I do not know what the problem may be.
Kindest regards,
M
I seem to have a problem as per the subject line. Since I need to install the bootcode on a USB flash drive, I have the following code running from a shell:
Code:
#!/bin/sh
# Instal bootloader only on flash drive (da*)
# Set boot disk:
DISK="da0"
echo "Destroying old partitions on the destination drive"
gpart destroy -F $DISK
# Create the gpt structure on the drive for both BIOS and UEFI boot.
echo "Partitioning the destination drive using gpt"
gpart create -s gpt $DISK
gpart add -t freebsd-boot -l gpboot -b 40 -s 512K $DISK
echo "Writing BIOS bootcode"
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 $DISK
gpart add -t efi -l efiboot -a 4k -s 200M $DISK
# Format the efi partition to hold the the small MS-DOS efifilesystem for UEFI bootcode.
echo "Preparing the efi partition"
newfs_msdos -F 32 -c 1 $DISKp2
mount -t msdosfs $DISKp2 /tm
mkdir -p /tmp/EFI/BOOT
# Copy the FreeBSD /boot/loader.efi bootcode file into the efi filesystem.
echo "Copying loader.efi"
cp /boot/loader.efi /tmp/EFI/BOOT/BOOTx64.efi
umount /mnt
echo "Script finished"
The first problem is an error:
Code:
gpart: /boot/gptzfsboot: Device not configured
The second is similar:
Code:
cp /boot/loader.efi: Device not configured
It seems that I am following wiki:
(1) https://wiki.freebsd.org/UEFI
(2) https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
I do not believe that anything is misspelled, so I do not know what the problem may be.
Kindest regards,
M