Compare commits

..

No commits in common. "c296588252da02eac7023f138a81d819f7c51ee7" and "b1c5d41e499ca369f7909c8bef0d48505f2417b0" have entirely different histories.

8 changed files with 50 additions and 29 deletions

View file

@ -7,9 +7,6 @@ Highlights 2024.08:
Environment: Environment:
- updated and unified usage information in all scripts - updated and unified usage information in all scripts
- added bash completion for restore-usbstick.sh and clean-blockdevice.sh - added bash completion for restore-usbstick.sh and clean-blockdevice.sh
setup:
- switched to mkinitcpio handle UKI creation #3
- added new limine config syntax issue #4
--- ---
Highlights 2024.07: Highlights 2024.07:
- kernel 6.10.x - kernel 6.10.x

View file

@ -19,6 +19,7 @@
. /usr/lib/archboot/installer/bootloader_uboot.sh . /usr/lib/archboot/installer/bootloader_uboot.sh
. /usr/lib/archboot/installer/bootloader_uki.sh . /usr/lib/archboot/installer/bootloader_uki.sh
. /usr/lib/archboot/installer/bootloader_pacman_hooks.sh . /usr/lib/archboot/installer/bootloader_pacman_hooks.sh
. /usr/lib/archboot/installer/bootloader_systemd_services.sh
. /usr/lib/archboot/installer/btrfs.sh . /usr/lib/archboot/installer/btrfs.sh
. /usr/lib/archboot/installer/configuration.sh . /usr/lib/archboot/installer/configuration.sh
. /usr/lib/archboot/installer/mountpoints.sh . /usr/lib/archboot/installer/mountpoints.sh

View file

