* Home :: Get a random password :: Get a multi-word password :: What is my IP? (v4 | v6)
* My projects

How to install AlmaLinux 9 remotely over VNC

Tags: howto,almalinux

Date: 20230730

I have this old CentOS 7 machine I've been meaning to upgrade, however the server is in a remote data centre and I have no IPMI/etc access to it.

So I switched to plan B, remote install over VNC which I used many times, thanks to knowledge learned from Fabian.
I would have loved to install Debian 11 if it had this capability, but as it hasn't Alma will do for now.

The remote VNC installation capability has largely remained the same throughout the years, but few things here and there have changed, such as the files to use and the syntax. Let's have a look at this:

1 - With past versions of CentOS/EL, such as 6 or 7 you would be using the pxeboot images, however with version 9 I had to use the isolinux vmlinuz and initrd.
2 - Most of the Anaconda arguments now need to be prefixed with "inst", ie "inst.vnc" instead of "vnc".

Let's cut to the chase, so what I have done was to download the right kernel and initrd and execute it with kexec and the correct parameters. Observe:

yum -y install kexec
cd /boot
wget http://mirrors.coreix.net/almalinux/9/BaseOS/x86_64/os/isolinux/initrd.img http://mirrors.coreix.net/almalinux/9/BaseOS/x86_64/os/isolinux/vmlinuz
kexec --initrd=./initrd.img -l ./vmlinuz --command-line="ifname=eth0:00:28:b9:7b:ca:09 biosdevname=0 net.ifnames=0 bootdev=eth0 \
ip= nameserver= \
inst.vnc inst.vncpassword=c00lpass inst.repo=http://mirrors.coreix.net/almalinux/9/BaseOS/x86_64/os/"
kexec -e

You'll obviously need to use your own IP and MAC. Pay particular attention to "ifname=eth0:00:28:b9:7b:ca:09 biosdevname=0 net.ifnames=0 bootdev=eth0".
These arguments make sure we don't use silly "random" names for the NICs and also makes sure the OS locks eth0 to whichever NIC has that MAC address, this way there's no way Anaconda (the installer) will try to use another interface and get stuck.

In addition, and this is pretty well known, but worth remembering, VNC can't handle passwords larger than 8 characters, so pay attention to use the right amount of chars here.

I am using kexec here, so make sure it is installed, it is a utility capable of "live loading" a new kernel, in the past alternative methods would have been to add a new kernel entry in Grub or LILO and boot it - in fact this should still work btw!

(c)The Nux(tm) ;-)

No CSS, no Javascript, no some HTML.
No ads, no tracking, no cookies.