Booting into the livecd, its pretty basic:
- Setup networking with “ip addr add” etc.. commands:
# ip addr add <address>/<masklen> dev eth0 # ip link set dev eth0 up # ip route add default via <default gw>
- Set root user password and log in via ssh
- Do something similar to below, basically create a cloud-config, and call the coreos-install command.
?[~]> sh root@cartman root@cartman's password: root@cartman's password: CoreOS (stable) Update Strategy: No Reboots root@localhost ~ # export http_proxy=http://proxy.com:3128 (needed to use a proxy in my environment, which works fine with the coreos installer) root@localhost etc # rm resolv.conf (had to do this to tear it away from systemd) root@localhost etc # vim resolv.conf (and then threw in what I needed) root@localhost etc # cd /home/core/ root@localhost core # coreos- coreos-cloudinit coreos-install coreos-postinst coreos-setgoodroot coreos-tmpfiles root@localhost core # coreos-install -d /dev/sda -C stable -c cloud-config.yaml Downloading the signature for http://stable.release.core-os.net/amd64-usr/410.2.0/coreos_production_image.bin.bz2... 2014-10-10 02:36:58 URL:http://stable.release.core-os.net/amd64-usr/410.2.0/coreos_production_image.bin.bz2.sig [543/543] -> "/tmp/coreos-install.DVoGTAwr2J/coreos_production_image.bin.bz2.sig"  Downloading, writing and verifying coreos_production_image.bin.bz2... 2014-10-10 02:37:36 URL:http://stable.release.core-os.net/amd64-usr/410.2.0/coreos_production_image.bin.bz2 [188892013/188892013] -> "-"  gpg: Signature made Thu Oct 2 02:52:46 2014 UTC using RSA key ID E5676EFC gpg: key 93D2DCB4 marked as ultimately trusted gpg: checking the trustdb gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: Good signature from "CoreOS Buildbot (Offical Builds) <[email protected]>" [ultimate] Installing cloud-config... Success! CoreOS stable 410.2.0 is installed on /dev/sda root@localhost core #
Using the following “cloud-config”, you can specify configuration for the resulting installed system. Here, i set a ssh key for the “core” user, a hostname, setup resolv.conf, and static ip assignment. See this page for more info.
Keep in mind, this cloud-config is run at every boot. The file you apply when running coreos-install gets copied into a directory on the hard disk “/var/lib/coreos-install/user_data”, so you can edit further to add more things the system should do at start:)
#cloud-config ssh_authorized_keys: - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAvAV7ehmYlZ0kZm9anXnSalFgP3YBie8Zbez... hostname: cartman write_files: - path: /etc/resolv.conf permissions: 0644 owner: root content: | nameserver 10.1.0.1 nameserver 10.1.1.1 coreos: units: - name: static.network runtime: yes content: | [Match] MACAddress=00:50:56:b5:ce:ff [Network] Gateway=10.10.10.1 Address=10.10.10.10/23 DNS=10.1.0.1
If I had to do this again, I would have probably just made a user account for myself and setup my groups and key right there:
users: - name: elroy passwd: $6$5s2u6/jR$un0AvWnqilcgaNB3Mkxd5yYv6mTlWfOoCYHZmfi3LDKVltj.E8XNKEcwWm... groups: - sudo - docker ssh-authorized-keys: - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g+ZTxC7weoIJLUafOgrm+h...
Ohh wait, you want to switch to the beta channel?
echo "GROUP=beta" > /etc/coreos/update.conf sudo systemctl restart update-engine
It’s probably also important that you know about the available update strategies. The default is most likely fine for most people.