Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch: handle more boot paths for installs #247

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packaging/arch/regenerate_images
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@
# find out all installed kernels
mapfile -d '' kernels < <(find /usr/lib/modules -maxdepth 1 -type d ! -name "modules" -print0)

# paths to boot partition for the initramfs image and kernel
boot_paths=("/efi" "/boot")
Copy link
Contributor Author

@c3Ls1US c3Ls1US Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/boot/efi is technically also a valid boot partition path for systemd and from the mkinitcpio presets it appears Arch Linux assumes /efi by default. Since boot paths should be distribution dependent, choosing not to include /boot/efi


for kernel in "${kernels[@]}"; do
if ! pacman -Qqo "${kernel}/pkgbase" > /dev/null 2>&1; then
# if pkgbase does not belong to any package then skip this kernel
continue
fi
read -r pkgbase < "${kernel}/pkgbase"

booster build --force --kernel-version ${kernel##/usr/lib/modules/} /boot/booster-${pkgbase}.img &
install -Dm644 "${kernel}/vmlinuz" "/boot/vmlinuz-${pkgbase}"
# build and install the image and kernel at all boot paths
for path in "${boot_paths[@]}"; do
if [ -d "${path}" ] && [ -w "${path}" ]; then
booster build --force --kernel-version "${kernel##/usr/lib/modules/}" "$path"/booster-"${pkgbase}".img &
install -Dm644 "${kernel}/vmlinuz" "${path}/vmlinuz-${pkgbase}"
fi
done
done

wait