Page 1 of 1

Null modem through serial port

Posted: 8. Aug 2008, 20:45
by shogun1234
Environment:
Host (client)

Code: Select all

OS: OpenSUSE (11.0) 
kernel: 2.6.25-1.1-default  
serial port: /dev/ttyS0
GUEST (target server)

Code: Select all

OS: Debian Testing 
kernel: 2.6.25
serial port: /dev/ttyS0
I want to learn how to debug GNU/ Linux Kernel, but encounter a problem when setting up serial port. The problem is that the target server (virtualbox) can not launched as it echoes message

Code: Select all

Failed to open host device '/dev/ttyS0'.
VBox status code: -250 (VERR_DEV_IO_ERROR).

Result Code:
0x80004005
Component:
Console
Interface:
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}
It seems like at the first time to create serial port (/dev/ttyS0) would work. However, it always fails after modifying some config files and then reboot the system (how to I use is at http://en.opensuse.org/Serial_Null_Modem_Connection). Below is the way how I configure the target server (Debian):

1.) edit /boot/grub/menu.lst by adding

Code: Select all

serial --unit=0 --speed=115200
terminal --timeout=5 console serial
2.) append to boot parameters

Code: Select all

console=tty0 console=ttyS0,115200
3.) edit /etc/inittab by adding

Code: Select all

T0:12345:respawn:/sbin/getty -L 115200 ttyS0 vt100
at client side (host server, i.e. SUSE 11.0) I run

Code: Select all

screen /dev/ttyS0 115200 
What goes wrong that cause such problem? And how to solve it?

Thank you very much,

Posted: 10. Aug 2008, 21:25
by frank
Is the /dev/ttyS0 port definitely accessible from the host? For the user who is executing VirtualBox?