Installing CoreOS from ISO

Installing CoreOS on your own hardware is quite simple when you know what you are doing. Here are the steps I used to install CoreOS on an old PC Chasis I had laying around.

  1. Download the latest CoreOS ISO. First you need to choose the Channel you want to use from https://coreos.com/docs/running-coreos/platforms/iso/
  2. Burn the ISO to a CD or USB. I used http://www.linuxliveusb.com/ to create a Bootable USB Disk.
  3. Generate a Private Key. Since I was using windows I downloaded and installed PuTTYGen from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
  4. Create a cloud-config.yaml file. This file is required to ensure that you can log into the CoreOS device after installation. Mine consisted of the following [code]#cloud-config users:- name: nirving ssh-authorized-keys: - ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA9yiF4mgijCjTJfEd/loA/C648krW05+fBXYtxNbLnfzwkrRZmbl9k0nIzJcKV4w3N9mmnI/udF7YTAHrSxTnHQhlsa445I6T+Y7OTvEQmqimBdymeUeiNiXUEmdgMMkGgN/EvHgc6Gs+xmGY1A4J0FZdwhe/0C4UpZgzLU3n2imVfFCEnJC+c7K+gG1EjIhw6NjSjGy+gXDsGOYcuia/ERTjUK2XxdGsGIktyBC0rYIg04XQ6+k6rvoYxW4HjK7wZj2vaOdnxqqbnXQxAxjY0WfMer2gqSP+xNTHAEITDpHbD2EosAAYfVfoWKpg5mnVqDf9BGCZHyoHuZiH5ynomQ== rsa-key-20150711 groups: - sudo[/code] Make sure that this is saved in Unix format, otherwise it will cause issues later. I am not of the exact syntax to enable root access, but the user nirving has sudo so it can create the necessary configuration after installation. Note: replace the ssh-rsa entry with the public key generated previously.
  5. Boot the PC device of the USB.
  6. When it has finished loading, you will need to issue the following commands [code lang="bash"] sudo su - mount /dev/sdb1 /mnt coreos-install -d /dev/sda -c /mnt/cloud-config.yaml [/code]
  7. When finished you can reboot the PC Device and wait for it to start up.
  8. Connect to the PC Device via Putty or SSH using the Private Key created before and the user configured in the cloud-config.yaml file.

Add Static IP

You will need to create a file containing the following, just remember to replace with the details you require for your network.

[code]

[Match] Name=enp2s0

[Network] Address=10.0.0.100/24 Gateway=10.0.0.1 DNS=10.0.0.1

[/code]

Allow Root to SSH in

Log in as the user created in the cloud-config.yaml file and issue the following commands

[code]

sudo su - cp -rf ~/nirving/.ssh .

[/code]

You should now be able to connect using the same Private Key, although it is advisable to use a different key.

 

Loading Google+ Comments ...