3

How would I go about installing CoreOS on a single machine as the host OS?

I have read "Installing CoreOS to Disk" and ran the coreos-install script from Debian and CentOS live CDs, but both seem to miss the -p argument for the lsblk command which the script needs to load config files. Even after I updated util-linux, it is still not working.

Is using a live CD the right approach? PXE isn't an option in my situation.

Solution: In the end I used the latest Arch linux live cd, that worked fine.

$ wget https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install
$ sudo bash coreos-install -d /dev/sda
$ mkdir rootfs
$ mount -t btrfs -o subvol=root /dev/sda9 rootfs #sda9 is the default root partition
$ mkdir -p rootfs/var/lib/coreos-install
$ wget http://bit.ly/abcd  #the location of your cloud config file
$ mv abcd rootfs/var/lib/coreos-install/user_data
thijsai
  • 149
  • 1
  • 6

2 Answers2

4

It looks like -p (alternately --paths) was added in util-linux 2.24. Did you try a live system with that version?

sciurus
  • 12,493
  • 2
  • 30
  • 49
4

Worked for me using Ubuntu Trusty livecd

~$ sudo wget https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install
~$ sudo chmod +x coreos-install
~$ sudo ./coreos-install -d /dev/sda -C alpha -c ~/cloud-config.yaml

Though can you can mount the /dev/sda to do manual tweaking (rather than using/creating a cloud-config.yaml) via...

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

.. like removing the root and core password, create systemd unit file for docker, etcd and fleet.

  • Just found out that the $public_ipv4 and $private_ipv4 in cloud-config (user_data) does not work in installing to disk. Even if reboot the system many times. – sugatang itlog Jul 27 '14 at 00:57