Compare commits

...

10 commits

Author SHA1 Message Date
Tobias Powalowski
c296588252 replace initramfs with mkinitcpio in message 2024-09-05 15:48:59 +02:00
Tobias Powalowski
39d47141a3 remove bootloader_systemd_services 2024-09-05 15:17:21 +02:00
Tobias Powalowski
446c296c72 update CHANGELOG 2024-09-05 15:04:57 +02:00
Tobias Powalowski
f1fbbf1476 fixup dialog for #3 2024-09-05 15:02:54 +02:00
Tobias Powalowski
89226c4719 switching to mkinitcpio building uki addresing #3 2024-09-05 14:59:38 +02:00
Tobias Powalowski
6caf4a0079 switching to mkinitcpio building uki addresing #3 2024-09-05 14:57:44 +02:00
Tobias Powalowski
f73dfdd393 switch to mkinitcpio handling uki rebuild 2024-09-05 14:46:51 +02:00
Tobias Powalowski
769a4e1e87 change uki name to mkinitcpio default name 2024-09-05 11:45:05 +02:00
Tobias Powalowski
2fd1e969a3 update CHANGELOG 2024-09-05 11:29:08 +02:00
Tobias Powalowski
6937c1a5e1 fix limine 8.0 syntax change fixes issue #4 2024-09-05 11:27:37 +02:00
8 changed files with 29 additions and 50 deletions

View file

@ -7,6 +7,9 @@ Highlights 2024.08:
Environment:
- updated and unified usage information in all scripts
- 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:
- kernel 6.10.x

View file

@ -19,7 +19,6 @@
. /usr/lib/archboot/installer/bootloader_uboot.sh
. /usr/lib/archboot/installer/bootloader_uki.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/configuration.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"
sleep 2
_AUTO_MKINITCPIO=1
_run_mkinitcpio | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Rebuilding initramfs on installed system..." 6 75 0
_run_mkinitcpio | _dialog --title " Logging to ${_VC} | ${_LOG} " --gauge "Running mkinitcpio on installed system..." 6 75 0
_mkinitcpio_error
_printk on
fi

View file

@ -12,16 +12,16 @@ _limine_common() {
_limine_config() {
_PARTN="$(${_LSBLK} PARTN "${_BOOTDEV}")"
cat << CONFEOF > "${_LIMINE_CONFIG}"
TIMEOUT=5
timeout: 5
:Arch Linux
PROTOCOL=linux
KERNEL_PATH=boot://${_PARTN}/${_VMLINUZ}
CMDLINE=${_KERNEL_PARAMS_MOD}
MODULE_PATH=boot://${_PARTN}/${_INITRAMFS}
/Arch Linux
protocol: linux
kernel_path: boot(${_PARTN}):/${_VMLINUZ}
cmdline: ${_KERNEL_PARAMS_MOD}
module_path: boot(${_PARTN}):/${_INITRAMFS}
CONFEOF
## Edit limine.cfg config file
_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
## Edit limine.conf 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
_geteditor || return 1
"${_EDITOR}" "${_LIMINE_CONFIG}"
}
@ -36,7 +36,7 @@ _limine_bios() {
return 1
fi
_dialog --no-mouse --infobox "Setting up LIMINE BIOS now..." 3 60
_LIMINE_CONFIG="${_DESTDIR}/boot/limine.cfg"
_LIMINE_CONFIG="${_DESTDIR}/boot/limine.conf"
_VMLINUZ="${_SUBDIR}/${_VMLINUZ}"
_INITRAMFS="${_SUBDIR}/${_INITRAMFS}"
_limine_config
@ -61,7 +61,7 @@ _limine_uefi() {
_dialog --no-mouse --infobox "Setting up LIMINE now..." 3 60
[[ -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"
_LIMINE_CONFIG="${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/limine.cfg"
_LIMINE_CONFIG="${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/limine.conf"
_limine_config
if [[ -e "${_DESTDIR}/${_UEFISYS_MP}/EFI/BOOT/LIMINE${_UEFI_ARCH}.EFI" ]]; then
_BOOTMGR_LABEL="LIMINE"

View file

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

View file

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

View file

@ -187,7 +187,7 @@ _download_latest_task() {
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_limine.sh bootloader_pacman_hooks.sh bootloader_refind.sh \
bootloader_systemd_services.sh bootloader_uboot.sh btrfs.sh common.sh \
bootloader_uboot.sh btrfs.sh common.sh \
configuration.sh mountpoints.sh pacman.sh partition.sh storage.sh"
for i in ${LIBS}; do
${_DLPROG} -o "${_INST}/${i}" "${_SOURCE}${_INST}/${i}?inline=false"