sodcalculator

10 Tech How-To

Arch Linux Boot Failure & Broken Update Fix Guide

Guide 10-8195 · Updated · Step by step

This guide walks you through diagnosing and fixing boot failures and broken updates on Arch-based Linux systems. You’ll learn how to identify the cause, use the Arch Live ISO to repair your system, and recover from common update-related issues. Before starting, ensure you have a bootable Arch Live USB or CD, and ideally a backup of your important data.

What You’ll Need

  • A bootable Arch Linux Live USB or CD (same architecture as your installed system).
  • Access to a terminal on the live environment.
  • An internet connection (either via Ethernet or Wi-Fi) for downloading packages if needed.
  • Basic familiarity with command-line operations.

Step-by-Step

  1. Boot from the Live USB. Insert the USB and reboot. Access the boot menu (usually by pressing F12, F2, Esc, or Del during startup) and select the USB as the boot device. Choose the option to boot into the live environment.
  2. Connect to the internet. If using Ethernet, it should work automatically. For Wi-Fi, use iwctl (interactive wireless client) to connect: run iwctl, then station wlan0 scan, station wlan0 get-networks, and station wlan0 connect . Enter your Wi-Fi passphrase when prompted.
  3. Mount your root partition. Identify your root partition using lsblk (e.g., /dev/sda2). Mount it to /mnt with mount /dev/sda2 /mnt. If you have separate boot or EFI partitions, mount them as well (e.g., mount /dev/sda1 /mnt/boot or mount /dev/sda1 /mnt/efi).
  4. Chroot into your system. Use arch-chroot /mnt to enter your installed environment. This gives you full access to your system’s files and package manager.
  5. Check for disk errors. Run fsck /dev/sda2 (replace with your root partition) to check for filesystem corruption. If errors are found, allow it to fix them. This can resolve boot issues caused by unclean shutdowns.
  6. Reinstall the kernel and initramfs. Run pacman -S linux linux-headers to reinstall the kernel and headers. Then regenerate the initramfs with mkinitcpio -P. This often fixes boot problems caused by a broken update.
  7. Verify bootloader configuration. If you use GRUB, run grub-mkconfig -o /boot/grub/grub.cfg to regenerate the configuration. For systemd-boot, check that the loader entries in /boot/loader/entries/ point to the correct kernel and initramfs files.
  8. Check for broken packages. Run pacman -Qk to check for missing files. If any packages are flagged, reinstall them with pacman -S .
  9. Update the system. Run pacman -Syu to update all packages to the latest versions. This ensures your system is consistent and resolves any partial upgrade issues.
  10. Reboot. Exit the chroot with exit, unmount all partitions with umount -R /mnt, and reboot. Remove the live USB when prompted. Your system should now boot normally.

Common Mistakes

  • Not mounting the boot/EFI partition before chrooting, leading to missing kernel or initramfs during boot.
  • Running pacman -Syu without first reinstalling the kernel, which can leave the system in an inconsistent state.
  • Forgetting to regenerate the initramfs after a kernel update, causing boot errors.
  • Using the wrong partition device name (e.g., /dev/sda2 vs. /dev/nvme0n1p2). Always verify with lsblk.
  • Not backing up critical data before attempting repairs, leading to data loss if something goes wrong.

Tips

  • Keep a live USB handy at all times—it’s your rescue tool for any Arch system emergency.
  • Before major updates, use pacman -Syu with the --ignore flag to temporarily skip packages you suspect might cause issues.
  • Regularly run pacman -Sc to clean the package cache and avoid disk space issues.
  • Use journalctl -b to check boot logs after a successful boot to understand what went wrong previously.
  • If you use an AUR helper, always update the base system first with pacman -Syu before updating AUR packages.

Troubleshooting

If the system still won’t boot:

  • Check the boot logs. From the live environment, mount your root partition and run journalctl --root=/mnt -b -1 to see the last boot’s logs. Look for errors related to kernel modules, filesystems, or critical services.
  • If you see a kernel panic, try booting with a different kernel (e.g., linux-lts). Install it from the chroot and update your bootloader to use it.
  • If the bootloader itself is missing or corrupted, reinstall it. For GRUB: grub-install /dev/sda (replace with your disk) and then regenerate the config. For systemd-boot: bootctl install.
  • If you suspect a specific package is causing the issue, use pacman -U to downgrade it from a cached version in /var/cache/pacman/pkg.

If you get a ‘filesystem not found’ error:

  • Check that your root partition is correctly identified in the bootloader configuration. You may need to edit the kernel command line to specify the correct root= parameter.
  • If using LVM or LUKS, ensure the necessary hooks are enabled in /etc/mkinitcpio.conf and the initramfs is regenerated.

If you can’t connect to the internet in the live environment:

  • Use dhcpcd for a quick DHCP lease on Ethernet.
  • For Wi-Fi, double-check the SSID and passphrase. Use iwctl again and ensure you’re using the correct network interface (e.g., wlan0).
  • If you have a USB tethering option from your phone, that can work as a fallback.

Frequently Asked Questions

Q: Can I fix a broken update without a live USB?
A: If the system boots to a shell or a fallback mode, you can try pacman -Syu from there. But if the system doesn’t boot at all, a live USB is essential.

Q: What should I do if I accidentally deleted the kernel?
A: Boot from the live USB, chroot, and reinstall the kernel with pacman -S linux. Then regenerate the initramfs and update your bootloader.

Q: How do I know if my boot failure is due to a hardware issue?
A: If you can’t even see the BIOS/UEFI screen, it’s likely hardware. If you see the bootloader but then a kernel panic, it’s likely software. Check the boot logs for clues.

Q: Is it safe to downgrade packages?
A: Yes, but it can cause dependency issues. Always downgrade with pacman -U /var/cache/pacman/pkg/package.pkg.tar.zst and check for conflicts. It’s best to downgrade only the problematic package.

Q: How can I prevent boot failures in the future?
A: Regularly update your system, avoid partial upgrades, and always read the news on archlinux.org before major updates. Also, keep a backup of your system configuration files.

Q: What if the system boots but I can’t login?
A: This might be due to a broken display manager or session. You can switch to a TTY with Ctrl+Alt+F2, login, and check logs with journalctl -xe. Reinstall your display manager or desktop environment if needed.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →