coldabhishek
Active Member
It is actually very simple to do, but this is how…
Execute these commands :
For 32-bit CentOS:
For 64-bit CentOS:
Then copy the pxe boot files to the /boot partition
Install grub bootloader:
Edit the bootloader file:
Paste this in the bootloader file:
For 32-bit CentOS:
For 64-Bit CentOS:
Replace:
YOURPASSWORD = A password of your choice, this is a a temporary password and is only used during the installation via VNC
IPADDR = The main IP address of your server
GATEWAY = The gateway IP address of your server
You can see the gateway ip by issuing:
Once you have done all this save the bootloader file.
Next we need to install GRUB into the MBR of the server's disk
Once that’s done, we need to reboot the box:
Wait a couple of minutes for the server to come back online (you can monitor it using ping requests). Once the server is contactable again fire up a VNC client and in the connection box type in the IP address of your server followed by “:1″, for example, if your IP was 192.168.0.5, the VNC connection box will read 192.168.0.5:1
Enter the password you specified as and you will be presented a VNC window at the first step of the CentOS installation screen.
Follow the installer (make sure you leave the network options alone – for now at least). After the installation completes and reboots, you now have a PROPER CentOS installation.
Execute these commands :
Code:
mkdir /cleaninstall
cd /cleaninstall
For 32-bit CentOS:
Code:
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/images/pxeboot/initrd.img
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/images/pxeboot/vmlinuz
For 64-bit CentOS:
Code:
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/initrd.img
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/vmlinuz
Then copy the pxe boot files to the /boot partition
Code:
cp vmlinuz /boot/vmlinuz.cent.pxe
cp initrd.img /boot/initrd.img.cent.pxe
Code:
yum install grub
Edit the bootloader file:
Code:
nano -w /boot/grub/menu.lst
Paste this in the bootloader file:
For 32-bit CentOS:
Code:
default 0
timeout 30
title Centos Install (PXE)
root (hd0,0)
kernel /boot/vmlinuz.cent.pxe vnc vncpassword=YOURPASSWORD headless ip=IPADDR netmask=255.255.255.0 gateway=GATEWAY dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/ lang=en_US keymap=us
initrd /boot/initrd.img.cent.pxe
For 64-Bit CentOS:
Code:
default 0
timeout 30
title Centos Install (PXE)
root (hd0,0)
kernel /boot/vmlinuz.cent.pxe vnc vncpassword=YOURPASSWORD headless ip=IPADDR netmask=255.255.255.0 gateway=GATEWAY dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/ lang=en_US keymap=us
initrd /boot/initrd.img.cent.pxe
Replace:
YOURPASSWORD = A password of your choice, this is a a temporary password and is only used during the installation via VNC
IPADDR = The main IP address of your server
GATEWAY = The gateway IP address of your server
You can see the gateway ip by issuing:
Code:
route -n |grep UG
Once you have done all this save the bootloader file.
Next we need to install GRUB into the MBR of the server's disk
Code:
grub-install /dev/sda
grub-install --recheck /dev/sda
Once that’s done, we need to reboot the box:
Code:
shutdown -r now
Wait a couple of minutes for the server to come back online (you can monitor it using ping requests). Once the server is contactable again fire up a VNC client and in the connection box type in the IP address of your server followed by “:1″, for example, if your IP was 192.168.0.5, the VNC connection box will read 192.168.0.5:1
Enter the password you specified as and you will be presented a VNC window at the first step of the CentOS installation screen.
Follow the installer (make sure you leave the network options alone – for now at least). After the installation completes and reboots, you now have a PROPER CentOS installation.