Rohan Shewale's Blog

Recovering a Broken Arch Linux System (After a Botched Upgrade)

April 27, 2025 | 4 Minute Read

If you’ve ever left your Arch Linux system unattended for too long without updates, and then decided to upgrade everything at once… you know the fear when something goes wrong midway. Worse if you accidentally lose power while it’s still upgrading. That’s exactly what happened to me recently.

Here’s how to recovered a broken Arch system in most of the cases — without needing a full reinstall.

The Situation

After leaving my HP laptop unattended for years, it worked but became a bit outdated, so I attempted a full system upgrade. There were many conflicts, & cyclic dependencies, since over the years some packages were dropped, split or merged, like big updates to KDE plasma project (yes, Plasma is my desktop environment of choice!),

Unfortunately, due to power loss, my laptop was turned off midway upgrade. Booting back, I got a broken system 😭 — error: file 'boot/vmzlinuz-linux' not found, the bootloader was pointing to a kernel that wasn’t properly installed or rebuilt.

Since this was not my first venture I had a loose plan how to recover it.

Steps to Recovery

You’ll need:

  • A live Arch ISO on a USB drive
  • A working internet connection (LAN or WiFi)
  • Some patience and the will to troubleshoot
  1. Boot into live environment using the Arch Linux disk.

  2. Connect to Wi-Fi using iwctl

    Truly appreciate Arch Linux’s ongoing efforts to modernize its installation tools, they replaced the wifi-menu (which relied on netctl) with iwctl sometime back in 2020, and it’s quite reliable.

    Now, to connect internet over Wi-Fi, we will launch iwctl and —

    • Identify your wireless device (e.g., commonly be wlan0)
    • Scan for networks
    • List available networks
    • Select and connect to your network.
     ~# iwctl
     [iwd]# device list
     [iwd]# station wlan0 scan
     [iwd]# station wlan0 get-networks
     [iwd]# station wlan0 connect "YourWiFiName"
    

    Enter your Wi-Fi password when prompted.

    Give it a couple of seconds after scanning before listing networks — the scan isn’t instant.

  3. Download a Static Pacman Binary

    Since I had my pacman broken, I needed a working pacman to repair the system, for which I downloaded a prebuilt static pacman binary from:

     https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/
    

    Download it somewhere convenient (e.g., home directory).

  4. Mount Your Root Partition

    I like to have my root (/), home (~) and var (/var) on separate partations, just to keep things organized, and something I picked back in my distro hopping days.

    If you don’t know your partations, you can check by:

     lsblk
    

    This will list all your partations, including their mount points. Note down the device name (e.g., /dev/sda) and mount your system root:

     mount /dev/sdXn /mnt
    

    Replace /dev/sdXn with your actual root partition (e.g., /dev/sda6).

  5. Bind Essential Filesystems

    To make your environment functional inside the chroot, we will need to mount essential directories too, which we can pick from live disk:

     mount --bind /dev /mnt/dev
     mount --bind /proc /mnt/proc
     mount --bind /sys /mnt/sys
    

    (Optional but recommended) copy DNS configuration:

     cp /etc/resolv.conf /mnt/etc/resolv.conf
    
  6. Chroot Into Your System

     chroot /mnt
    

    You’re now effectively “inside” your broken system.

  7. Run Pacman Using the Static Binary

    Use the downloaded pacman-static binary to update everything:

     ~/pacman-static -Syu --overwrite '*'
    

    The –overwrite ‘*’ is critical — it forces pacman to overwrite all conflicting files, which is what you want during a repair.

  8. Reinstall the Kernel

    Full system upgrade with end with reinstall of kernel & regenerate initramfs, but if you didn’t find that in logs, you can do it manually:

     pacman -S linux
     mkinitcpio -P
    

    If you’re using GRUB (most people are), you can rebuild its config just in case:

     grub-mkconfig -o /boot/grub/grub.cfg
    

    (Not strictly necessary if your GRUB config wasn’t touched.)

  9. Finish Up

    Once everything is done:

    exit
    umount -R /mnt
    reboot
    

    And… if everything went well, you should boot right back into your restored Arch Linux system ✨.

Closing Thoughts

Breaking Arch isn’t a bug — it’s a feature. It teaches you exactly how your system fits together, one crash at a time.

Until the next crash, Happy tinkering!