Files
clear-linux-documentation/tutorials/multi-boot/dual-boot-linux.html
2024-11-04 18:48:51 +00:00

525 lines
30 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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>Dual-boot Clear Linux* OS with Any GRUB-based Linux* Distro &#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/tutorials/multi-boot/dual-boot-linux.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="Dual-boot Clear Linux* OS and Windows* 10 OS" href="dual-boot-win.html" />
<link rel="prev" title="OpenZFS*" href="../zfs.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="dual-boot-win.html" title="Dual-boot Clear Linux* OS and Windows* 10 OS"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../zfs.html" title="OpenZFS*"
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">Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Dual-boot Clear Linux* OS with Any GRUB-based Linux* Distro</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="dual-boot-cl-attr-with-any-grub-based-linux-distro">
<span id="dual-boot-linux"></span><h1>Dual-boot Clear Linux* OS with Any GRUB-based Linux* Distro<a class="headerlink" href="#dual-boot-cl-attr-with-any-grub-based-linux-distro" title="Link to this heading"></a></h1>
<p>In this tutorial, we show how to install Clear Linux OS alongside any GRUB-based
Linux* distro. To do so, we resize the existing Linux root partition to
make room to install Clear Linux OS. Then we show 3 methods to dual-boot Clear Linux OS
with an existing Linux distro.</p>
<p>Although we use Ubuntu* 19.04 Desktop as the example here,
these instructions also work for other distros such as Mint*, Kubuntu*,
Fedora*, CentOS*, among others.</p>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#prerequisites" id="id13">Prerequisites</a></p></li>
<li><p><a class="reference internal" href="#preliminary-steps" id="id14">Preliminary steps</a></p></li>
<li><p><a class="reference internal" href="#install-cl-with-advanced-installation" id="id15">Install Clear Linux OS with Advanced Installation</a></p></li>
<li><p><a class="reference internal" href="#boot-cl-using-one-of-three-methods" id="id16">Boot Clear Linux OS Using One of Three Methods</a></p></li>
</ul>
</nav>
<section id="prerequisites">
<h2><a class="toc-backref" href="#id13" role="doc-backlink">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Ubuntu 19.04 Desktop is already installed.</p></li>
<li><p>There is no unallocated space available, but there is free space
on the Ubuntu root partition.</p></li>
<li><p>Follow the Preliminary steps that follow below.</p></li>
</ul>
</section>
<section id="preliminary-steps">
<h2><a class="toc-backref" href="#id14" role="doc-backlink">Preliminary steps</a><a class="headerlink" href="#preliminary-steps" title="Link to this heading"></a></h2>
<ol class="arabic">
<li><p>Visit our <a class="reference external" href="https://clearlinux.org/downloads">Downloads</a> page.</p></li>
<li><p>Download the file <code class="file docutils literal notranslate"><span class="pre">clear-&lt;release</span> <span class="pre">number&gt;-live-desktop.iso</span></code>,
also called the Clear Linux OS Desktop.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>&lt;release-number&gt; is the latest Clear Linux OS auto-numbered release.</p>
</div>
</li>
<li><p>Follow your OS instructions to
<a class="reference internal" href="../../get-started/bootable-usb.html#bootable-usb"><span class="std std-ref">create a bootable usb drive</span></a>.</p></li>
</ol>
</section>
<section id="install-cl-with-advanced-installation">
<h2><a class="toc-backref" href="#id15" role="doc-backlink">Install Clear Linux OS with Advanced Installation</a><a class="headerlink" href="#install-cl-with-advanced-installation" title="Link to this heading"></a></h2>
<ol class="arabic">
<li><p>Shut down the Ubuntu OS before proceeding.</p></li>
<li><p>Boot up the Clear Linux OS live desktop image, and click the penguin
icon, at left, to launch the installer.</p></li>
<li><p>Complete the <span class="guilabel">Required Options</span> until you reach
<span class="guilabel">Select Installation Media</span>. See Figure 1.</p>
<figure class="dropshadow align-default" id="id1">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-01.png"><img alt="Required options" src="../../_images/dual-boot-linux-01.png" style="width: 610.0px; height: 415.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 1: Required options</span><a class="headerlink" href="#id1" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Click <span class="guilabel">Select Installation Media</span>.</p></li>
<li><p>Select the “Advanced Installation” option. See Figure 2.</p>
<figure class="dropshadow align-default" id="id2">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-02.png"><img alt="Advanced Installation" src="../../_images/dual-boot-linux-02.png" style="width: 610.0px; height: 415.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 2: Advanced Installation</span><a class="headerlink" href="#id2" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Click <span class="guilabel">Partition Media</span> to start the GParted tool.</p></li>
<li><p>Shrink the Ubuntu root partition to free up some space for Clear Linux OS.</p>
<ol class="loweralpha">
<li><p>Select the Ubuntu root partition (in this example: /dev/sda2).
Right-click it and select “Resize/Move”. See Figure 3.</p>
<figure class="dropshadow align-default" id="id3">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-03.png"><img alt="Ubuntu root partition" src="../../_images/dual-boot-linux-03.png" style="width: 610.0px; height: 415.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 3: Ubuntu root partition</span><a class="headerlink" href="#id3" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>In the <span class="guilabel">New size (MiB)</span> field, reduce the size of the root
partition, leaving at least 22GB free. This allows enough space to
create a swap partition (250MB) and root partition (approx. 21GB) for
Clear Linux OS.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The resulting free space appears in the “Free space following
(MiB)”. Click the “Resize/Move” button. See Figure 4.</p>
</div>
<figure class="dropshadow align-default" id="id4">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-04.png"><img alt="Resize Ubuntu root" src="../../_images/dual-boot-linux-04.png" style="width: 610.0px; height: 362.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 4: Resize Ubuntu root</span><a class="headerlink" href="#id4" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Click the green checkmark button to proceed. See Figure 5.</p>
<figure class="dropshadow align-default" id="id5">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-05.png"><img alt="New unallocated space" src="../../_images/dual-boot-linux-05.png" style="width: 610.0px; height: 362.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 5: New unallocated space</span><a class="headerlink" href="#id5" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
</ol>
</li>
<li><p>Share the existing EFI system partition by designating as such.</p>
<ol class="loweralpha">
<li><p>Right-click the <span class="guilabel">EFI System Partition</span> (e.g., /dev/sda1)
and select <span class="guilabel">Name Partition</span>.</p></li>
<li><p>Set the name to “CLR_BOOT”. See Figure 6 and Figure 7.</p>
<figure class="dropshadow align-default" id="id6">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-06.png"><img alt="Name CLR_BOOT partition" src="../../_images/dual-boot-linux-06.png" style="width: 400.0px; height: 118.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 6: Name CLR_BOOT partition</span><a class="headerlink" href="#id6" title="Link to this image"></a></p>
</figcaption>
</figure>
<figure class="dropshadow align-default" id="id7">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-07.png"><img alt="Resulting CLR_BOOT main screen" src="../../_images/dual-boot-linux-07.png" style="width: 610.0px; height: 362.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 7: Resulting CLR_BOOT main screen</span><a class="headerlink" href="#id7" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
</ol>
</li>
<li><p>Create a swap partition for Clear Linux OS.</p>
<ol class="loweralpha">
<li><p>Right-click the “unallocated” partition and select <span class="guilabel">New</span>
to add a new partition.</p></li>
<li><p>Enter “250” in the <span class="guilabel">New Size (MiB)</span> field to create a
250MB swap space.</p></li>
<li><p>Enter “CLR_SWAP” in the <span class="guilabel">Partition name</span> field and select
“linux-swap” as the “File system” type.</p></li>
<li><p>Click the “Add” button. See Figure 8.</p>
<figure class="dropshadow align-default" id="id8">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-08.png"><img alt="Create CLR_SWAP partition" src="../../_images/dual-boot-linux-08.png" style="width: 610.0px; height: 316.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 8: Create CLR_SWAP partition</span><a class="headerlink" href="#id8" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
</ol>
</li>
<li><p>Create Clear Linux OS root partition.</p>
<ol class="loweralpha">
<li><p>Right-click “unallocated” partition again and select <span class="guilabel">New</span>
to add a new partition.</p></li>
<li><p>Create a partition that is at least 21GB, enter “CLR_ROOT” in the
<span class="guilabel">Partition name</span> field, and select a <span class="guilabel">File system</span>
type of your choice.</p></li>
<li><p>Click the “Add” button. See Figure 9.</p>
<figure class="dropshadow align-default" id="id9">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-09.png"><img alt="Create CLR_ROOT partition" src="../../_images/dual-boot-linux-09.png" style="width: 610.0px; height: 316.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 9: Create CLR_ROOT partition</span><a class="headerlink" href="#id9" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
</ol>
</li>
<li><p>Click the green checkmark button to create the newly-defined partitions.
See Figure 10.</p>
<figure class="dropshadow align-default" id="id10">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-10.png"><img alt="Partitions to be created" src="../../_images/dual-boot-linux-10.png" style="width: 610.0px; height: 316.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 10: Partitions to be created</span><a class="headerlink" href="#id10" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Close the GParted window, and the Clear Linux OS installer will reappear with
the newly-defined partitions to use. See Figure 11.</p>
<figure class="dropshadow align-default" id="id11">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-11.png"><img alt="|CL| installer partitions defined" src="../../_images/dual-boot-linux-11.png" style="width: 610.0px; height: 415.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 11: Clear Linux OS installer partitions defined</span><a class="headerlink" href="#id11" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Complete the remaining steps of <span class="guilabel">Required Options</span> to
to install Clear Linux OS. Complete any <span class="guilabel">Advanced Options</span> as desired.</p></li>
</ol>
</section>
<section id="boot-cl-using-one-of-three-methods">
<h2><a class="toc-backref" href="#id16" role="doc-backlink">Boot Clear Linux OS Using One of Three Methods</a><a class="headerlink" href="#boot-cl-using-one-of-three-methods" title="Link to this heading"></a></h2>
<p>Although we installed Clear Linux OS last, Ubuntu is still the default boot OS.
There are three methods to boot Clear Linux OS:</p>
<ol class="arabic simple">
<li><p>Make systemd-boot, the boot loader that Clear Linux OS uses, the default
boot loader to boot Clear Linux OS and also chain-boot GRUB; therefore, boot
Ubuntu. See <a class="reference internal" href="#boot-clr-method-1">boot-clr-method-1</a>.</p></li>
<li><p>Use GRUB to chain-boot systemd-boot, therefore boot Clear Linux OS.
See <a class="reference internal" href="#boot-clr-method-2">boot-clr-method-2</a>.</p></li>
<li><p>Use your BIOS “Boot Menu” to select and boot Clear Linux OS.
Refer to your systems manual on how to bring up the “Boot Menu”.</p></li>
</ol>
<section id="method-1-use-systemd-boot-to-boot-cl-and-also-chain-boot-grub">
<span id="boot-clr-method-1"></span><h3>Method 1: Use systemd-boot to Boot Clear Linux OS and also Chain-boot GRUB<a class="headerlink" href="#method-1-use-systemd-boot-to-boot-cl-and-also-chain-boot-grub" title="Link to this heading"></a></h3>
<p>systemd-boot is the bootloader used by Clear Linux OS. Because Clear Linux OS was installed
after a GRUB-based distro, GRUB is still the default bootloader.
In this method, we make systemd-boot the default bootloader instead and
also provide a path to chain-boot GRUB.</p>
<ol class="arabic">
<li><p>Boot up the Clear Linux OS installer image.</p></li>
<li><p>Open a terminal window.</p></li>
<li><p>Identify the EFI system partition, Ubuntu root partition, and Clear Linux OS root
partition.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>fdisk<span class="w"> </span>-l
</pre></div>
</div>
<p>Example output:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">clrlinux@clr-live~ $ </span>sudo<span class="w"> </span>fdisk<span class="w"> </span>-l
<span class="go">...</span>
<span class="go">Disk /dev/sda: 335.4 GiB, 360080695296 bytes, 703282608 sectors</span>
<span class="go">Disk model: INTEL SSDSCKKF36</span>
<span class="go">Units: sectors of 1 * 512 = 512 bytes</span>
<span class="go">Sector size (logical/physical): 512 bytes / 512 bytes</span>
<span class="go">I/O size (minimum/optimal): 512 bytes / 1048576 bytes</span>
<span class="go">Disklabel type: gpt</span>
<span class="go">Disk identifier: D5CB69E9-2C27-4A16-9552-3CD6BFA5DA77</span>
<span class="go">Device Start End Sectors Size Type</span>
<span class="go">/dev/sda1 2048 1050623 1048576 512M EFI System</span>
<span class="go">/dev/sda2 1050624 498481151 497430528 237.2G Linux filesystem</span>
<span class="go">/dev/sda3 498481152 498993151 512000 250M Linux swap</span>
<span class="go">/dev/sda4 498993152 703281151 204288000 97.4G Linux root (x86-64)</span>
<span class="go">...</span>
</pre></div>
</div>
<p>The above example output contains these partitions:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">/dev/sda1</span></code> is the EFI system partition originally created by Ubuntu
and shared with Clear Linux OS</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">/dev/sda2</span></code> is the Ubuntu root partition</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">/dev/sda3</span></code> is the swap partition for Clear Linux OS</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">/dev/sda4</span></code> is the Clear Linux OS root partition</p></li>
</ul>
<p>The remaining steps will work with these partitions.</p>
</li>
<li><p>Mount these partitions.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>/mnt/clearlinux
sudo<span class="w"> </span>mount<span class="w"> </span>/dev/sda4<span class="w"> </span>/mnt/clearlinux/
sudo<span class="w"> </span>mount<span class="w"> </span>/dev/sda1<span class="w"> </span>/mnt/clearlinux/boot
</pre></div>
</div>
</li>
<li><p>Make systemd-boot the default bootloader.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>bootctl<span class="w"> </span>install<span class="w"> </span>--esp-path<span class="o">=</span>/mnt/clearlinux/boot
</pre></div>
</div>
</li>
<li><p>Add a timeout to systemd-boot so that it will present the menu of
bootable OSes and give you time to select the one you want to boot.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>clr-boot-manager<span class="w"> </span>set-timeout<span class="w"> </span><span class="m">20</span><span class="w"> </span>--path<span class="o">=</span>/mnt/clearlinux
</pre></div>
</div>
</li>
<li><p>Add a system-boot boot entry for GRUB.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>tee<span class="w"> </span>-a<span class="w"> </span>/mnt/clearlinux/boot/loader/entries/grub.conf<span class="w"> </span><span class="s">&lt;&lt; EOF</span>
<span class="s">title GRUB menu</span>
<span class="s">efi /EFI/ubuntu/grubx64.efi</span>
<span class="s">EOF</span>
</pre></div>
</div>
</li>
<li><p>Umount all partitions.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>umount<span class="w"> </span>/mnt/clearlinux/boot<span class="w"> </span>/mnt/clearlinux
</pre></div>
</div>
</li>
<li><p>Reboot.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>reboot
</pre></div>
</div>
</li>
<li><p>Remove the Clear Linux OS installer USB thumb drive.</p></li>
<li><p>You should be presented with the <strong class="command">systemd-boot</strong> menu.
See Figure 12.</p>
<figure class="align-default" id="id12">
<a class="reference internal image-reference" href="../../_images/dual-boot-linux-12.png"><img alt="systemd-boot menu showing GRUB" src="../../_images/dual-boot-linux-12.png" style="width: 610.0px; height: 415.0px;" />
</a>
<figcaption>
<p><span class="caption-text">Figure 12: systemd-boot menu showing GRUB</span><a class="headerlink" href="#id12" title="Link to this image"></a></p>
</figcaption>
</figure>
</li>
</ol>
</section>
<section id="method-2-use-grub-to-boot-cl">
<span id="boot-clr-method-2"></span><h3>Method 2: Use GRUB to Boot Clear Linux OS<a class="headerlink" href="#method-2-use-grub-to-boot-cl" title="Link to this heading"></a></h3>
<p>In this method, we keep GRUB as the default bootloader, but configure it
to chain-boot systemd-boot, thus allowing us to boot Clear Linux OS. Again, were using
Ubuntu as our working example.</p>
<ol class="arabic">
<li><p>Boot up Ubuntu.</p></li>
<li><p>Open a terminal window.</p></li>
<li><p>Set a timeout value for the GRUB menu so it will be visible at boot time and
allow you select one which OS to boot.</p>
<ol class="loweralpha">
<li><p>sudoedit <code class="file docutils literal notranslate"><span class="pre">/etc/default/grub</span></code></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudoedit<span class="w"> </span>/etc/default/grub
</pre></div>
</div>
</li>
<li><p>Set the <code class="docutils literal notranslate"><span class="pre">GRUB_TIMEOUT</span></code> variable to a desired value.</p></li>
</ol>
</li>
<li><p>Create a menu entry for systemd-boot bootloader.</p>
<ol class="loweralpha">
<li><p>Identify the UUID for EFI system partition that systemd-boot resides on.
The example below shows the UUID for the EFI system on /dev/sda1 is
“A5A0-337D”.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>blkid
</pre></div>
</div>
<p>Example output:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="hll"><span class="go">/dev/sda1: UUID=&quot;A5A0-337D&quot; TYPE=&quot;vfat&quot; PARTLABEL=&quot;CLR_BOOT&quot; PARTUUID=&quot;ee664fec-1ade-40d0-9ce4-c08805003c8d&quot;</span>
</span><span class="go">/dev/sda2: UUID=&quot;219969c5-1106-4e9f-b6f5-8188d7d94b8b&quot; TYPE=&quot;ext4&quot; PARTUUID=&quot;00bdf0dc-264d-493c-bf23-a85105011175&quot;</span>
<span class="go">/dev/sda3: UUID=&quot;65221b07-33cb-40b7-9812-ea484c7606c9&quot; TYPE=&quot;swap&quot; PARTLABEL=&quot;CLR_SWAP&quot; PARTUUID=&quot;5a7926b4-bd11-4bad-b932-cc31c0a75d27&quot;</span>
<span class="go">/dev/sda4: UUID=&quot;0bedd545-58a7-4f34-b22a-c50bb4a1c2f5&quot; TYPE=&quot;ext4&quot; PARTLABEL=&quot;CLR_ROOT&quot; PARTUUID=&quot;2d60cd03-5739-4cd5-adcc-51a107cde388&quot;</span>
</pre></div>
</div>
</li>
<li><p>sudoedit <code class="file docutils literal notranslate"><span class="pre">/etc/grub.d/40_custom</span></code> and add a menu entry
for Clear Linux OS using UUID from the previous step (for example):</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="gp">#</span>!/bin/sh
<span class="linenos"> 2</span><span class="go">exec tail -n +3 $0</span>
<span class="linenos"> 3</span><span class="gp"># </span>This<span class="w"> </span>file<span class="w"> </span>provides<span class="w"> </span>an<span class="w"> </span>easy<span class="w"> </span>way<span class="w"> </span>to<span class="w"> </span>add<span class="w"> </span>custom<span class="w"> </span>menu<span class="w"> </span>entries.<span class="w"> </span>Simply<span class="w"> </span><span class="nb">type</span><span class="w"> </span>the
<span class="linenos"> 4</span><span class="gp"># </span>menu<span class="w"> </span>entries<span class="w"> </span>you<span class="w"> </span>want<span class="w"> </span>to<span class="w"> </span>add<span class="w"> </span>after<span class="w"> </span>this<span class="w"> </span>comment.<span class="w"> </span>Be<span class="w"> </span>careful<span class="w"> </span>not<span class="w"> </span>to<span class="w"> </span>change
<span class="linenos"> 5</span><span class="gp"># </span>the<span class="w"> </span><span class="s1">&#39;exec tail&#39;</span><span class="w"> </span>line<span class="w"> </span>above.
<span class="linenos"> 6</span>
<span class="hll"><span class="linenos"> 7</span><span class="go">menuentry &#39;Clear Linux OS&#39; {</span>
</span><span class="hll"><span class="linenos"> 8</span><span class="go"> search --fs-uuid --no-floppy --set=root A5A0-337D</span>
</span><span class="hll"><span class="linenos"> 9</span><span class="go"> chainloader (${root})/EFI/org.clearlinux/bootloaderx64.efi</span>
</span><span class="hll"><span class="linenos">10</span><span class="go">}</span>
</span></pre></div>
</div>
</li>
<li><p>Update GRUB.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>update-grub
</pre></div>
</div>
</li>
</ol>
</li>
<li><p>Reboot.</p></li>
<li><p>At the GRUB boot menu, select <span class="guilabel">Clear Linux OS</span> to boot Clear Linux OS.</p></li>
<li><p>Log in.</p></li>
<li><p>Open a terminal window.</p></li>
<li><p>By default, any future calls to <strong class="command">clr-boot-manager</strong>, such as
after a kernel update by <strong class="command">swupd</strong> or setting the timeout
value for systemd-boot, will modify the UEFI boot order
which will result in making systemd-boot the first boot
entry and you wont be able to boot Ubuntu any longer. And in order
to boot Ubuntu first, you must change the UEFI boot order back.
To prevent <strong class="command">clr-boot-manager</strong> from touching the UEFI boot
order, which is especially important in a dual-boot setup,
follow these steps:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/kernel
sudo<span class="w"> </span>tee<span class="w"> </span>-a<span class="w"> </span>/etc/kernel/update_efi_vars<span class="w"> </span><span class="s">&lt;&lt; EOF</span>
<span class="s">false</span>
<span class="s">EOF</span>
</pre></div>
</div>
</li>
</ol>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>The default installation of Clear Linux OS does not set a timeout value for
systemd-boot. Thus, you will not see the systemd-boot menu and the
default kernel will boot right away.
To set a timeout value (for example: 25 seconds), enter:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>clr-boot-manager<span class="w"> </span>set-timeout<span class="w"> </span><span class="m">25</span>
</pre></div>
</div>
</div>
</section>
</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="#">Dual-boot Clear Linux* OS with Any GRUB-based Linux* Distro</a><ul>
<li><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
<li><a class="reference internal" href="#preliminary-steps">Preliminary steps</a></li>
<li><a class="reference internal" href="#install-cl-with-advanced-installation">Install Clear Linux OS with Advanced Installation</a></li>
<li><a class="reference internal" href="#boot-cl-using-one-of-three-methods">Boot Clear Linux OS Using One of Three Methods</a><ul>
<li><a class="reference internal" href="#method-1-use-systemd-boot-to-boot-cl-and-also-chain-boot-grub">Method 1: Use systemd-boot to Boot Clear Linux OS and also Chain-boot GRUB</a></li>
<li><a class="reference internal" href="#method-2-use-grub-to-boot-cl">Method 2: Use GRUB to Boot Clear Linux OS</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../zfs.html"
title="previous chapter">OpenZFS*</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="dual-boot-win.html"
title="next chapter">Dual-boot Clear Linux* OS and Windows* 10 OS</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/tutorials/multi-boot/dual-boot-linux.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="dual-boot-win.html" title="Dual-boot Clear Linux* OS and Windows* 10 OS"
>next</a> |</li>
<li class="right" >
<a href="../zfs.html" title="OpenZFS*"
>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" >Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Dual-boot Clear Linux* OS with Any GRUB-based Linux* Distro</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>