Tdd Apps

# CoreOS baremetal server installation

Jan 16, 2017 2 minute read

CoreOS is a lightweight Linux distribution designed specifically to run containers. Unfortunately its installation on baremetal servers is not as streamlined as other Linux distributions. These are the steps I took to install CoreOS on a couple of physical machines.


  1. Download and burn a CoreOS ISO

  2. Generate ssh keys to log into the boxes

  3. Generate a cloud-config.yml file

     cat > cloud-config.yaml <<EOL
         - `cat`

    This cloud-config.yaml can be reused to provision multiple computers

  4. Copy the cloud-config.yaml file to a flash drive
    Additional cloud-config.yaml help

Prepare the installation

  1. Connect the computer to the LAN

  2. Boot up from the CD

  3. Wait until a command prompt appears
    More information on the CoreOS installation to disk

Copy the cloud-config.yaml into the server

  1. Plug in the flash drive with the cloud-config.yaml

  2. List the physical disks

  3. Determine what is the first partition of the USB drive. In this example we’ll use /dev/sdb1 where /dev/sdb is the physical device

  4. Copy the cloud-config.yaml

     sudo su - root
     mkdir ~/flash
     mount -o ro /dev/sdb1 ~/flash
     cp ~/flash/cloud-config.yaml ~/
     umount /dev/sdb1
     rm -Rf ~/flash
  5. Unplug the flash drive

Run the installation

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

At this point the server should boot up using DHCP. Its console will display its IP and MAC address.

Remote into the server

ssh into the box using your private RSA key

ssh -i id_rsa [email protected]


BONUS: Configure the network to use a static IP

  1. List the Network Interfaces

  2. Determine the name of the Ethernet Adapter. In this example we’ll use eno1

  3. Execute the following commands using the appropriate values for your network

     sudo su - root
     cat > /etc/systemd/network/ <<EOL

    More information on CoreOS network configuration

At this point the server should boot up using the new IP.

Never miss a post. Subscribe to our newsletter