CoreOS Installation

2014-11-24 Linux, Virtualization No comments

The installation of a CoreOS 444.5.0 Linux VM on VMware ESXi 5.5 is described as following.
Network Environment:
I have a LAN with DHCP service enabled. The network configuration of the LAN is
I have a PC running Scientific Linux version 7, whose hostname is YUN and IP address is
Before Installation:
Download CoreOS ISO image from The filename of the ISO image is coreos_production_iso_image.iso.
Create a VM on a VMware ESXi 5.5 server. The guest operating system type of the VM is Other 2.6.x Linux (64-bit).
Create SSH RSA keys on YUN as follows:
$ ssh-keygen -t rsa
The private key will be written into ~/.ssh/id_rsa and the public key will be written into ~/.ssh/
Copy the public key and create a configuration file named cloud-config as follows:

hostname: coreos1
    - ssh-rsa AAAAB3NzaC1yc2E...skip... username@yun

Installation Steps:
1. Connect the VM’s CDROM to the ISO image coreos_production_iso_image.iso and force the VM boot from its CDROM.
2. After boot, switch to root by sudo su -
3. Copy the file cloud-config from YUN by scp username@ .
4. Begin installation by coreos-install -d /dev/sda -C stable -c cloud-config
After installation:
Login to coreos1 from YUN by ssh -A

To upgrade all my Python packages installed by pip

2014-11-19 寫程式 No comments

# pip install -U `pip list -o | \
grep -v -i warning | grep -v -i "Could not find" | grep -v -i "use --allow-external" | \
cut -f1 -d' ' | tr "\n|\r" " "`


Scientific Linux 7 grub2-mkconfig

2014-10-21 Linux No comments

Scientific Linux 7 終於釋出了,趕緊拿來試裝在筆電上。筆電上原本有 Ubunto 14.04,和 Windows 8.1 做成 Dual Boot。
以 SL7 取代 Ubuntu 14.04,安裝過程還算順利。但是安裝完畢重新開機時,發現 Grub 的開機選單裡面沒有 Windows 8.1!
( 繼續閱讀… )

CentOS 7 firewall

2014-10-14 Linux No comments

CentOS 7 uses firewalld instead of iptables.
To open service ports and allow external connections, edit /etc/firewalld/zones/public.xml
( 繼續閱讀… )

How to get rid of GPT

2014-10-14 Linux No comments

A disk with GPT partition table can not be used to install Linux.
To get rid of GPT, we must use GNU parted
# parted /dev/sda
# mktable msdos
# quit

Install CentOS 7 Using Software RAID

2014-10-14 Linux No comments

CentOS 7 installation uses a partition tool far too stupid.
There is no way to setup software raid in the CentOS 7 installer.
To install CentOS 7 with software raid, I have to create software raid manually in advance.
First, press Ctrl+Alt+2 to switch to a console.
Then fdisk /dev/sda and fdisk /dev/sdb to setup partitions.
Note that partitions for software raid should be of type fd not of type 83.
( 繼續閱讀… )

MEAN: MongoDB, Express.js, AngularJS and Node.js

2014-09-19 寫程式 No comments

A good tutorial at

SysVinit to Systemd Cheatsheet

2014-08-27 Linux No comments

SysVinit to Systemd Cheatsheet

Multi-Boot System Time Conflict

2014-07-27 Linux No comments

同一部電腦安裝 Windows 和 Linux 做成多重開機,常常發現在 Linux 環境中時間是正確的,但是重新開機進入 Windows 之後,時間就不對了,在台北會發現時間差了 8 小時。
這裡 找到了解答,分成兩個方向,其一是改 Windows,另外一個解是改 Linux,則一為之即可。
( 繼續閱讀… )

How to enable Atheros AR242x / AR542x Wireless Network Adapter on CentOS 7

2014-07-15 Linux No comments

The Linux kernel version 3.10 used by CentOS 7 does not come with a driver for Atheros AR242x / AR542x Wireless Network Adapter. When my Lenovo X200 laptop boots into CentOS 7, the WiFi light turns off. Though the WiFi light was blinking as it boots into Windows 8.

Issue a lshw command to check the hardware:
# lshw -C network

It shows
*-network UNCLAIMED
description: Ethernet controller
product: AR242x / AR542x Wireless Network Adapter (PCI-Express)
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list
configuration: latency=0
resources: memory:f2500000-f250ffff

Which means no proper driver for the Atheros wireless network adapter is loaded.

Issue a modprobe command to load kernel module driver ath5k,
# modprobe -v ath5k

It shows
modprobe: FATAL: Module ath5k not found.
( 繼續閱讀… )