Frequently Asked Question

How to access Linux system console through Serial Port in VMware Workstation
Last Updated 3 years ago

To enable the linux system base console on a serial port, which will help in troubleshooting purposes when physical console access is limited, the following could be of great help.

1. In case of VMware workstation, add a serial port in VMSetting (the linux server for which serial console access is required), configure the serial port to attach to named pipes. Give the pipe name as \\.\pipe\com_1. Set "This end is server" and "The other end is application" in the VMware workstation.

image

To access this VM, use putty. Under Putty. set connection type as Serial port, Serial Line configuration as \\.\pipe\com_1 and Speed (baud rate) as 115200

image

2. Within the linux system, In the /boot/grub/grub.cfg file add the following entries

serial --unit=0 --speed=115200
terminal_input console serial
terminal_output console serial

The ideal way to make these entries is using settings in /etc/default/grub and running update-grub command in the linux system. Settings for the above in /etc/default/grub are as follws

GRUB_TERMINAL="serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

In bios based systems, run the following command

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

In UEFI based system, run the following command

grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

The above will make the necessary entries in grub.cfg. 

3. Reboot the system in the workstation and open putty with the above entries in the base system. You should be able to access the linux console through putty.

This can be leveraged to access console on Oracle OCI cloud shell using similar functionality. 

Loading ...