[arch-releng] [DRAFT][RFC][PATCH][archiso] Add UEFI boot support via Linux >= 3.3 EFI boot stub.

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sun Apr 1 13:48:25 EDT 2012


On 03/20/2012 12:59 PM, Gerardo Exequiel Pozzi wrote:
> Support is only added to x86_64. This only works via (U)EFI shell. Boot with:
>
> fs0:\EFI\linux\vmlinuz.efi archisolabel=ARCH_201203 initrd=\EFI\linux\archiso.img
>
> There are plans to support command line options via a config file (not yet in linux-3.3),
> in such case vmlinuz.efi can be renamed to bootia64.efi and placed to \EFI\boot to automatic boot.
>
>

I only pushed to master the mkarchiso part (is optionally):

+    # If exists, add an EFI "El Torito" boot image (FAT filesystem) to 
ISO-9660 image.
+    if [[ -f "${work_dir}/iso/EFI/archiso/efiboot.img" ]]; then
+        _iso_efi_boot_args="--efi-boot EFI/archiso/efiboot.img"
+    fi

Such .img acts as ESP (EFI System Partition), so you can push anything 
inside for EFI boot.


(PENDING)
Now remains decision about what will go to "efiboot.img" and what of 
x86_64 isos will be EFI enabled (configs/releng/build.sh)


+# Prepare EFI "El Torito" boot image (using Linux >= 3.3 EFI boot stub)
+make_boot_efi() {
+    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
+        if [[ ${arch} == "x86_64" ]]; then
+            mkdir -p ${work_dir}/iso/EFI/archiso
+            dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M 
count=0
+            mkfs.vfat ${work_dir}/iso/EFI/archiso/efiboot.img
+            mkdir -p ${work_dir}/efiboot
+            mount ${work_dir}/iso/EFI/archiso/efiboot.img 
${work_dir}/efiboot
+            mkdir -p ${work_dir}/efiboot/EFI/archiso
+            cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz 
${work_dir}/efiboot/EFI/archiso/vmlinuz.efi
+            cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img 
${work_dir}/efiboot/EFI/archiso/archiso.img
+            # There are plans to support command line options via a 
config file (not yet in Linux-3.3)
+            # echo "archisolabel=${iso_label} 
initrd=\EFI\archiso\archiso.img" | iconv -f ascii -t ucs2 > 
${work_dir}/efiboot/EFI/archiso/vmlinuz.conf
+            umount ${work_dir}/efiboot
+        fi
+        : > ${work_dir}/build.${FUNCNAME}
+    fi
+}

This increment final ISO in 20MiB.


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



More information about the arch-releng mailing list