Skip to content

Commit 42e1075

Browse files
committed
re-merge upstream changes from 2024.01.25 [archiso 75-1]
1 parent 6d765b2 commit 42e1075

5 files changed

+201
-38
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
## Changelog holding milestones and major changes to the code
22

3+
34
---
5+
# Galileo Neo (2024)
6+
* fixing issue with changed license package (path changes) in mkarchiso
7+
* adding legacy intel fix to disable compositor on LiveSession if legacy intel with xf86-video-intel ist in use to reduce graphical issues.
8+
49
# Development start for Galileo Release (2023)
510
* replacing xfce4 Live Session with KDE
611

mkarchiso

+184-35
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@ _make_bootmodes() {
442442
for bootmode in "${bootmodes[@]}"; do
443443
_run_once "_make_bootmode_${bootmode}"
444444
done
445+
446+
if [[ "${bootmodes[*]}" != *grub* ]]; then
447+
_run_once _make_common_grubenv_and_loopbackcfg
448+
fi
445449
}
446450

447451
# Copy kernel and initramfs to ISO 9660
@@ -500,7 +504,7 @@ _make_bootmode_bios.syslinux.mbr() {
500504
install -d -m 0755 -- "${isofs_dir}/boot/memtest86+/"
501505
# rename for PXE: https://wiki.archlinux.org/title/Syslinux#Using_memtest
502506
install -m 0644 -- "${pacstrap_dir}/boot/memtest86+/memtest.bin" "${isofs_dir}/boot/memtest86+/memtest"
503-
install -m 0644 -- "${pacstrap_dir}/usr/share/licenses/spdx/GPL-2.0-only.txt" "${isofs_dir}/boot/memtest86+/"
507+
install -m 0644 -- "${pacstrap_dir}/usr/share/licenses/spdx/GPL-2.0-only.txt" "${isofs_dir}/boot/memtest86+/LICENSE"
504508
fi
505509
_msg_info "Done! SYSLINUX set up for BIOS booting from a disk successfully."
506510
}
@@ -660,6 +664,40 @@ EOF
660664
>"${work_dir}/grub/grubenv"
661665
}
662666

