Files
clear-linux-documentation/guides/maintenance/fix-broken-install.html
2024-11-04 18:56:31 +00:00

238 lines
13 KiB
HTML

<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Fix a broken installation &#8212; Documentation for Clear Linux* project</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/bizstyle.css?v=5283bb3d" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../_static/copybutton.js?v=a56c686a"></script>
<script src="../../_static/bizstyle.js"></script>
<link rel="canonical" href="https://clearlinux.github.io/clear-linux-documentation/guides/maintenance/fix-broken-install.html" />
<link rel="icon" href="../../_static/favicon.ico"/>
<link rel="author" title="About these documents" href="../../about.html" />
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Modify hostname" href="hostname.html" />
<link rel="prev" title="Create and enable a new user space" href="enable-user-space.html" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!--[if lt IE 9]>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="hostname.html" title="Modify hostname"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="enable-user-space.html" title="Create and enable a new user space"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Guides</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Fix a broken installation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="fix-a-broken-installation">
<span id="fix-broken-install"></span><h1>Fix a broken installation<a class="headerlink" href="#fix-a-broken-installation" title="Link to this heading"></a></h1>
<p>This guide explains how to fix a broken installation of Clear Linux* OS using a live
desktop image on a USB.</p>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#overview" id="id1">Overview</a></p></li>
<li><p><a class="reference internal" href="#prerequisites" id="id2">Prerequisites</a></p></li>
<li><p><a class="reference internal" href="#boot-a-live-desktop-image-to-fix-target-system" id="id3">Boot a live desktop image to fix target system</a></p></li>
<li><p><a class="reference internal" href="#mount-root-partition-verify-and-fix" id="id4">Mount root partition, verify, and fix</a></p></li>
</ul>
</nav>
<section id="overview">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Overview</a><a class="headerlink" href="#overview" title="Link to this heading"></a></h2>
<p>This guide assumes you have installed Clear Linux OS on a target system, but the OS
does not boot or function properly.</p>
<p>The process described in this guide can only verify and fix files that
<a class="reference internal" href="../clear/swupd.html#swupd-guide"><span class="std std-ref">swupd</span></a> owns in <code class="file docutils literal notranslate"><span class="pre">/usr</span></code> and <code class="file docutils literal notranslate"><span class="pre">/var</span></code>. Files outside
of this path, such as <code class="file docutils literal notranslate"><span class="pre">/home/</span></code>, <code class="file docutils literal notranslate"><span class="pre">/etc</span></code>, etc., cannot be
repaired by this process.</p>
</section>
<section id="prerequisites">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Download and burn the live desktop image on a USB.
See <a class="reference internal" href="../../get-started/bare-metal-install-desktop.html#bare-metal-install-desktop"><span class="std std-ref">Install Clear Linux* OS from the live desktop</span></a> for instructions.</p></li>
</ul>
</section>
<section id="boot-a-live-desktop-image-to-fix-target-system">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Boot a live desktop image to fix target system</a><a class="headerlink" href="#boot-a-live-desktop-image-to-fix-target-system" title="Link to this heading"></a></h2>
<ol class="arabic simple">
<li><p>Boot the Clear Linux OS live desktop image.</p></li>
<li><p>Select Clear Linux OS in the boot menu.</p></li>
</ol>
</section>
<section id="mount-root-partition-verify-and-fix">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Mount root partition, verify, and fix</a><a class="headerlink" href="#mount-root-partition-verify-and-fix" title="Link to this heading"></a></h2>
<ol class="arabic">
<li><p>Ensure the system is connected to the Internet in order to access the
the Clear Linux OS update server.</p></li>
<li><p>Open a terminal window.</p></li>
<li><p>Find the Clear Linux OS root partition by using the <strong class="command">lsblk</strong> command with
these options: <code class="docutils literal notranslate"><span class="pre">-o</span> <span class="pre">NAME,LABEL,PARTTYPE,PARTLABEL</span></code>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>lsblk<span class="w"> </span>-o<span class="w"> </span>NAME,LABEL,PARTTYPE,PARTLABEL
</pre></div>
</div>
<p>Example output:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">NAME SIZE LABEL PARTTYPE PARTLABEL</span>
<span class="go">/dev/loop0 643.6M</span>
<span class="go">/dev/sda 14.3G CLR_ISO</span>
<span class="go">├─/dev/sda1 835M CLR_ISO 0x0</span>
<span class="go">└─/dev/sda2 100M &quot;CLEAR_EFI&quot; 0xef</span>
<span class="go">/dev/sdb 74.5G</span>
<span class="go">├─/dev/sdb1 142M boot c12a7328-f81f-11d2-ba4b-00a0c93ec93b EFI</span>
<span class="go">├─/dev/sdb2 244M swap 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f linux-swap</span>
<span class="hll"><span class="go">└─/dev/sdb3 74.2G root 4f68bce3-e8cd-4db1-96e7-fbcaf984b709 /</span>
</span></pre></div>
</div>
<p>In the example above, <code class="docutils literal notranslate"><span class="pre">/dev/sdb3/</span></code> is the root partition.</p>
</li>
<li><p>Next, mount the root partition.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mount<span class="w"> </span>/dev/sdb3<span class="w"> </span>/mnt
</pre></div>
</div>
</li>
<li><p>Verify that you mounted the correct root partition by verifying the content
of <code class="docutils literal notranslate"><span class="pre">/mnt/usr/lib/os-release</span></code> looks similar to the example below.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cat<span class="w"> </span>/mnt/usr/lib/os-release
</pre></div>
</div>
<p>Example output:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">NAME=&quot;Clear Linux OS&quot;</span>
<span class="go">VERSION=1</span>
<span class="go">ID=clear-linux-os</span>
<span class="go">ID_LIKE=clear-linux-os</span>
<span class="go">VERSION_ID=32150</span>
<span class="go">PRETTY_NAME=&quot;Clear Linux OS&quot;</span>
<span class="go">ANSI_COLOR=&quot;1;35&quot;</span>
<span class="go">HOME_URL=&quot;https://clearlinux.org&quot;</span>
<span class="go">SUPPORT_URL=&quot;https://clearlinux.org&quot;</span>
<span class="go">BUG_REPORT_URL=&quot;mailto:dev@lists.clearlinux.org&quot;</span>
<span class="go">PRIVACY_POLICY_URL=&quot;http://www.intel.com/privacy&quot;</span>
</pre></div>
</div>
</li>
<li><p>Next, run <strong class="command">swupd repair</strong> to fix any issues on the target system.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>repair<span class="w"> </span>--picky<span class="w"> </span>--path<span class="o">=</span>/mnt<span class="w"> </span>--statedir<span class="o">=</span>/mnt/var/lib/swupd
</pre></div>
</div>
<p><a class="reference internal" href="../clear/swupd.html#swupd-guide"><span class="std std-ref">Learn more about how swupd works</span></a>.</p>
</li>
<li><p>After the process is complete, unmount the root partition.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>umount<span class="w"> </span>/mnt
</pre></div>
</div>
</li>
<li><p>Reboot the system, remove the live desktop USB drive,
and boot into the repaired system.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>reboot
</pre></div>
</div>
</li>
</ol>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/clearlinux.png" alt="Logo of Clear Linux* Project Docs"/>
</a></p>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Fix a broken installation</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
<li><a class="reference internal" href="#boot-a-live-desktop-image-to-fix-target-system">Boot a live desktop image to fix target system</a></li>
<li><a class="reference internal" href="#mount-root-partition-verify-and-fix">Mount root partition, verify, and fix</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="enable-user-space.html"
title="previous chapter">Create and enable a new user space</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="hostname.html"
title="next chapter">Modify hostname</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/guides/maintenance/fix-broken-install.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="hostname.html" title="Modify hostname"
>next</a> |</li>
<li class="right" >
<a href="enable-user-space.html" title="Create and enable a new user space"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Guides</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Fix a broken installation</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2022 Intel Corporation. All Rights Reserved..
Last updated on Nov 04, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
</div>
</body>
</html>