Installing CoreOS to Disk

Install Script

There is a simple installer that will destroy everything on the given target disk and install CoreOS. Essentially it downloads an image, verifies it with gpg and then copies it bit for bit to disk.

The script is self-contained and located on GitHub here and can be run from any Linux distribution. You cannot normally install CoreOS to the same device that is currently booted. However, the CoreOS ISO or any Linux liveCD will allow CoreOS to install to a non-active device.

If you boot CoreOS via PXE, the install script is already installed. By default the install script will attempt to install the same version and channel that was PXE-booted:

coreos-install -d /dev/sda

If you are using the ISO with VMware, first sudo to root:

sudo su - root

Then install as you would with the PXE booted system, but be sure to include user information, especially an SSH key, in a Cloud-Config file, or else you will not be able to log into your CoreOS instance.

coreos-install -d /dev/sda -c cloud-config.yml

Choose a Channel

CoreOS is released into stable, alpha and beta channels. Releases to each channel serve as a release-candidate for the next channel. For example, a bug-free alpha release is promoted bit-for-bit to the beta channel.

The alpha channel closely tracks master and is released to frequently. The newest versions of docker, etcd and fleet will be available for testing. Current version is CoreOS 723.1.0.

If you want to ensure you are installing the latest alpha version, use the -C option:

coreos-install -d /dev/sda -C alpha

The beta channel consists of promoted alpha releases. Current version is CoreOS 717.1.0.

If you want to ensure you are installing the latest beta version, use the -C option:

coreos-install -d /dev/sda -C beta

The Stable channel should be used by production clusters. Versions of CoreOS are battle-tested within the Beta and Alpha channels before being promoted. Current version is CoreOS 681.2.0.

If you want to ensure you are installing the latest stable version, use the -C option:

coreos-install -d /dev/sda -C stable

For reference here are the rest of the coreos-install options:

-d DEVICE   Install CoreOS to the given device.
-V VERSION  Version to install (e.g. current)
-C CHANNEL  Release channel to use (e.g. beta)
-o OEM      OEM type to install (e.g. openstack)
-c CLOUD    Insert a cloud-init config to be executed on boot.
-t TMPDIR   Temporary location with enough space to download images.
-v          Super verbose, for debugging.
-b BASEURL  URL to the image mirror

Cloud Config

By default there isn't a password or any other way to log into a fresh CoreOS system. The easiest way to configure accounts, add systemd units, and more is via cloud config. Jump over to the docs to learn about the supported features.

The installation script will process your cloud-config.yaml file specified with the -c flag and place it onto disk. It will be installed to /var/lib/coreos-install/user_data and evaluated on every boot. Cloud-config is not the only supported format for this file — running a script is also available.

A cloud-config that specifies an SSH key for the core user but doesn't use any other parameters looks like:


  - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g+ZTxC7weoIJLUafOgrm+h...

Note: The $private_ipv4 and $public_ipv4 substitution variables referenced in other documents are not supported when installing via the coreos-install script.

To start the installation script with a reference to our cloud-config file, run:

coreos-install -d /dev/sda -C beta -c ~/cloud-config.yaml

Manual Tweaks

If cloud config doesn't handle something you need to do or you just want to take a look at the root btrfs filesystem before booting your new install just mount the ninth partition:

mount -o subvol=root /dev/sda9 /mnt/

Using CoreOS

Now that you have a machine booted it is time to play around. Check out the CoreOS Quickstart guide or dig into more specific topics.