- Add nvidia/nvidia-dkms/nvidia-libs-32bit/nvidia-vaapi-driver to niri live and installed profiles; wireless-regdb and sof-firmware to all profiles (fixes regulatory.db and SOF firmware dmesg errors) - iso/postsetup-nvidia.sh: new mklive -x hook that re-runs dracut inside the rootfs chroot after the overlay is applied; ensures the squashfs initramfs includes nvidia.ko and omits nouveau.ko at build time — no driver install needed at runtime (fixes /run tmpfs overflow that was killing wireplumber by corrupting D-Bus sockets) - Both ISO inner build scripts gain -x postsetup-nvidia.sh and the nonfree repo flag so nvidia packages resolve correctly - niri config: wireplumber started via supervisor loop (waits for PipeWire socket, auto-restarts on crash) replacing the one-shot exec — survives any D-Bus or pipewire disruption - build-niri-live-iso.sh: NVIDIA modprobe blacklist-nouveau.conf, btusb-quirks.conf, modules-load.d/nvidia.conf, dracut/10-nvidia.conf, Xorg intel/nvidia configs, prime-run helper, elogind run script loop guard, timezone Europe/Zurich overlay, updated BOOT_CMDLINE - build-live-iso.sh: same NVIDIA + timezone + sound udev rule overlays; live-setup.sh timezone and audio group fix - installer/lib/grub.sh: GRUB_CMDLINE_LINUX_DEFAULT gains nvidia-drm.modeset=1 rd.driver.blacklist=nouveau btusb.enable_autosuspend=0 - installer/lib/postinstall.sh: configure_nvidia_prime() adds blacklist-nouveau.conf, btusb-quirks.conf, dracut omit_drivers nouveau, modules-load.d with all four nvidia modules
57 lines
1.8 KiB
Bash
Executable File
57 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# GRUB UEFI install with dual-boot (Windows on /dev/nvme0n1p3 via os-prober).
|
|
|
|
# shellcheck source=common.sh
|
|
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
|
|
|
install_grub() {
|
|
step "Installing GRUB (UEFI, bootloader-id=$BOOTLOADER_ID)"
|
|
|
|
local TARGET="${TARGET:-/mnt}"
|
|
|
|
if ! is_uefi; then
|
|
die "non-UEFI boot detected; this installer only supports UEFI"
|
|
fi
|
|
|
|
# Configure /etc/default/grub
|
|
cat > "$TARGET/etc/default/grub" <<'GRUBEOF'
|
|
GRUB_DEFAULT=0
|
|
GRUB_TIMEOUT=5
|
|
GRUB_DISTRIBUTOR="Void"
|
|
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 nvidia-drm.modeset=1 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau btusb.enable_autosuspend=0"
|
|
GRUB_CMDLINE_LINUX=""
|
|
GRUB_DISABLE_OS_PROBER=false
|
|
GRUB_TERMINAL_OUTPUT="gfxterm"
|
|
GRUB_GFXMODE=auto
|
|
GRUBEOF
|
|
|
|
# Make sure os-prober can see the NTFS partitions to enumerate Windows.
|
|
run_chroot "modprobe efivarfs 2>/dev/null || true"
|
|
run_chroot "xbps-install -y os-prober ntfs-3g >/dev/null 2>&1 || true"
|
|
|
|
run_chroot "grub-install \
|
|
--target=x86_64-efi \
|
|
--efi-directory=/boot/efi \
|
|
--bootloader-id='$BOOTLOADER_ID' \
|
|
--recheck"
|
|
|
|
# Ensure os-prober actually runs (some hosts skip it without this).
|
|
mkdir -p "$TARGET/etc/grub.d"
|
|
|
|
# Generate config
|
|
run_chroot "grub-mkconfig -o /boot/grub/grub.cfg"
|
|
|
|
# Verify Windows entry was found (best-effort, non-fatal in test mode)
|
|
if grep -q -i 'windows\|microsoft' "$TARGET/boot/grub/grub.cfg"; then
|
|
ok "Windows boot entry detected in grub.cfg"
|
|
else
|
|
if [[ "${TEST_MODE:-0}" == "1" ]]; then
|
|
log "no Windows entry (expected in test mode)"
|
|
else
|
|
warn "no Windows entry in grub.cfg — os-prober may have failed; you can re-run grub-mkconfig later"
|
|
fi
|
|
fi
|
|
|
|
ok "GRUB installed"
|
|
}
|