Install using clr-installer and a configuration file
This page explains how to install Clear Linux* OS using the clr-installer tool
with a configuration file. The configuration file (clr-installer.yaml)
can be reused to duplicate the same installation configuration on additional
machines.
Prerequisites
Ensure that your target system supports the installation:
Process
This guide describes two methods for using a configuration file with the clr-installer tool. You can use either method to achieve the same goal. Choose the method that works best for your setup.
If you are installing Clear Linux OS for the first time, we recommend Example 1.
To clone an existing Clear Linux OS setup on another system, we recommend Example 2.
Example 1
This method uses a configuration file template to perform a new installation.
Perform the following steps:
Go to Downloads and download the latest Clear Linux OS Server image.
For example: https://download.clearlinux.org/releases/30010/clear/clear-30010-live-server.iso.xz
Follow the instructions to Create a bootable USB drive based on your OS.
Boot up the USB thumb drive.
Select Clear Linux OS from the menu.
In the console window, log in as root and set a password.
Verify you have a network connection to the Internet and configure proxy settings if you’re working behind a firewall.
Download a
live-server.yamltemplate.For example:
curl -O https://download.clearlinux.org/releases/30010/clear/config/image/live-server.yaml
Edit the template and change the settings as needed.
Commonly-changed settings include:
- Under block-devices, set “file: “/dev/sda”” or enter your preferred device.
- Under targetMedia, set the third partition size to “0” to use the entire disk space.
- Under bundles, add additional bundles as needed.
- Delete the post-install section unless you have post-installation scripts.
- Under Version, set a version number. To use the latest version, set to “0”.
Commonly-changed settings are shown in lines 15, 34, 37, and 51 below. See Installer YAML Syntax for more details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 #clear-linux-config # c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil # vi: set shiftwidth=2 tabstop=2 expandtab: # :indentSize=2:tabSize=2:noTabs=true: # File: developer-live-server.yaml # Use Case: Live Image which boots into login prompt # Optionally allows for installing Clear Linux OS # using the TUI clr-installer by running clr-installer # switch between aliases if you want to install to an actual block device # i.e /dev/sda block-devices: [ {name: "bdevice", file: "/dev/sda"} ] targetMedia: - name: ${bdevice} type: disk children: - name: ${bdevice}1 fstype: vfat mountpoint: /boot size: "150M" type: part - name: ${bdevice}2 fstype: swap size: "32M" type: part - name: ${bdevice}3 fstype: ext4 mountpoint: / size: "0" type: part bundles: [os-core, os-core-update, NetworkManager, clr-installer, vim] autoUpdate: false postArchive: false postReboot: false telemetry: false iso: true keepImage: true autoUpdate: false keyboard: us language: en_US.UTF-8 kernel: kernel-native version: 30010
Start the installation with the command:
clr-installer --config live-server.yaml
Example 2
This method uses a saved configuration file from a previous installation, which you can use to easily duplicate the installation on additional machines.
Perform the following steps:
Open a console window on a system where Clear Linux OS was installed to retrieve a copy of the configuration file.
In the console window, log in as root and enter your password.
Change directory to
/rootand copy theclr-installer.yamlfile to a USB thumb drive.cd /root cp clr-installer.yaml <USB-thumb-drive>
Start the installation on the target with the following steps:
Go to Downloads and download the latest Clear Linux OS Server image.
For example: https://download.clearlinux.org/releases/30010/clear/clear-30010-live-server.iso.xz
Follow the instructions to Create a bootable USB drive based on your OS.
Boot up the USB thumb drive.
Select Clear Linux OS from the menu.
In the console window, log in as root and set a password.
Verify you have a network connection to the Internet and configure proxy settings if you’re working behind a firewall.
Plug in and mount the USB thumb drive containing the retrieved
clr-installer.yamlconfiguration file.Start the installation with the command:
clr-installer --config clr-installer.yaml