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:
@@ -1,13 +1,15 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Purpose : The end of install.sh: say the install worked, say whether to
|
||||
# reboot and offer to, and offer configure if something is still to do. refresh
|
||||
# reboot and offer to (not while the initramfs doesn't build),
|
||||
# and offer configure if something is still to do. refresh
|
||||
# runs install.sh too, so it may all be done already; the install
|
||||
# still ends by saying it worked, so it can't be taken for a failure.
|
||||
|
||||
# install.sh is usually piped into bash, so ask on the terminal
|
||||
TTY="${COREDESKTOP_TTY:-/dev/tty}"
|
||||
CONFIGURE="$HOME/.local/bin/configure"
|
||||
source "$(dirname "$0")/../utils.sh"
|
||||
CONFIGURE_HINT="configure connects to your Federated Core, sets up backups and signs you in to the AI agents."
|
||||
|
||||
echo
|
||||
@@ -15,8 +17,18 @@ echo -e "\e[32mCoreDesktop is installed.\e[0m"
|
||||
|
||||
# If the running kernel's modules are gone, a newer kernel was installed during
|
||||
# this run. configure waits for the reboot: until then, modules it needs, such
|
||||
# as Tailscale's tun and davfs2's fuse, can't be loaded.
|
||||
if [ ! -d "/usr/lib/modules/$(uname -r)" ]; then
|
||||
# as Tailscale's tun and davfs2's fuse, can't be loaded. The reboot waits for
|
||||
# the initramfs to build.
|
||||
if initramfs_build_failed; then
|
||||
# check_initramfs (install.sh) has said why; offering a reboot now could
|
||||
# leave the computer unable to start
|
||||
echo -e "\e[31mDon't reboot yet: the initramfs doesn't build (see above, or $PACMAN_UPDATE_LOG).\e[0m"
|
||||
if [ ! -d "/usr/lib/modules/$(uname -r)" ]; then
|
||||
echo "Once it builds (sudo mkinitcpio -P), reboot, then run: configure"
|
||||
echo "$CONFIGURE_HINT"
|
||||
exit 0
|
||||
fi
|
||||
elif [ ! -d "/usr/lib/modules/$(uname -r)" ]; then
|
||||
echo "A newer kernel has been installed. Reboot, then run: configure"
|
||||
echo "$CONFIGURE_HINT"
|
||||
# The same as the system menu's restart: an active desktop session needs no password
|
||||
@@ -26,8 +38,9 @@ if [ ! -d "/usr/lib/modules/$(uname -r)" ]; then
|
||||
systemctl reboot || echo "Couldn't reboot. Restart from the system menu instead."
|
||||
fi
|
||||
exit 0
|
||||
else
|
||||
echo "Kernel is up to date, no reboot needed. You may want to consider a reboot if other significant software was updated or installed."
|
||||
fi
|
||||
echo "Kernel is up to date, no reboot needed. You may want to consider a reboot if other significant software was updated or installed."
|
||||
|
||||
if "$CONFIGURE" --list | grep -q '^to do'; then
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user