Skip to content

Latest commit

 

History

History
117 lines (77 loc) · 3.32 KB

fix-broken-install.rst

File metadata and controls

117 lines (77 loc) · 3.32 KB

Fix a broken installation

This guide explains how to fix a broken installation of using a live desktop image on a USB.

Overview

This guide assumes you have installed on a target system, but the OS does not boot or function properly.

The process described in this guide can only verify and fix files that swupd<swupd-guide> owns in /usr and /var. Files outside of this path, such as /home/, /etc, etc., cannot be repaired by this process.

Prerequisites

  • Download and burn the live desktop image on a USB. See bare-metal-install-desktop for instructions.

Boot a live desktop image to fix target system

  1. Boot the live desktop image.
  2. Select in the boot menu.

Mount root partition, verify, and fix

  1. Ensure the system is connected to the Internet in order to access the the update server.
  2. Open a terminal window.
  3. Find the root partition by using the lsblk command with these options: -o NAME,LABEL,PARTTYPE,PARTLABEL.

    lsblk -o NAME,LABEL,PARTTYPE,PARTLABEL

    Example output:

    NAME          SIZE LABEL       PARTTYPE                             PARTLABEL
    /dev/loop0  643.6M                                                  
    /dev/sda     14.3G CLR_ISO                                          
    ├─/dev/sda1   835M CLR_ISO     0x0                                  
    └─/dev/sda2   100M "CLEAR_EFI" 0xef                                 
    /dev/sdb     74.5G                                                  
    ├─/dev/sdb1   142M boot        c12a7328-f81f-11d2-ba4b-00a0c93ec93b EFI
    ├─/dev/sdb2   244M swap        0657fd6d-a4ab-43c4-84e5-0933c84b4f4f linux-swap
    └─/dev/sdb3  74.2G root        4f68bce3-e8cd-4db1-96e7-fbcaf984b709 /

    In the example above, /dev/sdb3/ is the root partition.

  4. Next, mount the root partition.

    sudo mount /dev/sdb3 /mnt
  5. Verify that you mounted the correct root partition by verifying the content of /mnt/usr/lib/os-release looks similar to the example below.

    cat /mnt/usr/lib/os-release

    Example output:

    NAME="Clear Linux OS"
    VERSION=1
    ID=clear-linux-os
    ID_LIKE=clear-linux-os
    VERSION_ID=32150
    PRETTY_NAME="Clear Linux OS"
    ANSI_COLOR="1;35"
    HOME_URL="https://clearlinux.org"
    SUPPORT_URL="https://clearlinux.org"
    BUG_REPORT_URL="mailto:dev@lists.clearlinux.org"
    PRIVACY_POLICY_URL="http://www.intel.com/privacy"
  6. Next, run swupd repair to fix any issues on the target system.

    sudo swupd repair --picky --path=/mnt --statedir=/mnt/var/lib/swupd

    Learn more about how swupd works <swupd-guide>.

  7. After the process is complete, unmount the root partition.

    sudo umount /mnt
  8. Reboot the system, remove the live desktop USB drive, and boot into the repaired system.

    sudo reboot