Add bootloader configs to archiso profile (syslinux/efiboot/grub)
All checks were successful
Mirror to GitHub / mirror (push) Successful in 11s

The profile declared syslinux + systemd-boot bootmodes but lacked the
required config directories, so mkarchiso would fail. Added from the
official releng profile, rebranded to Bread OS; %PLACEHOLDER% tokens are
substituted by mkarchiso at build time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-13 23:03:54 +08:00
parent 8e41d9fc2b
commit ed0eea3cb1
14 changed files with 353 additions and 0 deletions

View file

@ -0,0 +1,5 @@
title Bread OS install medium (%ARCH%, UEFI)
sort-key 01
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%

View file

@ -0,0 +1,5 @@
title Bread OS install medium (%ARCH%, UEFI) with speech
sort-key 02
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on

View file

@ -0,0 +1,4 @@
title Memtest86+
sort-key 03
efi /boot/memtest86+/memtest.efi
architecture x64

View file

@ -0,0 +1,3 @@
timeout 15
default 01-archiso-linux.conf
beep on

112
iso/grub/grub.cfg Normal file
View file

@ -0,0 +1,112 @@
# Load partition table and file system modules
insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
insmod ntfs
insmod ntfscomp
insmod exfat
insmod udf
# Use graphics-mode output
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
fi
# Get a human readable platform identifier
if [ "${grub_platform}" == 'efi' ]; then
archiso_platform='UEFI'
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 "Bread OS 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% archisosearchuuid=%ARCHISO_UUID%
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
menuentry "Bread OS 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% archisosearchuuid=%ARCHISO_UUID% accessibility=on
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 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
}
elif [ "${grub_cpu}" == 'arm64' -a -f '/shellaa64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellaa64.efi
}
elif [ "${grub_cpu}" == 'riscv64' -a -f '/shellriscv64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellriscv64.efi
}
elif [ "${grub_cpu}" == 'loongarch64' -a -f '/shellloongarch64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellloongarch64.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
}
# GRUB init tune for accessibility
play 600 988 1 1319 4

85
iso/grub/loopback.cfg Normal file
View file

@ -0,0 +1,85 @@
# 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'
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 "Bread OS 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/%ARCH%/initramfs-linux.img
}
menuentry "Bread OS 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/%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
}
elif [ "${grub_cpu}" == 'arm64' -a -f '/shellaa64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellaa64.efi
}
elif [ "${grub_cpu}" == 'riscv64' -a -f '/shellriscv64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellriscv64.efi
}
elif [ "${grub_cpu}" == 'loongarch64' -a -f '/shellloongarch64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellloongarch64.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
}

View file

@ -0,0 +1,28 @@
SERIAL 0 115200
UI vesamenu.c32
MENU TITLE Bread OS
MENU BACKGROUND splash.png
MENU WIDTH 78
MENU MARGIN 4
MENU ROWS 7
MENU VSHIFT 10
MENU TABMSGROW 14
MENU CMDLINEROW 14
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
# Refer to https://wiki.syslinux.org/wiki/index.php/Comboot/menu.c32
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
MENU CLEAR
MENU IMMEDIATE

View file

@ -0,0 +1,32 @@
LABEL arch_nbd
TEXT HELP
Boot the Bread OS install medium using NBD.
It allows you to install Bread OS or perform system maintenance.
ENDTEXT
MENU LABEL Bread OS install medium (%ARCH%, NBD)
LINUX ::/%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
INITRD ::/%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% archiso_nbd_srv=${pxeserver} cms_verify=y
SYSAPPEND 3
LABEL arch_nfs
TEXT HELP
Boot the Bread OS live medium using NFS.
It allows you to install Bread OS or perform system maintenance.
ENDTEXT
MENU LABEL Bread OS install medium (%ARCH%, NFS)
LINUX ::/%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
INITRD ::/%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt cms_verify=y
SYSAPPEND 3
LABEL arch_http
TEXT HELP
Boot the Bread OS live medium using HTTP.
It allows you to install Bread OS or perform system maintenance.
ENDTEXT
MENU LABEL Bread OS install medium (%ARCH%, HTTP)
LINUX ::/%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
INITRD ::/%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ cms_verify=y
SYSAPPEND 3

View file

@ -0,0 +1,5 @@
INCLUDE archiso_head.cfg
INCLUDE archiso_pxe-linux.cfg
INCLUDE archiso_tail.cfg

View file

@ -0,0 +1,20 @@
LABEL arch
TEXT HELP
Boot the Bread OS install medium on BIOS.
It allows you to install Bread OS or perform system maintenance.
ENDTEXT
MENU LABEL Bread OS install medium (%ARCH%, BIOS)
LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%
# Accessibility boot option
LABEL archspeech
TEXT HELP
Boot the Bread OS install medium on BIOS with speakup screen reader.
It allows you to install Bread OS or perform system maintenance with speech feedback.
ENDTEXT
MENU LABEL Bread OS install medium (%ARCH%, BIOS) with ^speech
LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on

View file

@ -0,0 +1,8 @@
INCLUDE archiso_head.cfg
DEFAULT arch
TIMEOUT 150
INCLUDE archiso_sys-linux.cfg
INCLUDE archiso_tail.cfg

View file

@ -0,0 +1,35 @@
LABEL existing
TEXT HELP
Boot an existing operating system.
Press TAB to edit the disk and partition number to boot.
ENDTEXT
MENU LABEL Boot existing OS
COM32 chain.c32
APPEND hd0 0
# https://www.memtest.org/
LABEL memtest
MENU LABEL Run Memtest86+ (RAM test)
LINUX /boot/memtest86+/memtest
# https://wiki.syslinux.org/wiki/index.php/Hdt_(Hardware_Detection_Tool)
LABEL hdt
MENU LABEL Hardware Information (HDT)
COM32 hdt.c32
APPEND modules_alias=hdt/modalias.gz pciids=hdt/pciids.gz
LABEL reboot
TEXT HELP
Reboot computer.
The computer's firmware must support APM.
ENDTEXT
MENU LABEL Reboot
COM32 reboot.c32
LABEL poweroff
TEXT HELP
Power off computer.
The computer's firmware must support APM.
ENDTEXT
MENU LABEL Power Off
COM32 poweroff.c32

BIN
iso/syslinux/splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

11
iso/syslinux/syslinux.cfg Normal file
View file

@ -0,0 +1,11 @@
DEFAULT select
LABEL select
COM32 whichsys.c32
APPEND -pxe- pxe -sys- sys -iso- sys
LABEL pxe
CONFIG archiso_pxe.cfg
LABEL sys
CONFIG archiso_sys.cfg