Fix a broken installation¶
This guide explains how to fix a broken installation of Clear Linux* OS using a live desktop image on a USB.
Overview¶
This guide assumes you have installed Clear Linux OS 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 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 Install Clear Linux* OS from the live desktop for instructions.
Boot a live desktop image to fix target system¶
Boot the Clear Linux OS live desktop image.
Select Clear Linux OS in the boot menu.
Mount root partition, verify, and fix¶
Ensure the system is connected to the Internet in order to access the the Clear Linux OS update server.
Open a terminal window.
Find the Clear Linux OS 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.Next, mount the root partition.
sudo mount /dev/sdb3 /mnt
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"
Next, run swupd repair to fix any issues on the target system.
sudo swupd repair --picky --path=/mnt --statedir=/mnt/var/lib/swupd
After the process is complete, unmount the root partition.
sudo umount /mnt
Reboot the system, remove the live desktop USB drive, and boot into the repaired system.
sudo reboot