Trouble with serial console

I am having trouble today with creating a new VM with a serial console under KVM running Rocky 9.3 (5.14.0-362.8.1.el9_3 to be exact). The VM creates fine and I can complete the install with a minimal setup. I access the ssyetm and make my normal mods to /etc/default/grub:

GRUB_TERMINAL_INPUT="console serial"
GRUB_TERMINAL_OUTPUT="console serial"
GRUB_CMDLINE_LINUX="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/V1uv046-swap rd.lvm.lv=V0uv046/root rd.lvm.lv=V1uv046/swap audit=1 audit_backlog_limit=8192 console=ttyS0,115200"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"


# grub2-mkconfig -o /boot/grub2/grub.cfg

But after doing this, the virtual serial console does not get used much by the instance. The grub menu appears there, but none of the boot output goes there and I do not get a login prompt.

From an OS perspective, the ttyS0 is there - an echo to the device goes through and I can see that output when connected to it.

This is very weird because this setup works on my other Rocky 9.3 systems

Any ideas about what I am missing?

Is blsconfig enabled or disabled in your vm /etc/default/grub? If enabled then your commandline options have not been added to the /boot/loader/entries/ files. I discovered this the other day. Your grub2-mkconfig should contain this option to update those entries:

--update-bls-cmdline

This appears to be a change introduced in rl9.3 that alters the prior behavior of grub2-mkconfig.
The last post to this thread provides a link to RH 9.3 changes:
https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549/4

That’s it! I was suspicious that it was a recent OS change.

So to fix this, I have to change my build command to read:

grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline

So you did succeed or you were asking for confirmation? The commandline looks correct to me but I haven’t tested as I used grubby prior to learning this fact. Unfortunately it may not be uniformly implemented across RH OS’s such as rh8.9 or fedora.

I am reporting success. Worked like a champ

Thanks again

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.