From 5ee120158e04f74594efff931ce4e0841d3f0895 Mon Sep 17 00:00:00 2001 From: Michael Chus Date: Mon, 30 Mar 2026 23:03:42 +0300 Subject: [PATCH] fix(build): remove unused variant package lists before lb build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit live-build picks up ALL .list.chroot files in config/package-lists/. After rsync, bee-nvidia.list.chroot, bee-amd.list.chroot, and bee-nogpu.list.chroot all end up in BUILD_WORK_DIR — causing lb to try installing packages from every variant (and leaving version placeholders unsubstituted in the unused lists). Fix: after copying bee-${BEE_GPU_VENDOR}.list.chroot → bee-gpu.list.chroot, delete all other bee-{nvidia,amd,nogpu}.list.chroot from BUILD_WORK_DIR. Also includes nomsi boot mode changes (bee-nvidia-load + grub.cfg). Co-Authored-By: Claude Sonnet 4.6 --- iso/builder/build.sh | 6 +++++- iso/builder/config/bootloaders/grub-pc/grub.cfg | 5 +++++ iso/overlay/usr/local/bin/bee-nvidia-load | 11 ++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/iso/builder/build.sh b/iso/builder/build.sh index 3c07e2f..8d69daf 100755 --- a/iso/builder/build.sh +++ b/iso/builder/build.sh @@ -417,9 +417,13 @@ if [ -f "${OVERLAY_STAGE_DIR}/etc/motd" ]; then mv "${OVERLAY_STAGE_DIR}/etc/motd.patched" "${OVERLAY_STAGE_DIR}/etc/motd" fi -# --- copy variant-specific package list into work dir --- +# --- copy variant-specific package list, remove all other variant lists --- +# live-build picks up ALL .list.chroot files — delete other variants to avoid conflicts. cp "${BUILD_WORK_DIR}/config/package-lists/bee-${BEE_GPU_VENDOR}.list.chroot" \ "${BUILD_WORK_DIR}/config/package-lists/bee-gpu.list.chroot" +rm -f "${BUILD_WORK_DIR}/config/package-lists/bee-nvidia.list.chroot" \ + "${BUILD_WORK_DIR}/config/package-lists/bee-amd.list.chroot" \ + "${BUILD_WORK_DIR}/config/package-lists/bee-nogpu.list.chroot" # --- remove archives for the other vendor(s) --- if [ "$BEE_GPU_VENDOR" = "nvidia" ]; then diff --git a/iso/builder/config/bootloaders/grub-pc/grub.cfg b/iso/builder/config/bootloaders/grub-pc/grub.cfg index 3d33e47..71f94c7 100644 --- a/iso/builder/config/bootloaders/grub-pc/grub.cfg +++ b/iso/builder/config/bootloaders/grub-pc/grub.cfg @@ -24,6 +24,11 @@ menuentry "EASY-BEE (NVIDIA GSP=off)" { initrd @INITRD_LIVE@ } +menuentry "EASY-BEE (NVIDIA no MSI-X)" { + linux @KERNEL_LIVE@ @APPEND_LIVE@ nomodeset bee.nvidia.mode=nomsi net.ifnames=0 biosdevname=0 mitigations=off transparent_hugepage=always numa_balancing=disable nowatchdog nosoftlockup + initrd @INITRD_LIVE@ +} + menuentry "EASY-BEE (fail-safe)" { linux @KERNEL_LIVE@ @APPEND_LIVE@ bee.nvidia.mode=gsp-off memtest noapic noapm nodma nomce nolapic nosmp vga=normal net.ifnames=0 biosdevname=0 initrd @INITRD_LIVE@ diff --git a/iso/overlay/usr/local/bin/bee-nvidia-load b/iso/overlay/usr/local/bin/bee-nvidia-load index 4af1448..d20ed33 100755 --- a/iso/overlay/usr/local/bin/bee-nvidia-load +++ b/iso/overlay/usr/local/bin/bee-nvidia-load @@ -67,7 +67,7 @@ case "$nvidia_mode" in load_module nvidia-modeset || true load_module nvidia-uvm || true ;; - gsp-off|safe|*) + gsp-off|safe) # NVIDIA documents that GSP firmware is enabled by default on newer GPUs and can # be disabled via NVreg_EnableGpuFirmware=0. Safe mode keeps the live ISO on the # conservative path for platforms where full boot-time GSP init is unstable. @@ -76,6 +76,15 @@ case "$nvidia_mode" in fi log "GSP-off mode: skipping nvidia-modeset and nvidia-uvm during boot" ;; + nomsi|*) + # nomsi: disable MSI-X/MSI interrupts — use when RmInitAdapter fails with + # "Failed to enable MSI-X" on one or more GPUs (IOMMU group interrupt limits). + # NVreg_EnableMSI=0 forces legacy INTx interrupts for all GPUs. + if ! load_module nvidia NVreg_EnableGpuFirmware=0 NVreg_EnableMSI=0; then + exit 1 + fi + log "nomsi mode: MSI-X disabled (NVreg_EnableMSI=0), skipping nvidia-modeset and nvidia-uvm" + ;; esac # Create /dev/nvidia* device nodes (udev rules absent since we use .run installer)