2024年4月5日にリリースされたOpenBSD 7.5では、amd64プラットフォームでEFIでのCD起動が、arm64プラットフォームでは、ISOイメージによる起動がサポートされました。
この二つの新機能を河豚板 7.5でも実装した方法について報告します。
目次
2024年4月5日にリリースされたOpenBSD 7.5では、ライブ・システムに関連した2つの機能が追加された。
- Various bugfixes and tweaks in userland: ... - Added mkhybrid(8) '-e' (-eltorito-boot-efi) option for writing an EFI eltorito boot image, in addition to or instead of the x86 boot image, to the output file. ... - Installer, upgrade and bootloader improvements: ... - Make the amd64 cdXX.iso and installXX.iso CD images bootable in EFI mode (by creating an EFI system partition containing the EFI boot loaders to be installed as an El Torito boot image).
- Installer, upgrade and bootloader improvements: ... - Added CD install images to arm64.
どこが変っているか見てみる:
Revision 1.47 / (download) - annotate - [select for diffs], Fri Dec 15 06:03:00 2023 UTC (5 months ago) by jmatthew Branch: MAIN CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD Changes since 1.46: +15 -4 lines Diff to previous 1.46 (colored) For amd64 cdXX.iso and installXX.iso, create an EFI system partition image containing the EFI boot loaders and install it as an El Torito boot image, making the install CDs bootable in EFI mode. "looks great" deraadt@ ok mlarkin@
-${CDROM}: ${BASE} ${XBASE} +${EFICDBOOT}: ${EFIBOOT} + rm -rf ${.OBJDIR}/eficdboot-dir + mkdir -p ${.OBJDIR}/eficdboot-dir/efi/boot + cp ${EFIBOOT} ${.OBJDIR}/eficdboot-dir/efi/boot + makefs -t msdos -o create_size=${EFICDBOOTSIZE} ${EFICDBOOT} \ + ${.OBJDIR}/eficdboot-dir + +${CDROM}: ${BASE} ${XBASE} ${EFICDBOOT} (略) mkhybrid -a -R -T -L -l -d -D -N -o ${.OBJDIR}/${CDROM} \ -A "OpenBSD ${OSREV} ${MACHINE} Install CD" \ @@ -77,14 +87,15 @@ -p "Theo de Raadt <deraadt@openbsd.org>" \ -V "OpenBSD/${MACHINE} ${OSREV} Install CD" \ -b ${OSREV}/${MACHINE}/cdbr -c ${OSREV}/${MACHINE}/boot.catalog \ + -e ${OSREV}/${MACHINE}/${EFICDBOOT} \ ${.OBJDIR}/cd-dir
#ref(): File not found: "addeficdboot.png" at page "tmp"
#ref(): File not found: "fi-remaster_eficdboot.png" at page "tmp"
arm64のビルドフロー
#ref(): File not found: "fiflow_arm64.png" at page "tmp"
OpenBSDでの変更部分
Revision 1.8, Thu Oct 26 14:27:01 2023 UTC (6 months, 3 weeks ago) by deraadt Branch: MAIN Changes since 1.7: +40 -3 lines construct EFI bootable cdXX.iso and instalXX.iso files変更部分 (抜粋)
+cdbr: ${RELDIR}/BOOTAA64.EFI + dd if=/dev/zero of=cdbr bs=512 count=5760 + vnconfig -v cdbr > vnd + fdisk -iy -b "5744@16:c" `cat vnd` >/dev/null + newfs -t msdos /dev/r`cat vnd`i + mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} + mkdir -p ${MOUNT_POINT}/efi/boot + cp ${RELDIR}/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi + echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + (略) +${CDROM}: ${BASE} ${XBASE} cdbr + rm -rf ${.OBJDIR}/cd-dir + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + mkdir -p ${.OBJDIR}/cd-dir/etc + echo "set image /${OSREV}/${MACHINE}/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf + + cp -p ${BASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + cp -p ${XBASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + + cat ${RELDIR}/SHA256 ${RELXDIR}/SHA256 > \ + ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/SHA256 + # XXX no SHA256.sig + + cp -p ${.OBJDIR}/cdbr ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + + mkhybrid -a -R -T -L -l -d -D -N -o ${.OBJDIR}/${CDROM} \ + -A "OpenBSD ${OSREV} ${MACHINE} Install CD" \ + -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ + -p "Theo de Raadt <deraadt@openbsd.org>" \ + -V "OpenBSD/${MACHINE} ${OSREV} Install CD" \ + -b ${OSREV}/${MACHINE}/cdbr -c ${OSREV}/${MACHINE}/boot.catalog \ + ${.OBJDIR}/cd-dir
リマスター時の問題
#ref(): File not found: "fi-remaster_arm64.png" at page "tmp"
秘伝のタレ
LiveCD flow LiveUSB flow
Recycle