中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 操作系统 > Linux > Linux综合
Setting Up a Serial Console on RedHat Linux 9.0
作者:未知 时间:2005-09-13 22:04 出处:Blog.ChinaUnix.net 责编:chinaitpower
              摘要:Setting Up a Serial Console on RedHat Linux 9.0

If you are running RedHat 9.0 and want to run "headless" (no monitor, keyboard, or mouse) but still want to have a console to recieve console messages or login, here are the basics of what I did to get 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)
  • A Null Modem Cable - To connect to your PC, laptop, or terminal. You can make one yourself or pick one up from Radio Shack for about 15 bucks.
  • Running lilo as your boot loader.
  • Support for console on serial port must be compiled into the kernel (not loaded as a module) This option is located under Charater devices - it is compiled in by default on Redhat 9 installations.
  • Root access.

Make sure you set up your BIOS to continue on Keyboard or Mouse errors. Some machines will allow you to ignore these errors specifically, on others you may have to configure it to continue on any error.

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 add console=ttyS0,38400n8 to the end of those. Once you have made the changes to /etc/lilo.conf remember to run /sbin/lilo to set the new configuration 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 can connect using Hyperterminal, TeraTerm, or any other terminal program that supports serial ports. On a Linux machine you can use minicom).

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

If you receive a bunch of garbage on the terminal check your baud and parity settings. If you do not receive a logon prompt check you inittab 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.

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有