summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst1
-rw-r--r--configs/baseline/grub/grub.cfg29
-rw-r--r--configs/baseline/profiledef.sh4
-rw-r--r--configs/releng/efiboot/loader/entries/01-parabolaiso-x86_64-linux-libre.conf9
-rw-r--r--configs/releng/efiboot/loader/entries/02-parabolaiso-x86_64-speech-linux-libre.conf9
-rw-r--r--configs/releng/efiboot/loader/entries/03-parabolaiso-x86_64-ram-linux-libre.conf9
-rw-r--r--configs/releng/efiboot/loader/entries/04-parabolaiso-x86_64-ram-speech-linux-libre.conf5
-rw-r--r--configs/releng/efiboot/loader/loader.conf1
-rw-r--r--configs/releng/grub/grub.cfg46
-rw-r--r--configs/releng/packages.both2
-rw-r--r--configs/releng/profiledef.sh4
-rw-r--r--docs/README.profile.rst11
-rwxr-xr-xparabolaiso/mkparabolaiso207
13 files changed, 273 insertions, 64 deletions
diff --git a/README.rst b/README.rst
index e8f782e..6415af4 100644
--- a/README.rst
+++ b/README.rst
@@ -18,6 +18,7 @@ The following packages need to be installed to be able to create an image with t
* e2fsprogs
* erofs-utils (optional)
* findutils
+* grub
* gzip
* libarchive
* libisoburn
diff --git a/configs/baseline/grub/grub.cfg b/configs/baseline/grub/grub.cfg
new file mode 100644
index 0000000..3d0234a
--- /dev/null
+++ b/configs/baseline/grub/grub.cfg
@@ -0,0 +1,29 @@
+insmod part_gpt
+insmod part_msdos
+insmod fat
+insmod iso9660
+
+insmod all_video
+
+insmod font
+
+if loadfont "${prefix}/fonts/unicode.pf2" ; then
+ insmod gfxterm
+ set gfxmode="auto"
+ terminal_input console
+ terminal_output gfxterm
+fi
+
+menuentry "Parabola GNU/Linux-libre (x86_64, UEFI)" {
+ set gfxpayload=keep
+ search --no-floppy --set=root --label %PARABOLAISO_LABEL%
+ linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%
+ initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+}
+
+menuentry "Parabola GNU/Linux-libre (x86_64, UEFI) Copy to RAM" {
+ set gfxpayload=keep
+ search --no-floppy --set=root --label %PARABOLAISO_LABEL%
+ linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL% copytoram
+ initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+}
diff --git a/configs/baseline/profiledef.sh b/configs/baseline/profiledef.sh
index 19b003a..95c1364 100644
--- a/configs/baseline/profiledef.sh
+++ b/configs/baseline/profiledef.sh
@@ -8,7 +8,9 @@ iso_application="Parabola GNU/Linux-libre baseline"
iso_version="$(date +%Y.%m.%d)"
install_dir="parabola"
buildmodes=('iso')
-bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
+bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
+ 'uefi-ia32.grub.esp' 'uefi-x64.systemd-boot.esp'
+ 'uefi-ia32.grub.eltorito' 'uefi-x64.systemd-boot.eltorito')
arch="x86_64"
pacman_conf="pacman.conf"
airootfs_image_type="erofs"
diff --git a/configs/releng/efiboot/loader/entries/01-parabolaiso-x86_64-linux-libre.conf b/configs/releng/efiboot/loader/entries/01-parabolaiso-x86_64-linux-libre.conf
index 760ce9a..925962a 100644
--- a/configs/releng/efiboot/loader/entries/01-parabolaiso-x86_64-linux-libre.conf
+++ b/configs/releng/efiboot/loader/entries/01-parabolaiso-x86_64-linux-libre.conf
@@ -1,4 +1,5 @@
-title Parabola GNU/Linux-libre install medium (x86_64, UEFI)
-linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
-initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
-options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%
+title Parabola GNU/Linux-libre install medium (x86_64, UEFI)
+sort-key 01
+linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
+initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%
diff --git a/configs/releng/efiboot/loader/entries/02-parabolaiso-x86_64-speech-linux-libre.conf b/configs/releng/efiboot/loader/entries/02-parabolaiso-x86_64-speech-linux-libre.conf
index 3ebef25..e2f3cbe 100644
--- a/configs/releng/efiboot/loader/entries/02-parabolaiso-x86_64-speech-linux-libre.conf
+++ b/configs/releng/efiboot/loader/entries/02-parabolaiso-x86_64-speech-linux-libre.conf
@@ -1,4 +1,5 @@
-title Parabola GNU/Linux-libre install medium (x86_64, UEFI) with speech
-linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
-initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
-options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL% accessibility=on
+title Parabola GNU/Linux-libre install medium (x86_64, UEFI) with speech
+sort-key 02
+linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
+initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL% accessibility=on
diff --git a/configs/releng/efiboot/loader/entries/03-parabolaiso-x86_64-ram-linux-libre.conf b/configs/releng/efiboot/loader/entries/03-parabolaiso-x86_64-ram-linux-libre.conf
index 40fd971..ea54bc3 100644
--- a/configs/releng/efiboot/loader/entries/03-parabolaiso-x86_64-ram-linux-libre.conf
+++ b/configs/releng/efiboot/loader/entries/03-parabolaiso-x86_64-ram-linux-libre.conf
@@ -1,4 +1,5 @@
-title Parabola GNU/Linux-libre install medium (x86_64, UEFI, Copy to RAM)
-linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
-initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
-options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL% copytoram
+title Parabola GNU/Linux-libre install medium (x86_64, UEFI, Copy to RAM)
+sort-key 03
+linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
+initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL% copytoram
diff --git a/configs/releng/efiboot/loader/entries/04-parabolaiso-x86_64-ram-speech-linux-libre.conf b/configs/releng/efiboot/loader/entries/04-parabolaiso-x86_64-ram-speech-linux-libre.conf
new file mode 100644
index 0000000..9a5b99b
--- /dev/null
+++ b/configs/releng/efiboot/loader/entries/04-parabolaiso-x86_64-ram-speech-linux-libre.conf
@@ -0,0 +1,5 @@
+title Parabola GNU/Linux-libre install medium (x86_64, UEFI, Copy to RAM) with speech
+sort-key 04
+linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
+initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL% copytoram accessibility=on
diff --git a/configs/releng/efiboot/loader/loader.conf b/configs/releng/efiboot/loader/loader.conf
index 8a5b018..8e31f03 100644
--- a/configs/releng/efiboot/loader/loader.conf
+++ b/configs/releng/efiboot/loader/loader.conf
@@ -1,2 +1,3 @@
timeout 15
default 01-parabolaiso-x86_64-linux-libre.conf
+beep on
diff --git a/configs/releng/grub/grub.cfg b/configs/releng/grub/grub.cfg
new file mode 100644
index 0000000..80b0d72
--- /dev/null
+++ b/configs/releng/grub/grub.cfg
@@ -0,0 +1,46 @@
+insmod part_gpt
+insmod part_msdos
+insmod fat
+insmod iso9660
+
+insmod all_video
+
+insmod font
+
+if loadfont "${prefix}/fonts/unicode.pf2" ; then
+ insmod gfxterm
+ set gfxmode="auto"
+ terminal_input console
+ terminal_output gfxterm
+fi
+
+# GRUB init tune for accessibility
+#
+# Morse translation table:
+# "." is "500 1 300 1"
+# "-" is "600 3 300 1"
+# " " is "100 2"
+# "/" is "100 5"
+#
+# Message: "s for blind"
+play 500 500 1 300 1 500 1 300 1 500 1 300 1 100 5 500 1 300 1 500 1 300 1 100 2 500 1 300 1 500 1 300 1 600 3 300 1 500 1 300 1 100 5 600 3 300 1 500 1 300 1 500 1 300 1 500 1 300 1 100 2 500 1 300 1 600 3 300 1 500 1 300 1 500 1 300 1 100 2 500 1 300 1 500 1 300 1 100 2 500 1 300 1 500 1 300 1 100 2 600 3 300 1 500 1 300 1 100 2 600 3 300 1 500 1 300 1 500 1 300 1
+
+menuentry "Parabola GNU/Linux-libre install medium (x86_64, UEFI)" {
+ set gfxpayload=keep
+ search --no-floppy --set=root --label %PARABOLAISO_LABEL%
+ linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%
+ initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
+}
+
+menuentry "Parabola GNU/Linux-libre install medium with speakup screen reader (x86_64, UEFI)" --hotkey=s {
+ set gfxpayload=keep
+ search --no-floppy --set=root --label %PARABOLAISO_LABEL%
+ linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL% accessibility=on
+ initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+}
+
+menuentry "UEFI Shell" {
+ insmod chain
+ search --no-floppy --set=root --label %PARABOLAISO_LABEL%
+ chainloader /shellia32.efi
+}
diff --git a/configs/releng/packages.both b/configs/releng/packages.both
index 968966c..aabb1e6 100644
--- a/configs/releng/packages.both
+++ b/configs/releng/packages.both
@@ -1,7 +1,7 @@
alsa-utils
arch-install-scripts
base
-bind-tools
+bind
brltty
btrfs-progs
cloud-init
diff --git a/configs/releng/profiledef.sh b/configs/releng/profiledef.sh
index 8ca837f..12df102 100644
--- a/configs/releng/profiledef.sh
+++ b/configs/releng/profiledef.sh
@@ -8,7 +8,9 @@ iso_application="Parabola GNU/Linux-libre Live/Rescue CD"
iso_version="$(date +%Y.%m.%d)"
install_dir="parabola"
buildmodes=('iso')
-bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
+bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
+ 'uefi-ia32.grub.esp' 'uefi-x64.systemd-boot.esp'
+ 'uefi-ia32.grub.eltorito' 'uefi-x64.systemd-boot.eltorito')
arch="dual"
pacman_conf="pacman.conf"
airootfs_image_type="squashfs"
diff --git a/docs/README.profile.rst b/docs/README.profile.rst
index a3dc954..f2ba5e6 100644
--- a/docs/README.profile.rst
+++ b/docs/README.profile.rst
@@ -10,6 +10,7 @@ A parabolaiso profile consists of several configuration files and a directory fo
├── airootfs/
├── efiboot/
├── syslinux/
+ ├── grub/
├── bootstrap_packages.arch
├── packages.arch
├── pacman.conf
@@ -45,6 +46,8 @@ The image file is constructed from some of the variables in ``profiledef.sh``: `
- ``bios.syslinux.mbr``: Syslinux for x86 BIOS booting from a disk
- ``bios.syslinux.eltorito``: Syslinux for x86 BIOS booting from an optical disc
+ - ``uefi-ia32.grub.esp``: GRUB for IA32 UEFI booting from a disk
+ - ``uefi-ia32.grub.eltorito``: GRUB for IA32 UEFI booting from an optical disc
- ``uefi-x64.systemd-boot.esp``: systemd-boot for x86_64 UEFI booting from a disk
- ``uefi-x64.systemd-boot.eltorito``: systemd-boot for x86_64 UEFI booting from an optical disc
- ``uefi-x64.refind.esp``: rEFInd for x86_64 UEFI booting from a disk
@@ -166,3 +169,11 @@ It contains configuration files for `syslinux <https://wiki.syslinux.org/wiki/in
<https://wiki.syslinux.org/wiki/index.php?title=PXELINUX>`_ used in the resuling image.
The *custom template identifiers* are understood in all `.cfg` files in this directory.
+
+grub
+----
+
+This directory is mandatory when the ``uefi-ia32.grub.esp`` or ``uefi-ia32.grub.eltorito`` bootmodes are selected in
+``profiledef.sh``.
+It contains configuration files for `GRUB <https://www.gnu.org/software/grub/>`_
+used in the resulting image.
diff --git a/parabolaiso/mkparabolaiso b/parabolaiso/mkparabolaiso
index 71d5c41..169fea9 100755
--- a/parabolaiso/mkparabolaiso
+++ b/parabolaiso/mkparabolaiso
@@ -41,7 +41,7 @@ airootfs_image_tool_options=()
cert_list=()
sign_netboot_artifacts=""
declare -A file_permissions=()
-
+efiboot_files=()
# Show an INFO message
# $1: message string
@@ -542,18 +542,97 @@ _make_efibootimg() {
mmd -i "${work_dir}/efiboot.img" ::/EFI ::/EFI/BOOT
}
+_make_bootmode_uefi-ia32.grub.esp() {
+ # Fill Grub configuration files
+ sed "s|%PARABOLAISO_LABEL%|${iso_label}|g;
+ s|%INSTALL_DIR%|${install_dir}|g;
+ s|%ARCH%|${arch}|g" \
+ "${profile}/grub/grub.cfg" > "${work_dir}/grub.cfg"
+
+ # shellcheck disable=SC2016
+ printf 'configfile ${cmdpath}/grub.cfg\n' > "${work_dir}/grub-embed.cfg"
+
+ # Create EFI file
+ grub-mkstandalone -O i386-efi \
+ --modules="part_gpt part_msdos fat iso9660" \
+ --locales="en@quot" \
+ --themes="" \
+ -o "${work_dir}/BOOTIA32.EFI" "boot/grub/grub.cfg=${work_dir}/grub-embed.cfg"
+ # Add GRUB to the list of files used to calculate the required FAT image size.
+ efiboot_files+=("${work_dir}/BOOTIA32.EFI"
+ "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
+
+ if [[ ! " ${bootmodes[*]} " =~ uefi-x64.systemd-boot.esp ]]; then
+ efiboot_files+=("${pacstrap_dir}/boot/vmlinuz-"*
+ "${pacstrap_dir}/boot/initramfs-"*".img")
+
+ efiboot_imgsize="$(du -bc "${efiboot_files[@]}" \
+ 2>/dev/null | awk 'END { print $1 }')"
+ # Create a FAT image for the EFI system partition
+ _make_efibootimg "$efiboot_imgsize"
+ else
+ _run_once _make_bootmode_uefi-x64.systemd-boot.esp
+ fi
+
+ # Copy grub EFI binary to the default/fallback boot path
+ mcopy -i "${work_dir}/efiboot.img" \
+ "${work_dir}/BOOTIA32.EFI" ::/EFI/BOOT/BOOTIA32.EFI
+
+ # Copy GRUB configuration files
+ mcopy -i "${work_dir}/efiboot.img" \
+ "${work_dir}/grub.cfg" ::/EFI/BOOT/grub.cfg
+
+ # shellia32.efi is picked up automatically when on /
+ if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
+ mcopy -i "${work_dir}/efiboot.img" \
+ "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ::/shellia32.efi
+ fi
+
+ _msg_info "Done! GRUB set up for UEFI booting successfully."
+}
+
+# Prepare GRUB for El Torito booting
+_make_bootmode_uefi-ia32.grub.eltorito() {
+ # El Torito UEFI boot requires an image containing the EFI system partition.
+ # uefi-ia32.grub.eltorito has the same requirements as uefi-ia32.grub.esp
+ _run_once _make_bootmode_uefi-ia32.grub.esp
+
+ # Additionally set up system-boot in ISO 9660. This allows creating a medium for the live environment by using
+ # manual partitioning and simply copying the ISO 9660 file system contents.
+ # This is not related to El Torito booting and no firmware uses these files.
+ _msg_info "Preparing an /EFI directory for the ISO 9660 file system..."
+ install -d -m 0755 -- "${isofs_dir}/EFI/BOOT"
+
+ # Copy GRUB EFI binary to the default/fallback boot path
+ install -m 0644 -- "${work_dir}/BOOTIA32.EFI" \
+ "${isofs_dir}/EFI/BOOT/BOOTIA32.EFI"
+
+ # Copy GRUB configuration files
+ install -m 0644 -- "${work_dir}/grub.cfg" "${isofs_dir}/EFI/BOOT/grub.cfg"
+
+ # edk2-shell based UEFI shell
+ # shellia32.efi is picked up automatically when on /
+ if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
+ install -m 0644 -- "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" \
+ "${isofs_dir}/shellia32.efi"
+ fi
+
+ _msg_info "Done!"
+}
+
# Prepare system-boot for booting when written to a disk (isohybrid)
_make_bootmode_uefi-x64.systemd-boot.esp() {
local efiboot_imgsize
_msg_info "Setting up systemd-boot for UEFI booting..."
# Calculate the required FAT image size in bytes
- efiboot_imgsize="$(du -bc \
- "${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" \
- "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" \
- "${profile}/efiboot/" \
- "${pacstrap_dir}/boot/vmlinuz-"* \
- "${pacstrap_dir}/boot/initramfs-"*".img" \
+ efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
+ "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi"
+ "${profile}/efiboot/"
+ "${pacstrap_dir}/boot/vmlinuz-"*
+ "${pacstrap_dir}/boot/initramfs-"*".img"
+ "${_available_ucodes[@]}")
+ efiboot_imgsize="$(du -bc "${efiboot_files[@]}" \
2>/dev/null | awk 'END { print $1 }')"
# Create a FAT image for the EFI system partition
_make_efibootimg "$efiboot_imgsize"
@@ -585,6 +664,41 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
_msg_info "Done! systemd-boot set up for UEFI booting successfully."
}
+# Prepare system-boot for El Torito booting
+_make_bootmode_uefi-x64.systemd-boot.eltorito() {
+ # El Torito UEFI boot requires an image containing the EFI system partition.
+ # uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
+ _run_once _make_bootmode_uefi-x64.systemd-boot.esp
+
+ # Additionally set up system-boot in ISO 9660. This allows creating a medium for the live environment by using
+ # manual partitioning and simply copying the ISO 9660 file system contents.
+ # This is not related to El Torito booting and no firmware uses these files.
+ _msg_info "Preparing an /EFI directory for the ISO 9660 file system..."
+ install -d -m 0755 -- "${isofs_dir}/EFI/BOOT"
+
+ # Copy systemd-boot EFI binary to the default/fallback boot path
+ install -m 0644 -- "${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" \
+ "${isofs_dir}/EFI/BOOT/BOOTx64.EFI"
+
+ # Copy systemd-boot configuration files
+ install -d -m 0755 -- "${isofs_dir}/loader/entries"
+ install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
+ for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
+ sed "s|%PARABOLAISO_LABEL%|${iso_label}|g;
+ s|%INSTALL_DIR%|${install_dir}|g;
+ s|%ARCH%|${arch}|g" \
+ "${_conf}" > "${isofs_dir}/loader/entries/${_conf##*/}"
+ done
+
+ # edk2-shell based UEFI shell
+ # shellx64.efi is picked up automatically when on /
+ if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" ]]; then
+ install -m 0644 -- "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" "${isofs_dir}/shellx64.efi"
+ fi
+
+ _msg_info "Done!"
+}
+
# Prepare rEFInd for booting when written to a disk (isohybrid)
_make_bootmode_uefi-x64.refind.esp() {
local efiboot_imgsize
@@ -627,41 +741,6 @@ _make_bootmode_uefi-x64.refind.esp() {
_msg_info "Done! rEFInd set up for UEFI booting successfully."
}
-# Prepare system-boot for El Torito booting
-_make_bootmode_uefi-x64.systemd-boot.eltorito() {
- # El Torito UEFI boot requires an image containing the EFI system partition.
- # uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
- _run_once _make_bootmode_uefi-x64.systemd-boot.esp
-
- # Additionally set up system-boot in ISO 9660. This allows creating a medium for the live environment by using
- # manual partitioning and simply copying the ISO 9660 file system contents.
- # This is not related to El Torito booting and no firmware uses these files.
- _msg_info "Preparing an /EFI directory for the ISO 9660 file system..."
- install -d -m 0755 -- "${isofs_dir}/EFI/BOOT"
-
- # Copy systemd-boot EFI binary to the default/fallback boot path
- install -m 0644 -- "${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" \
- "${isofs_dir}/EFI/BOOT/BOOTx64.EFI"
-
- # Copy systemd-boot configuration files
- install -d -m 0755 -- "${isofs_dir}/loader/entries"
- install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
- for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
- sed "s|%PARABOLAISO_LABEL%|${iso_label}|g;
- s|%INSTALL_DIR%|${install_dir}|g;
- s|%ARCH%|${arch}|g" \
- "${_conf}" > "${isofs_dir}/loader/entries/${_conf##*/}"
- done
-
- # edk2-shell based UEFI shell
- # shellx64.efi is picked up automatically when on /
- if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" ]]; then
- install -m 0644 -- "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" "${isofs_dir}/shellx64.efi"
- fi
-
- _msg_info "Done!"
-}
-
# Prepare rEFInd for El Torito booting
_make_bootmode_uefi-x64.refind.eltorito() {
# El Torito UEFI boot requires an image containing the EFI system partition.
@@ -795,6 +874,25 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
fi
}
+_validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
+ # uefi-x64.systemd-boot.eltorito has the exact same requirements as uefi-x64.systemd-boot.esp
+ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp
+}
+
+_validate_requirements_bootmode_uefi-ia32.grub.esp() {
+ # Check if GRUB is available
+ if ! command -v grub-mkstandalone &> /dev/null; then
+ (( validation_error=validation_error+1 ))
+ _msg_error "Validating '${bootmode}': grub-install is not available on this host. Install 'grub'!" 0
+ fi
+ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp
+}
+
+_validate_requirements_bootmode_uefi-ia32.grub.eltorito() {
+ # uefi-ia32.grub.eltorito has the exact same requirements as uefi-ia32.grub.esp
+ _validate_requirements_bootmode_uefi-ia32.grub.esp
+}
+
_validate_requirements_bootmode_uefi-x64.refind.esp() {
_validate_common_requirements_bootmode_uefi-x64
# Check if rEFInd configuration files exist
@@ -818,11 +916,6 @@ _validate_requirements_bootmode_uefi-x64.refind.esp() {
fi
}
-_validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
- # uefi-x64.systemd-boot.eltorito has the exact same requirements as uefi-x64.systemd-boot.esp
- _validate_requirements_bootmode_uefi-x64.systemd-boot.esp
-}
-
_validate_requirements_bootmode_uefi-x64.refind.eltorito() {
# uefi-x64.refind.eltorito has the exact same requirements as uefi-x64.refind.esp
_validate_requirements_bootmode_uefi-x64.refind.esp
@@ -1095,6 +1188,22 @@ _add_xorrisofs_options_bios.syslinux.mbr() {
)
}
+# GRUB in an attached EFI system partition
+_add_xorrisofs_options_uefi-ia32.grub.esp() {
+ # shellcheck disable=SC2076
+ if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.esp ' ]]; then
+ _add_xorrisofs_options_uefi-x64.systemd-boot.esp
+ fi
+}
+
+# GRUB via El Torito
+_add_xorrisofs_options_uefi-ia32.grub.eltorito() {
+ # shellcheck disable=SC2076
+ if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' ]]; then
+ _add_xorrisofs_options_uefi-x64.systemd-boot.eltorito
+ fi
+}
+
# systemd-boot in an attached EFI system partition
_add_xorrisofs_options_uefi-x64.systemd-boot.esp() {
# Move the first partition away from the start of the ISO, otherwise the GPT will not be valid and ISO 9660
@@ -1109,7 +1218,7 @@ _add_xorrisofs_options_uefi-x64.systemd-boot.esp() {
# A valid GPT prevents BIOS booting on some systems, instead use an invalid GPT (without a protective MBR).
# The attached partition will have the EFI system partition type code in MBR, but in the invalid GPT it will
# have a Microsoft basic partition type code.
- if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' ]]; then
+ if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' && ! " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
# If '-isohybrid-gpt-basdat' is specified before '-e', then the appended EFI system partition will have the
# EFI system partition type ID/GUID in both MBR and GPT. If '-isohybrid-gpt-basdat' is specified after '-e',
# the appended EFI system partition will have the Microsoft basic data type GUID in GPT.
@@ -1126,7 +1235,7 @@ _add_xorrisofs_options_uefi-x64.systemd-boot.esp() {
# systemd-boot via El Torito
_add_xorrisofs_options_uefi-x64.systemd-boot.eltorito() {
# shellcheck disable=SC2076
- if [[ " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.esp ' ]]; then
+ if [[ " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.esp ' || " ${bootmodes[*]} " =~ ' uefi-ia32.grub.esp ' ]]; then
# systemd-boot in an attached EFI system partition via El Torito
xorrisofs_options+=(
# Start a new El Torito boot entry for UEFI