Corporate LowHow to Remote Install CentOS 6 via VNC
For many reasons sometimes it is necessary to reinstall a linux on a server that is hosted in a remote location such as a Data center. You might want to install a new version of the Distribution, change the distribution, or you might need to re-partition you hard drive to be able to use LVM for example.
You have three options here:
1 - Go physically to the Datacenter
2 - Pay a datacenter guy to reinstall that for you… :(
3 - Install it Remotely using VNC
I chose the 3rd one since it seems to be the most convenient one. :-)
What do we need?
Network configuration of out server: IP Address, Gateway and DNS
If you have all those 3 informations you are good to go!
1 - Download bootstrap files (Kernel and ramdisk image).
# cd /boot
# mkdir centos6
# cd centos6
# wget http://mirror.centos.org/centos/6/os/x86_64/isolinux/vmlinuz
# wget http://mirror.centos.org/centos/6/os/x86_64/isolinux/initrd.img
Add an entry to the Grub Loader
# vi /boot/grub/menu.lst
## Add the following lines to the end of the file and count how many lines starts with tittle:
title CentOS 6 VNC Installation
kernel /centos6/vmlinuz vnc vncpassword=houseoflinux headless ip=10.0.0.10 netmask=255.255.255.0 gateway=10.0.0.1 dns=10.0.0.5 ksdevice=eth0 method=http://mirror.centos.org/centos/6/os/x86_64/ lang=en_US keymap=us
In my case with I had total 3 entries because I am updating a CentOS 5.6 to CentOS 6 and I had a couple update.
If we have 3 title entries there, the 3rd one should be our CentOS 6 installation but Grub starts counting the first one as 0, so our Centos 6 installation is actually 2 for grub.
Here is my menu.lst file:
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to...