667+
# Create GRUB specific configuration files when GRUB is not used as a boot loader
668+
_make_common_grubenv_and_loopbackcfg() {
669+
local search_filename
670+
671+
install -d -m 0755 -- "${isofs_dir}/boot/grub"
672+
# 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
673+
# volume. This is similar to what grub-mkrescue does, except it places the file in /.disk/, but we opt to use a
674+
# directory that does not start with a dot to avoid it being accidentally missed when copying the ISO's contents.
675+
search_filename="/boot/grub/${iso_uuid}.uuid"
676+
: >"${isofs_dir}/${search_filename}"
677+
678+
# Write grubenv
679+
printf '%.1024s' \
680+
"$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\nARCHISO_LABEL=%s\nINSTALL_DIR=%s\nARCH=%s\nARCHISO_SEARCH_FILENAME=%s\n%s' \
681+
"${iso_name}" \
682+
"${iso_version}" \
683+
"${iso_label}" \
684+
"${install_dir}" \
685+
"${arch}" \
686+
"${search_filename}" \
687+
"$(printf '%0.1s' "#"{1..1024})")" \
688+
>"${isofs_dir}/boot/grub/grubenv"
689+
690+
# Copy loopback.cfg to /boot/grub/ on ISO 9660
691+
if [[ -e "${profile}/grub/loopback.cfg" ]]; then
692+
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
693+
s|%ARCHISO_UUID%|${iso_uuid}|g;
694+
s|%INSTALL_DIR%|${install_dir}|g;
695+
s|%ARCH%|${arch}|g;
696+
s|%ARCHISO_SEARCH_FILENAME%|${search_filename}|g" \
697+
"${profile}/grub/loopback.cfg" >"${isofs_dir}/boot/grub/loopback.cfg"
698+
fi
699+
}
700+
663701
_make_bootmode_uefi-ia32.grub.esp() {
664702
local grubmodules=()
665703

@@ -780,7 +818,7 @@ _make_bootmode_uefi-x64.grub.esp() {
780818
if [[ -e "${pacstrap_dir}/boot/memtest86+/memtest.efi" ]]; then
781819
install -d -m 0755 -- "${isofs_dir}/boot/memtest86+/"
782820
install -m 0644 -- "${pacstrap_dir}/boot/memtest86+/memtest.efi" "${isofs_dir}/boot/memtest86+/memtest.efi"
783-
install -m 0644 -- "${pacstrap_dir}/usr/share/licenses/spdx/GPL-2.0-only.txt" "${isofs_dir}/boot/memtest86+/"
821+
install -m 0644 -- "${pacstrap_dir}/usr/share/licenses/spdx/GPL-2.0-only.txt" "${isofs_dir}/boot/memtest86+/LICENSE"
784822
fi
785823

786824
_msg_info "Done! GRUB set up for UEFI booting successfully."
@@ -815,43 +853,76 @@ _make_bootmode_uefi-x64.grub.eltorito() {
815853
_msg_info "Done!"
816854
}
817855

818-
# Prepare systemd-boot for booting when written to a disk (isohybrid)
819-
_make_bootmode_uefi-x64.systemd-boot.esp() {
856+
_make_common_bootmode_systemd-boot() {
820857
local _file efiboot_imgsize
821858
local _available_ucodes=()
822-
_msg_info "Setting up systemd-boot for UEFI booting..."
823859

824860
for _file in "${ucodes[@]}"; do
825861
if [[ -e "${pacstrap_dir}/boot/${_file}" ]]; then
826862
_available_ucodes+=("${pacstrap_dir}/boot/${_file}")
827863
fi
828864
done
829865
# Calculate the required FAT image size in bytes
830-
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
831-
"${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi"
832-
"${profile}/efiboot/"
866+
# shellcheck disable=SC2076
867+
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.esp ' || " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' ]]; then
868+
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
869+
"${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi")
870+
fi
871+
# shellcheck disable=SC2076
872+
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.systemd-boot.esp ' || " ${bootmodes[*]} " =~ ' uefi-ia32.systemd-boot.eltorito ' ]]; then
873+
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
874+
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
875+
fi
876+
efiboot_files+=("${work_dir}/loader/"
833877
"${pacstrap_dir}/boot/vmlinuz-"*
834878
"${pacstrap_dir}/boot/initramfs-"*".img"
835879
"${_available_ucodes[@]}")
836-
efiboot_imgsize="$(du -bcs -- "${efiboot_files[@]}" \
837-
2>/dev/null | awk 'END { print $1 }')"
880+
efiboot_imgsize="$(du -bcs -- "${efiboot_files[@]}" 2>/dev/null | awk 'END { print $1 }')"
838881
# Create a FAT image for the EFI system partition
839882
_make_efibootimg "$efiboot_imgsize"
883+
}
840884

841-
# Copy systemd-boot EFI binary to the default/fallback boot path
842-
mcopy -i "${efibootimg}" \
843-
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" ::/EFI/BOOT/BOOTx64.EFI
885+
_make_common_bootmode_systemd-boot_conf() {
886+
local _conf
844887

845-
# Copy systemd-boot configuration files
846-
mmd -i "${efibootimg}" ::/loader ::/loader/entries
847-
mcopy -i "${efibootimg}" "${profile}/efiboot/loader/loader.conf" ::/loader/
888+
install -d -m 0755 -- "${work_dir}/loader" "${work_dir}/loader/entries"
889+
890+
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${work_dir}/loader"
848891
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
849892
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
850893
s|%ARCHISO_UUID%|${iso_uuid}|g;
851894
s|%INSTALL_DIR%|${install_dir}|g;
852895
s|%ARCH%|${arch}|g" \
853-
"${_conf}" | mcopy -i "${efibootimg}" - "::/loader/entries/${_conf##*/}"
896+
"${_conf}" >"${work_dir}/loader/entries/${_conf##*/}"
854897
done
898+
}
899+
900+
# Copy systemd-boot configuration files to ISO 9660
901+
_make_common_bootmode_systemd-boot_conf.isofs() {
902+
cp -r --remove-destination -- "${work_dir}/loader" "${isofs_dir}/"
903+
}
904+
905+
# Copy systemd-boot configuration files to FAT image
906+
_make_common_bootmode_systemd-boot_conf.esp() {
907+
mcopy -i "${efibootimg}" -s "${work_dir}/loader" ::/
908+
}
909+
910+
# Prepare systemd-boot for booting when written to a disk (isohybrid)
911+
_make_bootmode_uefi-x64.systemd-boot.esp() {
912+
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
913+
914+
# Prepare configuration files
915+
_run_once _make_common_bootmode_systemd-boot_conf
916+
917+
# Prepare a FAT image for the EFI system partition
918+
_run_once _make_common_bootmode_systemd-boot
919+
920+
# Copy systemd-boot EFI binary to the default/fallback boot path
921+
mcopy -i "${efibootimg}" \
922+
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" ::/EFI/BOOT/BOOTx64.EFI
923+
924+
# Copy systemd-boot configuration files
925+
_run_once _make_common_bootmode_systemd-boot_conf.esp
855926

856927
# shellx64.efi is picked up automatically when on /
857928
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" ]]; then
@@ -861,13 +932,16 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
861932

862933
# Copy kernel and initramfs to FAT image.
863934
# systemd-boot can only access files from the EFI system partition it was launched from.
864-
_make_boot_on_fat
935+
_run_once _make_boot_on_fat
865936

866-
_msg_info "Done! systemd-boot set up for UEFI booting successfully."
937+
_msg_info "Done! systemd-boot set up for x64 UEFI booting successfully."
867938
}
868939

