From b93580ba3b753597753a08dba131d5cd55f37af9 Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Thu, 5 Mar 2026 04:55:55 -0800 Subject: [PATCH] Working on it... --- export-iso/03-finalise/01-run.sh | 15 ++++++++++++--- stage1/01-sys-tweaks/00-patches/01-bashrc.diff | 2 +- .../00-patches-arm-only/02-inputrc.diff | 2 +- stage2/01-sys-tweaks/00-patches/01-useradd.diff | 2 +- stage2/01-sys-tweaks/00-patches/03-path.diff | 1 - 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/export-iso/03-finalise/01-run.sh b/export-iso/03-finalise/01-run.sh index 5ecc96d..683079e 100644 --- a/export-iso/03-finalise/01-run.sh +++ b/export-iso/03-finalise/01-run.sh @@ -42,9 +42,18 @@ mkdir -p "${ISO_TEMP_DIR}/boot/grub" mkdir -p "${ISO_TEMP_DIR}/live" mkdir -p "${ISO_TEMP_DIR}/EFI/boot" -# Copy kernel and initrd (resolving symlinks) -cp -L "${ROOTFS_DIR}/boot/vmlinuz" "${ISO_TEMP_DIR}/boot/vmlinuz" -cp -L "${ROOTFS_DIR}/boot/initrd.img" "${ISO_TEMP_DIR}/boot/initrd.img" +# Copy kernel and initrd — prefer the vmlinuz symlink, fall back to the versioned file +VMLINUZ=$(readlink -f "${ROOTFS_DIR}/boot/vmlinuz" 2>/dev/null || ls "${ROOTFS_DIR}/boot/vmlinuz-"* 2>/dev/null | sort -V | tail -1) +INITRD=$(readlink -f "${ROOTFS_DIR}/boot/initrd.img" 2>/dev/null || ls "${ROOTFS_DIR}/boot/initrd.img-"* 2>/dev/null | sort -V | tail -1) + +if [ -z "${VMLINUZ}" ] || [ ! -f "${VMLINUZ}" ]; then + echo "ERROR: Could not find kernel in ${ROOTFS_DIR}/boot/" + ls "${ROOTFS_DIR}/boot/" || true + exit 1 +fi + +cp "${VMLINUZ}" "${ISO_TEMP_DIR}/boot/vmlinuz" +cp "${INITRD}" "${ISO_TEMP_DIR}/boot/initrd.img" # Copy GRUB EFI binary from chroot cp "${ROOTFS_DIR}/tmp/grub-standalone/bootx64.efi" "${ISO_TEMP_DIR}/EFI/boot/bootx64.efi" diff --git a/stage1/01-sys-tweaks/00-patches/01-bashrc.diff b/stage1/01-sys-tweaks/00-patches/01-bashrc.diff index ddeae53..86d351f 100644 --- a/stage1/01-sys-tweaks/00-patches/01-bashrc.diff +++ b/stage1/01-sys-tweaks/00-patches/01-bashrc.diff @@ -30,4 +30,4 @@ + alias egrep='egrep --color=auto' fi - # colored GCC warnings and errors \ No newline at end of file + # colored GCC warnings and errors diff --git a/stage2/01-sys-tweaks/00-patches-arm-only/02-inputrc.diff b/stage2/01-sys-tweaks/00-patches-arm-only/02-inputrc.diff index a031b5f..1da12c5 100644 --- a/stage2/01-sys-tweaks/00-patches-arm-only/02-inputrc.diff +++ b/stage2/01-sys-tweaks/00-patches-arm-only/02-inputrc.diff @@ -7,4 +7,4 @@ + +# mappings for up and down arrows search history +# "\e[B": history-search-forward -+# "\e[A": history-search-backward \ No newline at end of file ++# "\e[A": history-search-backward diff --git a/stage2/01-sys-tweaks/00-patches/01-useradd.diff b/stage2/01-sys-tweaks/00-patches/01-useradd.diff index bc60a2d..cc3476b 100644 --- a/stage2/01-sys-tweaks/00-patches/01-useradd.diff +++ b/stage2/01-sys-tweaks/00-patches/01-useradd.diff @@ -17,4 +17,4 @@ +SKEL=/etc/skel # # Defines whether the mail spool should be created while - # creating the account \ No newline at end of file + # creating the account diff --git a/stage2/01-sys-tweaks/00-patches/03-path.diff b/stage2/01-sys-tweaks/00-patches/03-path.diff index 462f5db..29c5ee5 100644 --- a/stage2/01-sys-tweaks/00-patches/03-path.diff +++ b/stage2/01-sys-tweaks/00-patches/03-path.diff @@ -19,4 +19,3 @@ + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games" fi export PATH - \ No newline at end of file