I wanted to try out Container Linux on a baremetal machine, with the intention of having it run a single-node OpenShift Kubernetes (kubeadm) install for homelab experiments. However, I was pretty let down by the documentation on how to install from an ISO.

Most of the documentation is either for installing on a cloud provider or by running an install script on an already running Linux box. This is apparently because, by their own admission in the "Known Limitations" of booting from an ISO: "There is no straightforward way to provide an Ignition config." The Ignition config is the JSON-output of a YAML file called the "Container Linux Config" that has been run through their Config Transpiler

Rather than going through the hassle of getting the Config Transpiler set up on the ISO after booting, the steps below just use a still valid (although deprecated) method called cloud-config to provide a YAML file that the install script can actually interpret.

Installation Steps

  1. Download the ISO from here
  2. Make a bootable USB with Rufus
  3. Boot your baremetal device to the USB
  4. Verify the storage device you want to install CoreOS on using GParted
    • sudo parted to get into the application
    • print all to see all devices/partitions
    • quit to exit
  5. On your local machine (not the CoreOS box), get your SSH public key
    • cat ~/.ssh/id_rsa.pub
    • Save that output to a file on your computer named something like "ssh.txt" and serve it up over HTTP
      • My preferred way to set up a super simple HTTP server is to use a built-in module of Python3.
      • cd to the directory where you saved your ssh.txt file and run python3 -m http.server
      • If you're on Windows, you may need to run py -3 -m http.server instead.
  6. Retrieve the SSH key on your CoreOS box
    • wget 192.168.1.3:8000/ssh.txt
      • Replace the IP address to whatever the IP is of your local machine.
      • Port 8000 is the default port that the http.server Python module listens on
    • Edit the file with sudo vim ssh.txt
    • Change it to look like:
      #cloud-config
      ssh_authorized_keys:
        - <insert your SSH key here>
      
    • It must include the "#cloud-config" part at the top
    • Save it with :wq
    • Rename the file
      • mv ssh.txt config.yaml
  7. Install CoreOS with:
    • sudo coreos-install -d /dev/sda -C stable -c ~/config.yaml
    • Replace /dev/sda with the path of another device if you decided in step 4 that you want to install it somewhere else.
    • -C stable specifies that you want the Stable channel for updates. Other options include Alpha and Beta
  8. Reboot the computer
    • Run reboot
  9. ssh to your new install from the machine whose SSH public key you provided
    • ssh core@192.168.1.50
  10. You're all done!

Notes

  • The default user is core and by default has sudo access to everything on the machine without having to type in a password
  • The default SELinux status is Permissive
  • CoreOS has no package manager and will send updates "Over-the-Air"
  • By default, Container Linux uses networkd for networking. You can configure static networking by following the instructions here
  • UEFI boot is not supported, so you must boot the system in BIOS compatibility mode.