869940
# Prepare systemd-boot for El Torito booting
870941
_make_bootmode_uefi-x64.systemd-boot.eltorito() {
942+
# Prepare configuration files
943+
_run_once _make_common_bootmode_systemd-boot_conf
944+
871945
# El Torito UEFI boot requires an image containing the EFI system partition.
872946
# uefi-x64.systemd-boot.eltorito has the same requirements as uefi-x64.systemd-boot.esp
873947
_run_once _make_bootmode_uefi-x64.systemd-boot.esp
@@ -883,14 +957,7 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
883957
"${isofs_dir}/EFI/BOOT/BOOTx64.EFI"
884958

885959
# Copy systemd-boot configuration files
886-
install -d -m 0755 -- "${isofs_dir}/loader/entries"
887-
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
888-
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
889-
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
890-
s|%INSTALL_DIR%|${install_dir}|g;
891-
s|%ARCH%|${arch}|g" \
892-
"${_conf}" >"${isofs_dir}/loader/entries/${_conf##*/}"
893-
done
960+
_run_once _make_common_bootmode_systemd-boot_conf.isofs
894961

895962
# edk2-shell based UEFI shell
896963
# shellx64.efi is picked up automatically when on /
@@ -901,6 +968,65 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
901968
_msg_info "Done!"
902969
}
903970

971+
_make_bootmode_uefi-ia32.systemd-boot.esp() {
972+
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
973+
974+
# Prepare configuration files
975+
_run_once _make_common_bootmode_systemd-boot_conf
976+
977+
# Prepare a FAT image for the EFI system partition
978+
_run_once _make_common_bootmode_systemd-boot
979+
980+
# Copy systemd-boot EFI binary to the default/fallback boot path
981+
mcopy -i "${efibootimg}" \
982+
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi" ::/EFI/BOOT/BOOTIA32.EFI
983+
984+
# Copy systemd-boot configuration files
985+
_run_once _make_common_bootmode_systemd-boot_conf.esp
986+
987+
# shellia32.efi is picked up automatically when on /
988+
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
989+
mcopy -i "${efibootimg}" \
990+
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ::/shellia32.efi
991+
fi
992+
993+
# Copy kernel and initramfs to FAT image.
994+
# systemd-boot can only access files from the EFI system partition it was launched from.
995+
_run_once _make_boot_on_fat
996+
997+
_msg_info "Done! systemd-boot set up for IA32 UEFI booting successfully."
998+
}
999+
1000+
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
1001+
# Prepare configuration files
1002+
_run_once _make_common_bootmode_systemd-boot_conf
1003+
1004+
# El Torito UEFI boot requires an image containing the EFI system partition.
1005+
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
1006+
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
1007+
1008+
# Additionally set up systemd-boot in ISO 9660. This allows creating a medium for the live environment by using
1009+
# manual partitioning and simply copying the ISO 9660 file system contents.
1010+
# This is not related to El Torito booting and no firmware uses these files.
1011+
_msg_info "Preparing an /EFI directory for the ISO 9660 file system..."
1012+
install -d -m 0755 -- "${isofs_dir}/EFI/BOOT"
1013+
1014+
# Copy systemd-boot EFI binary to the default/fallback boot path
1015+
install -m 0644 -- "${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi" \
1016+
"${isofs_dir}/EFI/BOOT/BOOTIA32.EFI"
1017+
1018+
# Copy systemd-boot configuration files
1019+
_run_once _make_common_bootmode_systemd-boot_conf.isofs
1020+
1021+
# edk2-shell based UEFI shell
1022+
# shellia32.efi is picked up automatically when on /
1023+
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
1024+
install -m 0644 -- "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" "${isofs_dir}/shellia32.efi"
1025+
fi
1026+
1027+
_msg_info "Done!"
1028+
}
1029+
9041030
_validate_requirements_bootmode_bios.syslinux.mbr() {
9051031
# bios.syslinux.mbr requires bios.syslinux.eltorito
9061032
# shellcheck disable=SC2076
@@ -944,12 +1070,7 @@ _validate_requirements_bootmode_bios.syslinux.eltorito() {
9441070
_validate_requirements_bootmode_bios.syslinux.mbr
9451071
}
9461072

947-
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
948-
# shellcheck disable=SC2076
949-
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.esp ' ]]; then
950-
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-x64.grub.esp!" 0
951-
fi
952-
1073+
_validate_requirements_common_systemd-boot() {
9531074
# Check if mkfs.fat is available
9541075
if ! command -v mkfs.fat &>/dev/null; then
9551076
(( validation_error=validation_error+1 ))
@@ -989,6 +1110,14 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
9891110
fi
9901111
}
9911112

1113+
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
1114+
# shellcheck disable=SC2076
1115+
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.esp ' ]]; then
1116+
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-x64.grub.esp!" 0
1117+
fi
1118+
_validate_requirements_common_systemd-boot
1119+
}
1120+
9921121
_validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
9931122
# shellcheck disable=SC2076
9941123
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.eltorito ' ]]; then
@@ -999,6 +1128,25 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
9991128
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp
10001129
}
10011130

