Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to configure agetty for /dev/ttyS0? Post 303045487 by bodisha on Friday 27th of March 2020 11:48:33 AM
Old 03-27-2020
How to configure agetty for /dev/ttyS0?

I'm attempting to connect two Oracle VirtualBox guests (Both CentOS 8 running on Windows 10) and have one guest connect to the serial port (/dev/ttyS0) of the other guest and have to go through the login process.... Unfortunately I've been unable to do this

I've configured the serial ports for both guests to use "COM1"... Set their Port Mode to "Host Pipe"... named the pipe on both machines "\\.\pipe\serial1"... I selected "Connect to existing pipe/socket" on the slave guest

Image

Image

I then copied the serial getty template

Code:
cp /usr/lib/systemd/system/serial-getty@.service /etc/systemd/system/serial-getty@ttyS0.service

I edited the baud rate in the serial-getty@ttyS0.service file

Code:
ExecStart=-/sbin/agetty --keep-baud 9600 %I $TERM

and then reloaded the daemon and started the service

Code:
# systemctl daemon-reload
# systemctl start serial-getty@ttyS0.service
# systemctl enable serial-getty@ttyS0.service

I've tried to use putty/cu/minicom to connect from the slave to the master... Unfortunately a login prompt never appears... If it matters both VM guests have their network adapters set to "bridge adapter" and can connect to the internet and LAN fine

If someone can offer me any guidance on this I would appreciate it!
 

10 More Discussions You Might Find Interesting

1. Linux

Enable and disable ttyS0

I have a modem connect it to ttyS0 , in unix sco i know i can disable and enable the port , how can i do this , is there a command that will allow me to do this. **** I'm running Redhat 9 *****External Usrobotics 56k Thanks a lot guys (1 Reply)
Discussion started by: josramon
1 Replies

2. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

3. Hardware

/dev/ttyS0: Device or resource busy

hello to everybody I have Ubuntu Lucid 10.04 installed on my Desktop and I have a PCI serial card in my computer and it has only one serial port. Actually I want to use this serial port for the serial communication and for that I executed this command : $ setserial -g /dev/ttyS and I... (0 Replies)
Discussion started by: piyush011
0 Replies

4. Solaris

Lun remove, stuck in /dev/dsk and /dev/rdsk

So, we removed a LUN from the SAN and the system is refusing to remove the references to it in the /dev folder. I've done the following: devfsadm -Cv powermt -q luxadm -e offline <drive path> luxadm probe All those commands failed to remove the path. The drive stills shows up as <drive... (13 Replies)
Discussion started by: DustinT
13 Replies

5. AIX

Difference between /dev/hdisk and /dev/rhdisk

Hi, How can i check that i am using RAW devices for storage in my AIX machine... Also after adding a LUN from storage to a aix host, when i check /dev in the host, i can see both rhdisk and hdisk with same number eg: dcback1(root):/dev>ls -lrt | grep disk12 crw------- 1 root ... (4 Replies)
Discussion started by: jibujacob
4 Replies

6. Shell Programming and Scripting

Automating partitioning setup of /dev/sda on /dev/sdc

Objective: To recreate the partitioning setup of /dev/sda on /dev/sdc How would I parse the below information and initialize variables (an array?) that can be used to build sgdisk commands in a script, regardless of the number of partitions? Something along the lines of: sgdisk -n... (12 Replies)
Discussion started by: RogerBaran
12 Replies

7. Red Hat

Changing grub from /dev/sda to /dev/sdb

Hi, Please suggest steps to change grub from /dev/sda to /dev/sdb, (1 Reply)
Discussion started by: manoj.solaris
1 Replies

8. Slackware

Sbin/agetty loop Prevents Boot of Slackware 12.1 Fileserver

HI everyone, Nice to meet you all. I recently rebooted Slackware 12.1 running on a Dell PowerEdge 2400. after 240 days of continuous run-time, and discovered it gets stuck in a sbin/agetty loop. We were rebooting because trying to mount root in webmin broke a bunch of things. Couldn't even get... (3 Replies)
Discussion started by: 5pac3m0nk3y
3 Replies

9. HP-UX

Dev/urandom and dev/random missing in HP-UX

Hi, In our HP-UX B.11.11. I could not find dev/urandom and dev/random Are all pseudo-devices implemented as device drivers, or in need to run /configure some package to install the package to have dev/urandom. Please help (4 Replies)
Discussion started by: rashi
4 Replies

10. UNIX for Beginners Questions & Answers

In KVM how to disable console ttyS0 from the virt xml file

I got an issue in a RH6.3 VM host , the issue is ttyS0 is always respawning and piling up /var/log/messages with errors.The customer is OK to have tty0 as the serial terminal but ttyS0 needs to be disabled. Below is the mention of lines that contain 'serial' string from the xml file . How can I... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
SYSTEMD-GETTY-GENERATOR(8)				      systemd-getty-generator					SYSTEMD-GETTY-GENERATOR(8)

NAME
systemd-getty-generator - Generator for enabling getty instances on the console SYNOPSIS
/lib/systemd/system-generators/systemd-getty-generator DESCRIPTION
systemd-getty-generator is a generator that automatically instantiates serial-getty@.service on the kernel console(s), if they can function as ttys and are not provided by the virtual console subsystem. It will also instantiate serial-getty@.service instances for virtualizer consoles, if execution in a virtualized environment is detected. If execution in a container environment is detected, it will instead enable console-getty.service for /dev/console, and container-getty@.service instances for additional container pseudo TTYs as requested by the container manager (see Container Interface[1]). This should ensure that the user is shown a login prompt at the right place, regardless of which environment the system is started in. For example, it is sufficient to redirect the kernel console with a kernel command line argument such as console= to get both kernel messages and a getty prompt on a serial TTY. See kernel-parameters.txt[2] for more information on the console= kernel parameter. systemd-getty-generator implements systemd.generator(7). Further information about configuration of gettys can be found in systemd for Administrators, Part XVI: Gettys on Serial Consoles (and Elsewhere)[3]. SEE ALSO
systemd(1), agetty(8) NOTES
1. Container Interface https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/ 2. kernel-parameters.txt https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt 3. systemd for Administrators, Part XVI: Gettys on Serial Consoles (and Elsewhere) http://0pointer.de/blog/projects/serial-console.html systemd 237 SYSTEMD-GETTY-GENERATOR(8)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy