Skip to content

Linux System Recovery

Mattscreative edited this page Nov 19, 2025 · 2 revisions

🔧 Linux System Recovery Guide

Complete beginner-friendly guide to system recovery on Linux, covering Arch Linux, CachyOS, and other distributions including chroot, boot repair, recovery procedures, and data recovery.


📋 Table of Contents

  1. Chroot into System
  2. Boot Repair
  3. Recovery Procedures
  4. Data Recovery
  5. Troubleshooting

🔄 Chroot into System

Boot from Live USB

Boot from ISO:

  1. Boot from Linux ISO (Arch/CachyOS)
  2. Mount partitions
  3. 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:

# Arch/CachyOS
arch-chroot /mnt

# Or manual chroot
chroot /mnt /bin/bash

CachyOS note: CachyOS provides cachy-chroot tool. See CachyOS Cachy Chroot Guide for details.


🔨 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

systemd-boot:

# Chroot
arch-chroot /mnt

# Reinstall
bootctl install

# Update entries
bootctl update

Rebuild Initramfs

Rebuild:

# Chroot
arch-chroot /mnt

# Rebuild
mkinitcpio -P

🔄 Recovery Procedures

Fix Broken Packages

Fix packages:

# Chroot
arch-chroot /mnt

# Fix packages
pacman -Syu

# Reinstall broken
pacman -S package-name

Restore from Backup

Restore:

# Mount backup
mount /dev/backup-device /mnt/backup

# Restore files
rsync -av /mnt/backup/home/ /mnt/home/

💾 Data Recovery

TestDisk

Install TestDisk:

# Install TestDisk
sudo pacman -S testdisk

# Launch
sudo testdisk

PhotoRec

Install PhotoRec:

# Install PhotoRec
sudo pacman -S testdisk

# Launch
sudo photorec

🔧 Troubleshooting

Cannot Chroot

Check mounts:

# Check mounts
mount | grep /mnt

# Mount required filesystems
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys

📝 Summary

This guide covered system recovery for Arch Linux, CachyOS, and other distributions, including chroot, boot repair, and data recovery.


🔗 Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. CachyOS-specific tools are highlighted where applicable.

Clone this wiki locally