Arch Linux System Recovery - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Arch Linux System Recovery Guide
Complete beginner-friendly guide to system recovery on Arch Linux, including chroot, boot repair, and recovery procedures.
Table of Contents
Chroot into System
Boot from Live USB
Boot Arch ISO:
- Boot from Arch Linux ISO
- Mount partitions
- Chroot into system
Mount Partitions
Mount system:
# Mount root
mount /dev/sda2 /mnt
# Mount EFI (if UEFI)
mount /dev/sda1 /mnt/boot/efi
# Mount other partitions
mount /dev/sda3 /mnt/home
Chroot
Enter chroot:
# Chroot
arch-chroot /mnt
# Now in installed system
Boot Repair
Reinstall Bootloader
GRUB:
# Chroot first
arch-chroot /mnt
# Reinstall GRUB
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
# Regenerate config
grub-mkconfig -o /boot/grub/grub.cfg
Rebuild Initramfs
Rebuild:
# Chroot
arch-chroot /mnt
# Rebuild
mkinitcpio -P
Recovery Procedures
Fix Broken Packages
Fix packages:
# Chroot
arch-chroot /mnt
# Update
pacman -Syu
# Fix broken packages
pacman -S package-name --overwrite "*"
Restore from Backup
Restore:
# Mount backup
mount /dev/backup /mnt/backup
# Restore files
rsync -av /mnt/backup/home/ /mnt/home/
Data Recovery
Testdisk
Install testdisk:
# Install
sudo pacman -S testdisk
# Run
sudo testdisk
PhotoRec
Recover files:
# Install
sudo pacman -S testdisk
# Run
sudo photorec
Summary
This guide covered chroot, boot repair, recovery, and data recovery.
Next Steps
- Arch Linux Backup and Restore - Backups
- Arch Linux Installation Guide - Installation
- ArchWiki Recovery: https://wiki.archlinux.org/title/Installation_guide#Chroot
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.