System File Recovery FAQ

Context

During normal system usage, accidental deletion of system files or unintended modifications may prevent successful system boot. This requires file system recovery/repair or backup of critical data.

Symptom

Missing or modified system files causing boot failure, requiring system file restoration.

Solution

  1. Mount the installation image and switch to the background console with Ctrl+Alt+F2.

    The drive will initially show as inactive and unavailable for direct operations.

    image

  2. Configure network and enable SSH service:

    txt
    ifconfig eth0 xx.xx.xx.xx netmask 255.255.255.0 up
    route add default gw xx.xx.xx.xx
    cp /etc/ssh/sshd_config.anaconda /etc/ssh/sshd_config
    systemctl restart sshd
  3. Activate the system volume group:

    Use vgchange -ay to activate detected file systems.

    image

  4. Mount partitions for system operations:

    1. Create a temporary directory test and mount the root partition /dev/oprnruler/root to it:

      image

    2. Mount the boot partition /dev/sda2 to the temporary system's boot directory:

      image

    3. The file system and data are now accessible for modifications.