Upgrading to CentOS4, over a remote vnc connection

If you are running CentOS3 or even for that matter any other Linux distro and want to upgrade your machine to CentOS4 – and the machine is sitting on the other side of the globe – the easiest and most effective way to do so is using the remote vnc install method with the ‘upgradeany’ directive to the anaconda-installer.

Here is a extremely short mini guide to remote installation over vnc ( for the x86/i386/ia32 Architecture, make adjustments for any other arch ):

You need the PXE boot images from
http://mirror.centos.org/centos/4/os/i386/images/pxeboot/ – and drop them into the /boot directory. Then setup grub.conf to boot this vmlinuz file as kernel and initrd.img as the initrd.

on the kernel line you need the following additional info :

vnc vncconnect= headless ip=dhcp ksdevice=eth0 method=http://mirror.centos.org/centos/4/os/i386/ lang=en_GB keymap=uk

( replace with the IP address of your client machine )

so the kernel line becomes ( in one line ):

kernel /boot/vmlinuz vnc vncconnect= headless ip=dhcp ksdevice=eth0 method=http://mirror.centos.org/centos/4/os/i386/ lang=en_GB keymap=uk

On the client machine, you need to run ‘vncviewer –listen’ which will setup vncviewer and have it ready to accept an incoming connection on port 5500. If you are behind a NAT, router, firewall etc – make sure that your machine has inward access on port 5500.

Reboot the main server with the new settings in grub.conf as default. It should boot and connect to your listening vncviewer and allow you to manually run through a remote install.

couple of extra points here :
1. since you are moving from C3 to C4, you would want the ‘upgradeany’ line in there with the kernel param’s as well. This is also known to work for Mandrake and SuSe, but you are going to be much better of reinstalling for those distro’s.

2. Make sure there is a recovery plan, in the event the system does not boot to plan.

3. Test locally, test again, and then test once again. Few things are as much fun as as a server sitting in a DataCenter that didn’t come back up ( has not happened with me as yet, 15+ machines worked – but you never know. Sod’s law. )

4. the line is setup for a dhcp IP get, if you need to drop a specific network setup replace the ip=dhcp with something like this :
ip= netmask= gateway= dns= hostname=agni.build.karan.org ( note that the NameServer is refered to as dns=x.x.x.x and not nameserver=x.x.x.x )

Obviously, replace the IP’s etc with things that mean something to you, in your specific situation.

5. The setup’s here are all for i386, change that to reflect whatever arch you are install on.

Thats about it. To recap, get the pxe images, drop them into /boot, setup /boot/grub/grub.conf as required to boot these images, setup the kernel line in the grub.conf to reflect choices, setup the client machine with vncviewer –listen, reboot main server.

Let me know how you get along. Test please.

Karanbir Singh { http://www.karan.org/ }
Read more at www.karan.org


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s