• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

Setting Up a Serial Console on RedHat Linux 9.0

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 15次 | 进入软件测试论坛讨论

领测软件测试网

If you are running RedHat 9.0 and want to run "headless" (nomonitor, keyboard, or mouse) but still want to have a console torecieve console messages or login, here are the basics of what I did toget it working.

This example will set up a serial console on Com 1 (ttyS0) at 38.4K Baud, Data bits 8, Parity None, 1 stop bit.

Requirements:

  • agetty - alternative Linux getty - agetty is included in the RedHat 9.0 Installation (unless you chose not to install it)
  • ANull Modem Cable - To connect to your PC, laptop, or terminal. You canmake one yourself or pick one up from Radio Shack for about 15 bucks.
  • Running lilo as your boot loader.
  • Supportfor console on serial port must be compiled into the kernel (not loadedas a module) This option is located under Charater devices - it iscompiled in by default on Redhat 9 installations.
  • Root access.

Make sure you set up your BIOS to continue on Keyboard or Mouseerrors. Some machines will allow you to ignore these errorsspecifically, on others you may have to configure it to continue on anyerror.

In /etc/lilo.conf add this to the global section:

serial = 0,38400n8

Then add this to the append line in the kernel section:

append = "console=ttyS0,38400n8"

If you are already using an append for other options just addconsole=ttyS0,38400n8 to the end of those. Once you have made thechanges to /etc/lilo.conf remember to run /sbin/lilo to set the newconfiguration for the next boot.

To enable the ability to login on to the machine using the serial console add the following line to /etc/inittab:

s0:12345:respawn:/sbin/agetty -i -h -L 38400 ttyS0 vt100

Connect the null modem cable to Com 1 and then to your PC, Laptop,or Terminal. Configure the connection (terminal program) for 38400 baud(38.4k), 8 data bits, parity none, and stop bits 1. (On windows you canconnect using Hyperterminal, TeraTerm, or any other terminal programthat supports serial ports. On a Linux machine you can use minicom).

Now reboot the linux box that you configured the serial console onand monitor the connection. You should see the kernel decompress andthen the boot messages over your serial connection. Once the machinehas finished booting you should receive a logon prompt on the console.

If you receive a bunch of garbage on the terminal check your baudand parity settings. If you do not receive a logon prompt check youinittab configuration and make sure agetty is running on ttyS0 (ps -ef| grep agetty).

For more help check out the man pages for agetty, lilo, lilo.conf, and inittab.

You can also try a google search for linux serial console.

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网