"This is not a supported method of installing the operating system” when reinstalling OS X
Update:

Tried Internet Recovery and still couldn't get Internet work in Terminal ( can't setup DNS, /etc/hosts file is on a readonly filesystem).

I went back to to try every boot key options I can find online, and Cmd-opt-PR to reset NVRAM fixed it.