Skip to content

Entries tagged "vnc".

Remote Centos 5 installation over VNC

Remember, remember... no, not the 5th of November, but to use 6-11 chars passwords for VNC when doing remote Centos installations!

CentOS install over VNC

Sometimes we need/want to reinstall a remote Centos (or other distro) server. We can either ask the data centre to do it, but this can be costly or we can do it ourselves as long as we still have a functioning system.
The procedure to install Centos (same for RHEL and Fedora) is amazingly simple, the only thing we need is a barely functional system with grub and good connectivity.
My main source of inspiration for this article was a blog post from Karanbir; I'm writing this only to have a lighter, easier to read and copy/paste from document.
In this case I'm also using Centos as the existing remote OS. Here we go:
cd /boot
wget -O pxe-initrd.img
wget -O pxe-vmlinuz

Now we need to add a grub entry using the downloaded files and set it default. Add something similar to your grub.conf/menu.lst (make sure to change the IP settings, password** etc):
title Centox-vnc-install
        root (hd0,0)
        kernel /boot/pxe-vmlinuz vnc vncpassword=blah132 headless ip= netmask= gateway= dns= hostname=blahserver ksdevice=eth0 method= keymap=uk lang=en_GB
        initrd /boot/pxe-initrd.img

You might also want to add "biosdevname=0 net.ifnames=0" to the vmlinux command line if you don't want your network interfaces to be renamed to em1 or eno1 which seem to happen in CentOS 6 and 7 under certain circumstances.

Double check the above entry is default and reboot. Keep pinging the IP you specified above, when it's up start vncviewer on IP:1. That's it, now you can reinstall your server(s) whenever you want without asking for KVMoIP or the data centre staff to do it for you.

** Achtung! Vncpassword needs to be 6-8 characters long otherwise you won't be allowed to connect.