-
Notifications
You must be signed in to change notification settings - Fork 410
doc(ZFS): update UEFI loader instructions for 13+ #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1331,15 +1331,19 @@ For legacy boot using GPT, use the following command: | |
| # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 | ||
| .... | ||
|
|
||
| For systems using EFI to boot, execute the following command: | ||
| For systems using EFI to boot, execute the following commands: | ||
|
|
||
| [source,shell] | ||
| .... | ||
| # gpart bootcode -p /boot/boot1.efifat -i 1 ada1 | ||
| # umount /boot/efi | ||
| # mount -t msdosfs /dev/ada1p1 /boot/efi | ||
| # cp /boot/loader.efi /boot/efi/efi/boot/boot*.efi | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The '*' here doesn't make sense.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My newer devices present at export BOOT_DEVICE="/dev/{daN | ndaN | adaN}" # CUSTOMIZE THIS!
mount -t msdosfs "$BOOT_DEVICE" /boot/efiThe copy command with the # ls /boot/efi/efi/boot/boot*.efi
/boot/efi/efi/boot/bootaa64.efi # uname -p = aarch64
/boot/efi/efi/boot/bootx64.efi # uname -p = amd64
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there was a reasonable chance of it getting merged, I'd update this PR with this: # Common EFI: /dev/nda0 (NVMe), /dev/ada0 (SATA), /dev/da0 (USB/SAS/SCSI)
# Note: For mirrored boot drives, update BOTH disks.
# export EFI_PARTITION="/dev/{ndaN | daN | adaN}" # CUSTOMIZE THIS!
# mount | grep -q /boot/efi && umount /boot/efi
# mount -t msdosfs "$EFI_PARTITION" /boot/efi
# cp /boot/loader.efi /boot/efi/efi/boot/boot*.efi
# cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
# umount /boot/efi
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is more robust, and compared the more static commands above:
# discover the EFI name for this systems CPU architecture
export ARCH=$(case "$(uname -p)" in aarch64) echo "aa64" ;; amd64) echo "x64" ;; *) echo "$(uname -p)" ;; esac)
for _efi_part in $(gpart show -p | grep ' efi ' | awk '{ print $3 }')
do
echo; echo " updating $ARCH EFI boot loader in $_efi_part"
mount | grep -q 'on /boot/efi ' && umount /boot/efi
mount -t msdosfs "/dev/$_efi_part" /boot/efi
mkdir -p /boot/efi/efi/boot /boot/efi/efi/freebsd
cp /boot/loader.efi "/boot/efi/efi/boot/boot${ARCH}.efi"
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi
done
Sample Outputamd64 (Intel) updating x64 EFI boot loader in mmcsd0p1
mount | grep -q /boot/efi && umount /boot/efi
mount -t msdosfs /dev/mmcsd0p1 /boot/efi
cp /boot/loader.efi /boot/efi/efi/boot/bootx64.efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi
updating x64 EFI boot loader in nda0p1
mount | grep -q /boot/efi && umount /boot/efi
mount -t msdosfs /dev/nda0p1 /boot/efi
cp /boot/loader.efi /boot/efi/efi/boot/bootx64.efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi
updating x64 EFI boot loader in nda1p1
mount | grep -q /boot/efi && umount /boot/efi
mount -t msdosfs /dev/nda1p1 /boot/efi
cp /boot/loader.efi /boot/efi/efi/boot/bootx64.efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi
updating x64 EFI boot loader in nda2p1
mount | grep -q /boot/efi && umount /boot/efi
mount -t msdosfs /dev/nda2p1 /boot/efi
cp /boot/loader.efi /boot/efi/efi/boot/bootx64.efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efiARM 64 updating aa64 EFI boot loader in nda0p1
mount | grep -q /boot/efi && umount /boot/efi
mount -t msdosfs /dev/nda0p1 /boot/efi
cp /boot/loader.efi /boot/efi/efi/boot/bootaa64.efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi |
||
| # cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi | ||
| # umount /boot/efi | ||
| .... | ||
|
|
||
| Apply the bootcode to all bootable disks in the pool. | ||
| See man:gpart[8] for more information. | ||
| See man:gpart[8] and man:loader.efi[8] for more information. | ||
| ==== | ||
|
|
||
| [[zfs-zpool-history]] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.