@ -249,7 +249,7 @@ _auto_mkinitcpio() {
[[ -e "${_DESTDIR}/boot/initramfs-linux-fallback.img" ]] && rm -f "${_DESTDIR}/boot/initramfs-linux-fallback.img" [[ -e "${_DESTDIR}/boot/initramfs-linux-fallback.img" ]] && rm -f "${_DESTDIR}/boot/initramfs-linux-fallback.img"
sleep 2 sleep 2
_AUTO_MKINITCPIO=1 _AUTO_MKINITCPIO=1
_run_mkinitcpio | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Running mkinitcpio on installed system..." 6 75 0 _run_mkinitcpio | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Rebuilding initramfs on installed system..." 6 75 0
_mkinitcpio_error _mkinitcpio_error
_printk on _printk on
fi fi

View file

@ -12,16 +12,16 @@ _limine_common() {
_limine_config() { _limine_config() {
_PARTN="$(${_LSBLK} PARTN "${_BOOTDEV}")" _PARTN="$(${_LSBLK} PARTN "${_BOOTDEV}")"
cat << CONFEOF > "${_LIMINE_CONFIG}" cat << CONFEOF > "${_LIMINE_CONFIG}"
timeout: 5 TIMEOUT=5
/Arch Linux :Arch Linux
protocol: linux PROTOCOL=linux
kernel_path: boot(${_PARTN}):/${_VMLINUZ} KERNEL_PATH=boot://${_PARTN}/${_VMLINUZ}
cmdline: ${_KERNEL_PARAMS_MOD} CMDLINE=${_KERNEL_PARAMS_MOD}
module_path: boot(${_PARTN}):/${_INITRAMFS} MODULE_PATH=boot://${_PARTN}/${_INITRAMFS}
CONFEOF CONFEOF
## Edit limine.conf config file ## Edit limine.cfg config file
_dialog --msgbox "You will now be put into the editor to edit:\nlimine.conf\n\nAfter you save your changes, exit the editor." 8 50 _dialog --msgbox "You will now be put into the editor to edit:\nlimine.cfg\n\nAfter you save your changes, exit the editor." 8 50
_geteditor || return 1 _geteditor || return 1
"${_EDITOR}" "${_LIMINE_CONFIG}" "${_EDITOR}" "${_LIMINE_CONFIG}"
} }
@ -36,7 +36,7 @@ _limine_bios() {
return 1 return 1
fi fi
_dialog --no-mouse --infobox "Setting up LIMINE BIOS now..." 3 60 _dialog --no-mouse --infobox "Setting up LIMINE BIOS now..." 3 60
_LIMINE_CONFIG="${_DESTDIR}/boot/limine.conf" _LIMINE_CONFIG="${_DESTDIR}/boot/limine.cfg"
_VMLINUZ="${_SUBDIR}/${_VMLINUZ}" _VMLINUZ="${_SUBDIR}/${_VMLINUZ}"
_INITRAMFS="${_SUBDIR}/${_INITRAMFS}" _INITRAMFS="${_SUBDIR}/${_INITRAMFS}"
_limine_config _limine_config
@ -61,7 +61,7 @@ _limine_uefi() {
_dialog --no-mouse --infobox "Setting up LIMINE now..." 3 60 _dialog --no-mouse --infobox "Setting up LIMINE now..." 3 60
[[ -d "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT" ]] || mkdir -p "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/" [[ -d "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT" ]] || mkdir -p "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/"
cp -f "${_DESTDIR}/usr/share/limine/BOOT${_UEFI_ARCH}.EFI" "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/LIMINE${_UEFI_ARCH}.EFI" cp -f "${_DESTDIR}/usr/share/limine/BOOT${_UEFI_ARCH}.EFI" "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/LIMINE${_UEFI_ARCH}.EFI"
_LIMINE_CONFIG="${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/limine.conf" _LIMINE_CONFIG="${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/limine.cfg"
_limine_config _limine_config
if [[ -e "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/LIMINE${_UEFI_ARCH}.EFI" ]]; then if [[ -e "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/LIMINE${_UEFI_ARCH}.EFI" ]]; then
_BOOTMGR_LABEL="LIMINE" _BOOTMGR_LABEL="LIMINE"

View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org>
_uki_autobuild() {
sleep 2
_progress "50" "Enable automatic UKI creation on installed system..."
cat << CONFEOF > "${_DESTDIR}/etc/systemd/system/run_ukify.path"
[Unit]
Description=Run systemd ukify
[Path]
PathChanged=/boot/${_INITRAMFS}
PathChanged=/boot/${_UCODE}
Unit=run_ukify.service
[Install]
WantedBy=multi-user.target
CONFEOF
cat << CONFEOF > "${_DESTDIR}/etc/systemd/system/run_ukify.service"
[Unit]
Description=Run systemd ukify
[Service]
Type=oneshot
ExecStart="/usr/lib/systemd/ukify build --config=/etc/ukify.conf --output ${_UEFISYS_MP}/EFI/Linux/archlinux-linux.efi"
CONFEOF
${_NSPAWN} systemctl enable run_ukify.path &>"${_NO_LOG}"
}

View file

@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
_uki_config() { _uki_config() {
_UKIFY_CONFIG="${_DESTDIR}/etc/kernel/uki.conf" _UKIFY_CONFIG="${_DESTDIR}/etc/ukify.conf"
_CMDLINE="${_DESTDIR}/etc/kernel/cmdline" _CMDLINE="${_DESTDIR}/etc/kernel/cmdline"
echo "${_KERNEL_PARAMS_MOD}" > "${_CMDLINE}" echo "${_KERNEL_PARAMS_MOD}" > "${_CMDLINE}"
echo "[UKI]" > "${_UKIFY_CONFIG}" echo "[UKI]" > "${_UKIFY_CONFIG}"
@ -18,16 +18,17 @@ OSRelease=@/etc/os-release
Splash=/usr/share/systemd/bootctl/splash-arch.bmp Splash=/usr/share/systemd/bootctl/splash-arch.bmp
CONFEOF CONFEOF
mkdir -p "${_DESTDIR}/${_UEFISYS_MP}/EFI/Linux" mkdir -p "${_DESTDIR}/${_UEFISYS_MP}/EFI/Linux"
_dialog --msgbox "You will now be put into the editor to edit:\n- kernel commandline config file\n- uki config file\n\nAfter you save your changes, exit the editor." 9 50 _dialog --msgbox "You will now be put into the editor to edit:\n- kernel commandline config file\n- ukify.conf config file\n\nAfter you save your changes, exit the editor." 9 50
} }
_uki_install() { _uki_install() {
_uki_autobuild
_BOOTMGR_LABEL="Arch Linux - Unified Kernel Image" _BOOTMGR_LABEL="Arch Linux - Unified Kernel Image"
_BOOTMGR_LOADER_PATH="/EFI/Linux/arch-linux.efi" _BOOTMGR_LOADER_PATH="/EFI/Linux/archlinux-linux.efi"
_uefi_bootmgr_setup _uefi_bootmgr_setup
mkdir -p "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT" mkdir -p "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT"
rm -f "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/BOOT${_UEFI_ARCH}.EFI" rm -f "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/BOOT${_UEFI_ARCH}.EFI"
cp -f "${_DESTDIR}/${_UEFISYS_MP}/EFI/Linux/arch-linux.efi" "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/BOOT${_UEFI_ARCH}.EFI" cp -f "${_DESTDIR}/${_UEFISYS_MP}/EFI/Linux/archlinux-linux.efi" "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/BOOT${_UEFI_ARCH}.EFI"
sleep 2 sleep 2
_progress "100" "Unified Kernel Image has been setup successfully." _progress "100" "Unified Kernel Image has been setup successfully."
sleep 2 sleep 2
@ -44,11 +45,8 @@ _uki_uefi() {
_geteditor || return 1 _geteditor || return 1
"${_EDITOR}" "${_CMDLINE}" "${_EDITOR}" "${_CMDLINE}"
"${_EDITOR}" "${_UKIFY_CONFIG}" "${_EDITOR}" "${_UKIFY_CONFIG}"
# enable uki handling in presets ${_NSPAWN} /usr/lib/systemd/ukify build --config=/etc/ukify.conf --output "${_UEFISYS_MP}"/EFI/Linux/archlinux-linux.efi >>"${_LOG}"
sd '#default_uki' 'default_uki' "${_DESTDIR}"/etc/mkinitcpio.d/*.preset if [[ -e "${_DESTDIR}/${_UEFISYS_MP}/EFI/Linux/archlinux-linux.efi" ]]; then
_run_mkinitcpio | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Running mkinitcpio on installed system..." 6 75 0
_mkinitcpio_error
if [[ -e "${_DESTDIR}/${_UEFISYS_MP}/EFI/Linux/arch-linux.efi" ]]; then
_uki_install | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Setting up Unified Kernel Image..." 6 75 0 _uki_install | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Setting up Unified Kernel Image..." 6 75 0
else else
_dialog --title " ERROR " --no-mouse --infobox "Setting up Unified Kernel Image failed!" 3 60 _dialog --title " ERROR " --no-mouse --infobox "Setting up Unified Kernel Image failed!" 3 60

View file

@ -15,15 +15,15 @@ _mkinitcpio() {
_run_mkinitcpio() { _run_mkinitcpio() {
_chroot_mount _chroot_mount
echo "Mkinitcpio progress..." > /tmp/mkinitcpio.log echo "Initramfs progress..." > /tmp/mkinitcpio.log
: > /.archboot : > /.archboot
_mkinitcpio & _mkinitcpio &
_progress_wait "0" "99" "Running mkinitcpio on installed system..." "0.1" _progress_wait "0" "99" "Rebuilding initramfs on installed system..." "0.1"
if [[ -e "/tmp/.mkinitcpio-success" ]]; then if [[ -e "/tmp/.mkinitcpio-success" ]]; then
_progress "100" "Mkinitcpio complete." 6 75 _progress "100" "Rebuilding initramfs complete." 6 75
sleep 2 sleep 2
else else
_progress "100" "Mkinitcpio failed." 6 75 _progress "100" "Rebuilding initramfs failed." 6 75
sleep 2 sleep 2
fi fi
_chroot_umount _chroot_umount
@ -47,7 +47,7 @@ _run_locale_gen() {
_set_mkinitcpio() { _set_mkinitcpio() {
${_EDITOR} "${_DESTDIR}""${_FILE}" ${_EDITOR} "${_DESTDIR}""${_FILE}"
_run_mkinitcpio | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Running mkinitcpio on installed system..." 6 75 0 _run_mkinitcpio | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Rebuilding initramfs on installed system..." 6 75 0
_mkinitcpio_error _mkinitcpio_error
} }

View file

@ -187,7 +187,7 @@ _download_latest_task() {
LIBS="autoconfiguration.sh quicksetup.sh base.sh bcachefs.sh blockdevices.sh bootloader.sh \ LIBS="autoconfiguration.sh quicksetup.sh base.sh bcachefs.sh blockdevices.sh bootloader.sh \
bootloader_sb.sh bootloader_grub.sh bootloader_uki.sh bootloader_systemd_bootd.sh \ bootloader_sb.sh bootloader_grub.sh bootloader_uki.sh bootloader_systemd_bootd.sh \
bootloader_limine.sh bootloader_pacman_hooks.sh bootloader_refind.sh \ bootloader_limine.sh bootloader_pacman_hooks.sh bootloader_refind.sh \
bootloader_uboot.sh btrfs.sh common.sh \ bootloader_systemd_services.sh bootloader_uboot.sh btrfs.sh common.sh \
configuration.sh mountpoints.sh pacman.sh partition.sh storage.sh" configuration.sh mountpoints.sh pacman.sh partition.sh storage.sh"
for i in ${LIBS}; do for i in ${LIBS}; do
${_DLPROG} -o "${_INST}/${i}" "${_SOURCE}${_INST}/${i}?inline=false" ${_DLPROG} -o "${_INST}/${i}" "${_SOURCE}${_INST}/${i}?inline=false"