1131+
_validate_requirements_bootmode_uefi-ia32.systemd-boot.esp() {
1132+
# shellcheck disable=SC2076
1133+
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.grub.esp ' ]]; then
1134+
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-ia32.grub.esp!" 0
1135+
fi
1136+
1137+
_validate_requirements_common_systemd-boot
1138+
}
1139+
1140+
_validate_requirements_bootmode_uefi-ia32.systemd-boot.eltorito() {
1141+
# shellcheck disable=SC2076
1142+
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
1143+
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-ia32.grub.eltorito!" 0
1144+
fi
1145+
1146+
# uefi-ia32.systemd-boot.eltorito has the exact same requirements as uefi-ia32.systemd-boot.esp
1147+
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp
1148+
}
1149+
10021150
_validate_requirements_bootmode_uefi-ia32.grub.esp() {
10031151
# Check if GRUB is available
10041152
if ! command -v grub-mkstandalone &>/dev/null; then
@@ -1722,8 +1870,9 @@ _make_version() {
17221870
fi
17231871
if [[ "${buildmode}" == "iso" ]]; then
17241872
# Write grubenv with version information to ISO 9660
1725-
# TODO: after sufficient time has passed, do not create this file anymore when GRUB boot modes are used.
1726-
# _make_common_bootmode_grub_cfg already creates ${isofs_dir}/boot/grub/grubenv
1873+
# TODO: after sufficient time has passed, do not create this file anymore.
1874+
# _make_common_bootmode_grub_cfg and _make_common_grubenv_and_loopbackcfg already create a
1875+
# ${isofs_dir}/boot/grub/grubenv file
17271876
rm -f -- "${isofs_dir}/${install_dir}/grubenv"
17281877
printf '%.1024s' "$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\n%s' \
17291878
"${iso_name}" "${iso_version}" "$(printf '%0.1s' "#"{1..1024})")" \

mkarchiso-changes.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
re-merge upstream changes from 2023-08-29
1+
re-merge upstream changes from 2024.01.25
2+
```
3+
Version: archiso 75-1
4+
```
5+
6+
Fixing issue with changed license package (path changes) [January 2024]
7+
```
8+
install -m 0644 -- "${pacstrap_dir}/usr/share/licenses/spdx/GPL-2.0-only.txt" "${isofs_dir}/boot/memtest86+/"
9+
```
10+
11+
re-merge upstream changes from 2023.08.29
212
```
313
Version: archiso 72-1
414
```

packages.x86_64

-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ python-capng
183183
## Live iso specific
184184
arch-install-scripts
185185
memtest86+
186-
memtest86+-efi
187186
mkinitcpio-archiso
188187
mkinitcpio-nfs-utils
189188
pv

profiledef.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildmodes=('iso')
1111
quiet="n"
1212
work_dir="work"
1313
out_dir="out"
14-
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
14+
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito' 'uefi-ia32.systemd-boot.eltorito' 'uefi-ia32.systemd-boot.esp')
1515

1616
arch="x86_64"
1717
pacman_conf="airootfs/etc/pacman.conf"

0 commit comments

Comments
 (0)