mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 03:20:38 +02:00
Compare commits
10 commits
b1c5d41e49
...
c296588252
Author | SHA1 | Date | |
---|---|---|---|
|
c296588252 | ||
|
39d47141a3 | ||
|
446c296c72 | ||
|
f1fbbf1476 | ||
|
89226c4719 | ||
|
6caf4a0079 | ||
|
f73dfdd393 | ||
|
769a4e1e87 | ||
|
2fd1e969a3 | ||
|
6937c1a5e1 |
8 changed files with 29 additions and 50 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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}"
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue