U disk bare metal installation CoreOS

The author has two PCs, and I plan to install coreos on the other one for development purposes.

Prepare materials:
    one U disk, 512M is enough.
    CoreOS image: http://stable.release.core-os.net/amd64 -usr/current/coreos_production_iso_image.iso to
    start the U disk creation tool rufus: https://rufus.akeo.ie/downloads/rufus-2.16.exe

Notes:
    Making a U disk boot disk will format the U disk, so pay attention to backup The information in the U disk.
    If the installation fails because you cannot access some websites, please go online scientifically. The good news is that the author succeeded without a ladder.
    This article only covers the most basic installation process, and does not consider customization. yaml configuration.

Make a boot disk:
     write coreos_production_iso_image.iso to the U disk with Rufus, as shown in the figure.


 

Generate RSA key:
   There are many methods, the author uses Xshell (war reparations version), as shown in the figure:


 

Edit cloud-config.yml:
    Fill in the file below with the public key you just generated.

#cloud-config
users:  
   - name: core
     ssh-authorized-keys:
       - ssh-rsa your public key
   - groups:
       - sudo
       - docker   

    Then put cloud-config.yml into the U disk. The final U disk content is shown in the figure:


 
Start the installation:
      plug in the U disk to the target PC, choose to boot with the U disk in the BIOS, and see the core@localhost~$ command prompt after startup.
      The device number of the U disk is sdb1:

core@localhost~$ ls /dev|grep sdb
sdb
sdb1

      Mount the U disk to /mnt, the purpose is to read the cloud-config.yml in the U disk next.

core@localhost~$ sudo su root
core@localhost~$ mount /dev/sdb1 /mnt
core@localhost~$ cat /mnt/cloud-config.yml

 
    Everything is ready to start the installation.


    Excuting an order:

coreos-install -d /dev/sda -C stable -c /mnt/cloud-config.yml

 
    In less than five minutes, the installation was successful.

Installing cloud-config...
Success! CoreOS stable 1409.8.0 is installed on /dev/sda

 

SSH login:


 
      login successful:

Connecting to 192.168.85.143:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

WARNING! The remote SSH server rejected X11 forwarding request.
Container Linux by CoreOS stable (1409.8.0)
core@localhost ~ $

 
    Full text complete.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326276183&siteId=291194637
Recommended