Easy Tutorial
❮ Fastjson Intro Zookeeper Leader ❯

Quick Installation Guide for CoreOS on PC

Category Programming Technology

Purpose

To install and deploy the Linux operating system as quickly as possible. The installation is fast and simple, requiring almost no time to start running Docker. The system runs very fast, utilizing memory as a disk.

My Situation

I have a Win8 laptop for occasional gaming, but installing a dual-boot Linux system might take me a whole day. All my business operations can run in Docker, and my laptop has ample memory (16GB, thanks to Professor Jiang from HUST).

Preparation

Getting Started

Updates

Simply update the ISO file used for booting.

Drawbacks

This setup is recommended for specific business tasks. For more complex operations, more optimizations may be needed.

Configuration

My Initialization Script Reference

mkdir /root/.ssh
echo "ssh-rsa xxx..(omitted)....xx [email protected]" > /root/.ssh/authorized_keys

rm -rf /var/lib/docker
ln -s /mnt/docker /var/lib/docker
#echo 'DOCKER_OPTS="--registry-mirror=http://XXXXX.m.daocloud.io"' >> /run/flannel_docker_opts.env
#systemctl daemon-reload
systemctl restart docker
# using disk

First, import the RSA key, then create a symbolic link to the Docker location.

Add DaoCloud acceleration (although the official documentation doesn't mention CoreOS, there are methods provided by experts). I found no need for acceleration, so it's commented out as a backup.

Pitfalls with systemd

If Docker returns an error -1, the container will crash. However, systemd also uses scopes.

When starting a problematic container, you might see:

Error response from daemon: Cannot start container test: [8] System error: Unit docker-e10eb86807cd9971fc03a8eee732771193d506ed2ba678fdf4292916a9fb072c.scope already exists.

To resolve this:

systemctl stop docker-e10eb86807cd9971fc03a8eee732771193d506ed2ba678fdf4292916a9fb072c.scope

CoreOS.iso Pitfall 2

Repeatedly confirming KnowHosts.

Solution reference: https://github.com/lijianying10/FixLinux/blob/master/note/取消sshPublicKeyKnowHost认证.md

Conclusion

Deploying Linux on a PC using this method is incredibly convenient. Those familiar with Docker can set it up according to their needs in about 20 minutes.

Source: http://www.philo.top/2015/07/16/pc-docker/

** Click to Share Notes

Cancel

-

-

-

❮ Fastjson Intro Zookeeper Leader ❯