Install Fedora, CentOS, Rocky Linux, and Alma Linux via Serial Console – And VNC!

I have a similar post for doing this with Ubuntu. The process here is similar, but simpler.

You can use this with any Red Hat style ‘Anaconda’ installer, from Alma Linux Minimal, to Fedora’s biggest Workstation installer. There is no need to find a special boot.iso. I have been doing Alma Linux installs on a PC Engines APU4D4 with this method, so I thought I’d put up a quick post.

Firstly, copy the install image you want to use onto a USB disk. To do this, I use the DD command. Be careful, of course, since you need to make sure you’re copying the image to the correct disk.

dd if=/the/path/to/Installer.iso of=/your/thumbdrive bs=4k status=progress && sync

Then, wire up the APU system: Insert your USB disk, connect a network cable to one of the jacks, and connect the serial interface to your computer.

I talk to the APU via another PC using the screen command and a USB serial adapter. The APU is setup to talk serial at the 115200 speed by default, but you’ll want to check the manual for your device to see what it’s defaults are. Likewise, make sure you know which serial device on your system is the correct one.

screen /dev/ttyUSB0 115200

or, depending on how your system is setup:

sudo screen /dev/ttyUSB0 115200

Once you get that session going, you can apply power to the APU.

Within a couple of moments you’ll start to see some text come in on the terminal. The APU will default to booting the USB drive and you’ll then see the installer’s Grub interface. It will give you 60 seconds to either press enter, or make changes to the prompt. As with Ubuntu, we’ll want to press to edit the default boot command.

When I hit backspace to clear some items it makes a mess of the screen but works just fine. It’s just the nature of serial terminals. When you hit the backspace key, it has to rewrite the whole line.

I remove the word ‘quiet’, though you’re welcome to leave it. I then add, just like with Ubuntu, the commands to tell it to use the console.

console=tty0 console=ttyS0,115200n8

In addition to those changes, I also like to enable the VNC installer. It works exactly the same as the installer you would see on a computer with a graphics interface, just across the network. It’s much easier to use than the Ubuntu text installer. Though, you do have the option of a text installer here as well (Just use the inst.text option).

You can enter these two commands after the serial details, before pressing enter. inst.vncpassword is not required, but is wise. Especially if you’re doing this install on a non-trusted network.

inst.vnc inst.vncpassword=yourpasswordhere

Then, press enter and be patient. If you did remove the word quiet, you’ll see lots of information flowing by but on the APU system it takes a good 4-5 minutes before the VNC connection is ready. You’ll see this when it’s ready. Take note of the IP address. You can set one at boot, but if the network has DHCP it’ll just pick one up.

Complete your install as normal, and then reboot.

That’s it. You’re done. Anaconda is smart enough to see that you installed with a serial console, and very kindly adds that information to Grub for you so there is no need to insert any commands later. The serial console will be working even on your first boot into the OS.

One Reply to “Install Fedora, CentOS, Rocky Linux, and Alma Linux via Serial Console – And VNC!”

  1. You can skip the USB stick altogether if you just go to the iPXE prompt and do something like

    dhcp
    kernel https://ftp.funet.fi/pub/mirrors/rockylinux.org/8/BaseOS/x86_64/os/images/pxeboot/vmlinuz devfs=nomount ip=dhcp console=ttyS0,115200n8
    initrd https://ftp.funet.fi/pub/mirrors/rockylinux.org/8/BaseOS/x86_64/os/images/pxeboot/initrd.img
    boot

    Of course, you’ll want to use your local mirrors for quick downloading. This will get you into anaconda where you can start the installer in text mode or VNC as you prefer.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.