Compare commits
10 Commits
6c5ab3d388
...
e880172984
Author | SHA1 | Date |
---|---|---|
nl6720 | e880172984 | |
nl6720 | 4b489cd8bc | |
nl6720 | a75d7e5f7e | |
nl6720 | 4280af7474 | |
nl6720 | 0cd0cc0c3b | |
nl6720 | 8fb5246de6 | |
nl6720 | 0a3a57a88b | |
nl6720 | 5e72546e89 | |
nl6720 | 519a5c004d | |
nl6720 | a4bbbfde42 |
|
@ -8,6 +8,42 @@ Changelog
|
|||
Added
|
||||
-----
|
||||
|
||||
Changed
|
||||
-------
|
||||
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
Fixed
|
||||
-----
|
||||
|
||||
Removed
|
||||
-------
|
||||
|
||||
[73] - 2023-09-29
|
||||
=================
|
||||
|
||||
Added
|
||||
-----
|
||||
|
||||
- Add bolt to releng for authorizing and otherwise managing Thunderbolt and USB4 devices.
|
||||
- Add ``uefi-ia32.systemd-boot.esp`` and ``uefi-ia32.systemd-boot.eltorito`` boot modes that use systemd-boot for IA32
|
||||
UEFI. The boot modes of baseline and releng are not changed.
|
||||
- Add GRUB configuration file ``/boot/grub/loopback.cfg`` to the releng and baseline profiles. It sets the necessary
|
||||
boot parameters required for booting the ISO image as a file on a file system.
|
||||
|
||||
Fixed
|
||||
-----
|
||||
|
||||
- Add ``/etc/localtime`` to the baseline profile to ensure the ISO can be booted successfully without triggering
|
||||
questions from systemd-firstboot.
|
||||
|
||||
[72] - 2023-08-29
|
||||
=================
|
||||
|
||||
Added
|
||||
-----
|
||||
|
||||
- Add tpm2-tools to releng to allow clearing, creating and reading keys on the TPM.
|
||||
- Add sequoia-sq and openpgp-card-tools as additional tooling for working with OpenPGP certificates and smartcards.
|
||||
|
||||
|
@ -21,18 +57,12 @@ Changed
|
|||
- Moved custom ``sshd_config`` files to ``/ssh/sshd_config.d/10-archiso.conf``
|
||||
- Use pcsclite for interfacing with smartcards, since both gnupg and opgpcard support it.
|
||||
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
Fixed
|
||||
-----
|
||||
|
||||
- Sign the root file system image only once.
|
||||
- Make sure xorriso does not read its configuration files to prevent interference and unintended behavior.
|
||||
|
||||
Removed
|
||||
-------
|
||||
|
||||
[71] - 2023-05-28
|
||||
=================
|
||||
|
||||
|
|
|
@ -420,6 +420,10 @@ _make_bootmodes() {
|
|||
for bootmode in "${bootmodes[@]}"; do
|
||||
_run_once "_make_bootmode_${bootmode}"
|
||||
done
|
||||
|
||||
if [[ "${bootmodes[*]}" != *grub* ]]; then
|
||||
_run_once _make_common_grubenv_and_loopbackcfg
|
||||
fi
|
||||
}
|
||||
|
||||
# Copy kernel and initramfs to ISO 9660
|
||||
|
@ -638,6 +642,40 @@ EOF
|
|||
>"${work_dir}/grub/grubenv"
|
||||
}
|
||||
|
||||
# Create GRUB specific configuration files when GRUB is not used as a boot loader
|
||||
_make_common_grubenv_and_loopbackcfg() {
|
||||
local search_filename
|
||||
|
||||
install -d -m 0755 -- "${isofs_dir}/boot/grub"
|
||||
# Create a /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid file on ISO 9660. GRUB will search for it to find the ISO
|
||||
# volume. This is similar to what grub-mkrescue does, except it places the file in /.disk/, but we opt to use a
|
||||
# directory that does not start with a dot to avoid it being accidentally missed when copying the ISO's contents.
|
||||
search_filename="/boot/grub/${iso_uuid}.uuid"
|
||||
: >"${isofs_dir}/${search_filename}"
|
||||
|
||||
# Write grubenv
|
||||
printf '%.1024s' \
|
||||
"$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\nARCHISO_LABEL=%s\nINSTALL_DIR=%s\nARCH=%s\nARCHISO_SEARCH_FILENAME=%s\n%s' \
|
||||
"${iso_name}" \
|
||||
"${iso_version}" \
|
||||
"${iso_label}" \
|
||||
"${install_dir}" \
|
||||
"${arch}" \
|
||||
"${search_filename}" \
|
||||
"$(printf '%0.1s' "#"{1..1024})")" \
|
||||
>"${isofs_dir}/boot/grub/grubenv"
|
||||
|
||||
# Copy loopback.cfg to /boot/grub/ on ISO 9660
|
||||
if [[ -e "${profile}/grub/loopback.cfg" ]]; then
|
||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g;
|
||||
s|%ARCHISO_SEARCH_FILENAME%|${search_filename}|g" \
|
||||
"${profile}/grub/loopback.cfg" >"${isofs_dir}/boot/grub/loopback.cfg"
|
||||
fi
|
||||
}
|
||||
|
||||
_make_bootmode_uefi-ia32.grub.esp() {
|
||||
local grubmodules=()
|
||||
|
||||
|
@ -793,11 +831,9 @@ _make_bootmode_uefi-x64.grub.eltorito() {
|
|||
_msg_info "Done!"
|
||||
}
|
||||
|
||||
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
||||
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
_make_common_bootmode_systemd-boot() {
|
||||
local _file efiboot_imgsize
|
||||
local _available_ucodes=()
|
||||
_msg_info "Setting up systemd-boot for UEFI booting..."
|
||||
|
||||
for _file in "${ucodes[@]}"; do
|
||||
if [[ -e "${pacstrap_dir}/boot/${_file}" ]]; then
|
||||
|
@ -805,20 +841,41 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
|||
fi
|
||||
done
|
||||
# Calculate the required FAT image size in bytes
|
||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi"
|
||||
"${profile}/efiboot/"
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.esp ' || " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' ]]; then
|
||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi")
|
||||
fi
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.systemd-boot.esp ' || " ${bootmodes[*]} " =~ ' uefi-ia32.systemd-boot.eltorito ' ]]; then
|
||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
||||
fi
|
||||
efiboot_files+=("${profile}/efiboot/"
|
||||
"${pacstrap_dir}/boot/vmlinuz-"*
|
||||
"${pacstrap_dir}/boot/initramfs-"*".img"
|
||||
"${_available_ucodes[@]}")
|
||||
efiboot_imgsize="$(du -bcs -- "${efiboot_files[@]}" \
|
||||
2>/dev/null | awk 'END { print $1 }')"
|
||||
efiboot_imgsize="$(du -bcs -- "${efiboot_files[@]}" 2>/dev/null | awk 'END { print $1 }')"
|
||||
# Create a FAT image for the EFI system partition
|
||||
_make_efibootimg "$efiboot_imgsize"
|
||||
}
|
||||
|
||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" ::/EFI/BOOT/BOOTx64.EFI
|
||||
_make_common_bootmode_systemd-boot_conf.isofs() {
|
||||
local _conf
|
||||
|
||||
# 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|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g" \
|
||||
"${_conf}" >"${isofs_dir}/loader/entries/${_conf##*/}"
|
||||
done
|
||||
}
|
||||
|
||||
_make_common_bootmode_systemd-boot_conf.esp() {
|
||||
local _conf
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
mmd -i "${efibootimg}" ::/loader ::/loader/entries
|
||||
|
@ -830,6 +887,20 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
|||
s|%ARCH%|${arch}|g" \
|
||||
"${_conf}" | mcopy -i "${efibootimg}" - "::/loader/entries/${_conf##*/}"
|
||||
done
|
||||
}
|
||||
|
||||
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
||||
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
||||
|
||||
_run_once _make_common_bootmode_systemd-boot
|
||||
|
||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" ::/EFI/BOOT/BOOTx64.EFI
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.esp
|
||||
|
||||
# shellx64.efi is picked up automatically when on /
|
||||
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" ]]; then
|
||||
|
@ -839,9 +910,9 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
|||
|
||||
# Copy kernel and initramfs to FAT image.
|
||||
# systemd-boot can only access files from the EFI system partition it was launched from.
|
||||
_make_boot_on_fat
|
||||
_run_once _make_boot_on_fat
|
||||
|
||||
_msg_info "Done! systemd-boot set up for UEFI booting successfully."
|
||||
_msg_info "Done! systemd-boot set up for x64 UEFI booting successfully."
|
||||
}
|
||||
|
||||
# Prepare systemd-boot for El Torito booting
|
||||
|
@ -861,14 +932,7 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
|||
"${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|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g" \
|
||||
"${_conf}" >"${isofs_dir}/loader/entries/${_conf##*/}"
|
||||
done
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.isofs
|
||||
|
||||
# edk2-shell based UEFI shell
|
||||
# shellx64.efi is picked up automatically when on /
|
||||
|
@ -879,6 +943,58 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
|||
_msg_info "Done!"
|
||||
}
|
||||
|
||||
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
||||
|
||||
_run_once _make_common_bootmode_systemd-boot
|
||||
|
||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi" ::/EFI/BOOT/BOOTIA32.EFI
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.esp
|
||||
|
||||
# shellia32.efi is picked up automatically when on /
|
||||
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ::/shellia32.efi
|
||||
fi
|
||||
|
||||
# Copy kernel and initramfs to FAT image.
|
||||
# systemd-boot can only access files from the EFI system partition it was launched from.
|
||||
_run_once _make_boot_on_fat
|
||||
|
||||
_msg_info "Done! systemd-boot set up for IA32 UEFI booting successfully."
|
||||
}
|
||||
|
||||
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
||||
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
||||
|
||||
# Additionally set up systemd-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-bootia32.efi" \
|
||||
"${isofs_dir}/EFI/BOOT/BOOTIA32.EFI"
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.isofs
|
||||
|
||||
# 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!"
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_bios.syslinux.mbr() {
|
||||
# bios.syslinux.mbr requires bios.syslinux.eltorito
|
||||
# shellcheck disable=SC2076
|
||||
|
@ -922,12 +1038,7 @@ _validate_requirements_bootmode_bios.syslinux.eltorito() {
|
|||
_validate_requirements_bootmode_bios.syslinux.mbr
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.esp ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-x64.grub.esp!" 0
|
||||
fi
|
||||
|
||||
_validate_requirements_common_systemd-boot() {
|
||||
# Check if mkfs.fat is available
|
||||
if ! command -v mkfs.fat &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
|
@ -967,6 +1078,14 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
|
|||
fi
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.esp ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-x64.grub.esp!" 0
|
||||
fi
|
||||
_validate_requirements_common_systemd-boot
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.eltorito ' ]]; then
|
||||
|
@ -977,6 +1096,25 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
|
|||
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.grub.esp ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-ia32.grub.esp!" 0
|
||||
fi
|
||||
|
||||
_validate_requirements_common_systemd-boot
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-ia32.grub.eltorito!" 0
|
||||
fi
|
||||
|
||||
# uefi-ia32.systemd-boot.eltorito has the exact same requirements as uefi-ia32.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
|
||||
|
@ -1700,8 +1838,9 @@ _make_version() {
|
|||
fi
|
||||
if [[ "${buildmode}" == "iso" ]]; then
|
||||
# Write grubenv with version information to ISO 9660
|
||||
# TODO: after sufficient time has passed, do not create this file anymore when GRUB boot modes are used.
|
||||
# _make_common_bootmode_grub_cfg already creates ${isofs_dir}/boot/grub/grubenv
|
||||
# TODO: after sufficient time has passed, do not create this file anymore.
|
||||
# _make_common_bootmode_grub_cfg and _make_common_grubenv_and_loopbackcfg already create a
|
||||
# ${isofs_dir}/boot/grub/grubenv file
|
||||
rm -f -- "${isofs_dir}/${install_dir}/grubenv"
|
||||
printf '%.1024s' "$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\n%s' \
|
||||
"${iso_name}" "${iso_version}" "$(printf '%0.1s' "#"{1..1024})")" \
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/usr/share/zoneinfo/UTC
|
|
@ -9,15 +9,19 @@ insmod exfat
|
|||
insmod udf
|
||||
|
||||
# Use graphics-mode output
|
||||
insmod all_video
|
||||
insmod font
|
||||
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
||||
insmod all_video
|
||||
set gfxmode="auto"
|
||||
terminal_input console
|
||||
terminal_output console
|
||||
fi
|
||||
|
||||
# Enable serial console
|
||||
insmod serial
|
||||
insmod usbserial_common
|
||||
insmod usbserial_ftdi
|
||||
insmod usbserial_pl2303
|
||||
insmod usbserial_usbdebug
|
||||
if serial --unit=0 --speed=115200; then
|
||||
terminal_input --append serial
|
||||
terminal_output --append serial
|
||||
|
@ -32,6 +36,22 @@ if [ -z "${ARCHISO_UUID}" ]; then
|
|||
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
||||
fi
|
||||
|
||||
# Get a human readable platform identifier
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
archiso_platform='UEFI'
|
||||
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||
archiso_platform="x64 ${archiso_platform}"
|
||||
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||
archiso_platform="IA32 ${archiso_platform}"
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||
fi
|
||||
elif [ "${grub_platform}" == 'pc' ]; then
|
||||
archiso_platform='BIOS'
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=archlinux
|
||||
timeout=15
|
||||
|
@ -40,8 +60,46 @@ timeout_style=menu
|
|||
|
||||
# Menu entries
|
||||
|
||||
menuentry "Arch Linux (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
menuentry "Arch Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID}
|
||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID}
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||
menuentry 'UEFI Shell' {
|
||||
chainloader /shellx64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||
menuentry 'UEFI Shell' {
|
||||
chainloader /shellia32.efi
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
|
||||
fwsetup
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||
echo 'System shutting down...'
|
||||
halt
|
||||
}
|
||||
|
||||
menuentry 'System restart' --class reboot --class restart {
|
||||
echo 'System rebooting...'
|
||||
reboot
|
||||
}
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
# https://www.supergrubdisk.org/wiki/Loopback.cfg
|
||||
|
||||
# Search for the ISO volume
|
||||
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
|
||||
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
|
||||
|
||||
# Get a human readable platform identifier
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
archiso_platform='UEFI'
|
||||
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||
archiso_platform="x64 ${archiso_platform}"
|
||||
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||
archiso_platform="IA32 ${archiso_platform}"
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||
fi
|
||||
elif [ "${grub_platform}" == 'pc' ]; then
|
||||
archiso_platform='BIOS'
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=archlinux
|
||||
timeout=15
|
||||
timeout_style=menu
|
||||
|
||||
|
||||
# Menu entries
|
||||
|
||||
menuentry "Arch Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||
menuentry 'UEFI Shell' {
|
||||
chainloader /shellx64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||
menuentry 'UEFI Shell' {
|
||||
chainloader /shellia32.efi
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
|
||||
fwsetup
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||
echo 'System shutting down...'
|
||||
halt
|
||||
}
|
||||
|
||||
menuentry 'System restart' --class reboot --class restart {
|
||||
echo 'System rebooting...'
|
||||
reboot
|
||||
}
|
|
@ -9,15 +9,19 @@ insmod exfat
|
|||
insmod udf
|
||||
|
||||
# Use graphics-mode output
|
||||
insmod all_video
|
||||
insmod font
|
||||
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
||||
insmod all_video
|
||||
set gfxmode="auto"
|
||||
terminal_input console
|
||||
terminal_output console
|
||||
fi
|
||||
|
||||
# Enable serial console
|
||||
insmod serial
|
||||
insmod usbserial_common
|
||||
insmod usbserial_ftdi
|
||||
insmod usbserial_pl2303
|
||||
insmod usbserial_usbdebug
|
||||
if serial --unit=0 --speed=115200; then
|
||||
terminal_input --append serial
|
||||
terminal_output --append serial
|
||||
|
@ -32,41 +36,62 @@ if [ -z "${ARCHISO_UUID}" ]; then
|
|||
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
||||
fi
|
||||
|
||||
# Get a human readable platform identifier
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
archiso_platform='UEFI'
|
||||
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||
archiso_platform="x64 ${archiso_platform}"
|
||||
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||
archiso_platform="IA32 ${archiso_platform}"
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||
fi
|
||||
elif [ "${grub_platform}" == 'pc' ]; then
|
||||
archiso_platform='BIOS'
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=archlinux
|
||||
timeout=15
|
||||
timeout_style=menu
|
||||
|
||||
# GRUB init tune for accessibility
|
||||
play 600 988 1 1319 4
|
||||
|
||||
# Menu entries
|
||||
|
||||
menuentry "Arch Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
menuentry "Arch Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID}
|
||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID}
|
||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
menuentry "Arch Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||
menuentry "Arch Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on
|
||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} accessibility=on
|
||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
if [ "${grub_platform}" == "efi" ]; then
|
||||
if [ "${grub_cpu}" == "x86_64" ]; then
|
||||
menuentry "Run Memtest86+ (RAM test)" --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
}
|
||||
menuentry "UEFI Shell" --class efi {
|
||||
insmod chain
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellx64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == "i386" ]; then
|
||||
menuentry "UEFI Shell" --class efi {
|
||||
insmod chain
|
||||
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellia32.efi
|
||||
}
|
||||
fi
|
||||
|
@ -76,12 +101,16 @@ if [ "${grub_platform}" == "efi" ]; then
|
|||
}
|
||||
fi
|
||||
|
||||
menuentry "System shutdown" --class shutdown --class poweroff {
|
||||
echo "System shutting down..."
|
||||
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||
echo 'System shutting down...'
|
||||
halt
|
||||
}
|
||||
|
||||
menuentry "System restart" --class reboot --class restart {
|
||||
echo "System rebooting..."
|
||||
menuentry 'System restart' --class reboot --class restart {
|
||||
echo 'System rebooting...'
|
||||
reboot
|
||||
}
|
||||
|
||||
|
||||
# GRUB init tune for accessibility
|
||||
play 600 988 1 1319 4
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
# https://www.supergrubdisk.org/wiki/Loopback.cfg
|
||||
|
||||
# Search for the ISO volume
|
||||
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
|
||||
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
|
||||
|
||||
# Get a human readable platform identifier
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
archiso_platform='UEFI'
|
||||
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||
archiso_platform="x64 ${archiso_platform}"
|
||||
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||
archiso_platform="IA32 ${archiso_platform}"
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||
fi
|
||||
elif [ "${grub_platform}" == 'pc' ]; then
|
||||
archiso_platform='BIOS'
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=archlinux
|
||||
timeout=15
|
||||
timeout_style=menu
|
||||
|
||||
|
||||
# Menu entries
|
||||
|
||||
menuentry "Arch Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
|
||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
menuentry "Arch Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on
|
||||
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellx64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellia32.efi
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
|
||||
fwsetup
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||
echo 'System shutting down...'
|
||||
halt
|
||||
}
|
||||
|
||||
menuentry 'System restart' --class reboot --class restart {
|
||||
echo 'System rebooting...'
|
||||
reboot
|
||||
}
|
|
@ -5,6 +5,7 @@ archinstall
|
|||
b43-fwcutter
|
||||
base
|
||||
bind
|
||||
bolt
|
||||
brltty
|
||||
broadcom-wl
|
||||
btrfs-progs
|
||||
|
|
|
@ -48,10 +48,12 @@ The image file is constructed from some of the variables in ``profiledef.sh``: `
|
|||
- ``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.grub.esp``: GRUB for x86_64 UEFI booting from a disk
|
||||
- ``uefi-x64.grub.eltorito``: GRUB for x86_64 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.grub.esp``: GRUB for x64 UEFI booting from a disk
|
||||
- ``uefi-x64.grub.eltorito``: GRUB for x64 UEFI booting from an optical disc
|
||||
- ``uefi-ia32.systemd-boot.esp``: systemd-boot for IA32 UEFI booting from a disk
|
||||
- ``uefi-ia32.systemd-boot.eltorito``: systemd-boot for IA32UEFI booting from an optical disc
|
||||
- ``uefi-x64.systemd-boot.esp``: systemd-boot for x64 UEFI booting from a disk
|
||||
- ``uefi-x64.systemd-boot.eltorito``: systemd-boot for x64 UEFI booting from an optical disc
|
||||
Note that BIOS El Torito boot mode must always be listed before UEFI El Torito boot mode.
|
||||
* ``arch``: The architecture (e.g. ``x86_64``) to build the image for. This is also used to resolve the name of the packages
|
||||
file (e.g. ``packages.x86_64``)
|
||||
|
|
Loading…
Reference in New Issue