简体   繁体   中英

How to pass display output to serial port under Linux?

We have 2 computer. Fist computer's operating system is Linux( any version( not important for me) ) and another operating system is Windows( any version, i don't care). They are connected via 9 pin serial port.

I want to know how can I change Linux's default display output to serial port instead of it's own monitor. I want to view all Linux outputs( from first word of boot time ) via hyper terminal in Windows XP.

我的问题形象

BTW it's just a research for future uses ! I know there is no easy solution for doing this. Maybe I should compile Linux again ! I don't know. Please give me some suggestions.

Use the console kernel parameter to specify the default console. Add an entry in inittab to attach a login process to the serial line.

请参阅串行控制台H​​owto并在Windows上使用putty

It's certainly feasible. The easiest way to do this is just to put a "getty" process on the serial terminal, which is sometimes done by editing /etc/inittab (there will be some examples in there) and then you will see a login prompt via the serial terminal and use all (command-line) programs normally. Historically, Unix machines did this as their primary way of working.

Another option is to use the "serial console", which involves passing some boot-time parameters to the kernel; this is only required if you want to see its startup messages on the serial port.


Edit: On newer Linux distributions, it's not so easy to put "getty" on a serial line, presumably because it's such an old-fashioned thing to do. Outside of embedded devices, pretty much nobody uses serial ports to log in to the system any more (most modern PCs don't even HAVE rs232 ports). For example, Fedora and Ubuntu do not use "init", but something else which doesn't have inherent support for running "getty". There is probably a way of doing it but I don't know what it is; consult your distributuon's documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM