Installing

Installing cOS or a derivative locally

cOS (or any cOS derivative built with cos-toolkit) can be installed with elemental install:

elemental install [options] <device>
OptionDescription
–cloud-init stringCloud-init config file
–cosignEnable cosign verification (requires images with signatures)
–cosign-key stringSets the URL of the public key to be used by cosign validation
–directory stringUse directory as source to install from
–docker-image stringInstall a specified container image
–forceForce install
–force-efiForces an EFI installation
–force-gptForces a GPT partition table
–helphelp for install
–iso stringPerforms an installation from the ISO url
–no-formatDon’t format disks. It is implied that COS_STATE, COS_RECOVERY, COS_PERSISTENT, COS_OEM are already existing
–no-verifyDisable mtree checksum verification (requires images manifests generated with mtree separately)
–partition-layout stringPartitioning layout file
–poweroffShutdown the system after install
–rebootReboot the system after install
–strictEnable strict check of hooks (They need to exit with 0)
–ttyAdd named tty to grub

Custom OEM configuration

During installation it can be specified a cloud-init config file, that will be installed and persist in the system after installation:

elemental install --cloud-init [url|path] <device>

Custom partitioning layout

When installing with GPT or EFI it’s possible to specify a custom partitioning layout via specific config file, e.g.:

stages:
   partitioning:
     - name: "Repart disk"
       layout:
         device:
           path: /dev/sda
         add_partitions:
           - fsLabel: COS_STATE
             size: 8192
             pLabel: state
           - fsLabel: COS_OEM
             size: 10
             pLabel: oem
           - fsLabel: COS_RECOVERY
             # default filesystem is ext2 if omitted
             filesystem: ext4
             size: 40000
             pLabel: recovery
           - fsLabel: COS_PERSISTENT
             pLabel: persistent
             # default filesystem is ext2 if omitted
             filesystem: ext4
             size: 40000

Refer to the cloud-init config file reference about the layout section.

It can be also used to create additional partitions, or either create partitions into a different device, etc..

Run the installer with


elemental install --partition-layout <file> <device>

Installation from 3rd party LiveCD or rescue mediums

The installer can be used to perform installations also from outside the cOS or standard derivative ISOs.

For instance, it is possible to install cOS (or any derivative) with the installer from another bootable medium, or a rescue mode which is booting from RAM, given there is enough free RAM available.

With Docker

If in the rescue system, or LiveCD you have docker available, it can be used to perform an installation

docker run --privileged -v /dev/:/dev/ -ti quay.io/costoolkit/elemental:latest install --docker-image $IMAGE $DEVICE

Where $IMAGE is the container image that we want to install (e.g. quay.io/costoolkit/releases-green:cos-system-0.8.7 ), and $DEVICE is the device where to perform the installation to (e.g. /dev/sda).

Note, we used the quay.io/costoolkit/elemental:latest image which contains the latest stable installer and the dependencies. You can see all the versions at quay.

By using manually the Elemental installer

Similarly, the same mechanism can be used without docker. Download elemental from github releases and run the follow as root:

elemental install --docker-image $IMAGE $DEVICE

Last modified May 6, 2022 : Skip generating docs (d29a239)