Build a failed initramfs again, and don't offer a reboot until it builds
When mkinitcpio fails during an update or install, run it once more. If that fails too, say why (a full /boot, a hook or module that isn't installed) and don't offer a reboot. The install now logs its upgrade and checks the build before finish-install offers one, and nvidia.sh's rebuild no longer stops the install. A failed build is carried into the next update's log, so it's rebuilt and checked until it builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -58,10 +58,11 @@ install_packages "${PACKAGES[@]}"
|
||||
sudo install -d -m 755 /etc/mkinitcpio.conf.d
|
||||
echo 'MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)' \
|
||||
| sudo tee /etc/mkinitcpio.conf.d/nvidia.conf > /dev/null
|
||||
sudo mkinitcpio -P
|
||||
# Logged, so install.sh's check_initramfs tries again and explains if it fails
|
||||
rebuild_initramfs || true
|
||||
|
||||
# GDM only offers Wayland on NVIDIA when these are enabled, since without them
|
||||
# the GPU loses its memory contents across suspend
|
||||
sudo systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service
|
||||
|
||||
echo "NVIDIA driver installed. Reboot to start using it."
|
||||
initramfs_build_failed || echo "NVIDIA driver installed. Reboot to start using it."
|
||||
|
||||
Reference in New Issue
Block a user