RedHat Serial Port Console Install

发表于:2007-07-04来源:作者:点击数: 标签:
Terminology Machine #1, for these instructions, will be running Windows or Linuxand will run a terminal program from which we will control theinstallation on Machine #2. Machine #2, for these instructions, is the machine where we will bein

Terminology

Machine #1, for these instructions, will be running Windows or Linuxand will run a terminal program from which we will control theinstallation on Machine #2.

Machine #2, for these instructions, is the machine where we will beinstalling Linux to, but we will be controlling the install through theserial port.

Step 1. Attach the Null Modem Cable

The first step is to attach the null modem cable between the serial ports of Machine #1 and Machine #2.

TERMINOLOGYSTEP1STEP2STEP3NOTESREFERENCE


Step 2. Set up the Terminal Program on Machine #1:

On the system you are controlling the install (Machine #1), type the following:

For Linux:
miterm -s 9600 -l /dev/ttyS0

If you want to capture output of the installation then use the script command:
script
miterm -s 9600 -l /dev/ttyS0
exit

Note: minicom, kermit, and others should work just as well as miterm.

For Windows:
HyperTerminal 9600, 8, N, 1

HyperTerminal can capture output if you need it to.

Other terminal programs will work as well.

TERMINOLOGYSTEP1STEP2STEP3NOTESREFERENCE


Step 3. Begin the Linux Install on Machine #2:

At the RedHat Installer Boot Prompt, type one of the following lines:

linux console=ttyS0,9600
or
linux serial
or
linux console=tty0 console=ttyS0,9600

If you watch closely (and you have a monitor and video card on Machine#2) you will see a couple of lines show up on Machine #2, but allfollowing lines will show up through the serial port to the terminal onMachine #1. This behavior is normal.

On a headless machine (a machine without a video card nor monitor), youcan modify one of the boot disks found in the /images directory on theRedHat CD. Create the floppy, then find the file named syslinux.cfg andadd the console=... parameters there. Then when you boot the headlessmachine on that floppy you will be able to control the install throughthe serial port.

You can make the serial port the permanent default console by reading up on serial-console.txt


TERMINOLOGYSTEP1STEP2STEP3NOTESREFERENCE


Notes

The script program allows you to capture output from a program bylogging everything to a log file. You finish running the script programby typing exit - you will then see a message stating that your log filehas been saved.

Another way of running a program and controlling it through the serialport (useful for capturing screens when script and other programs arenot available) is by redirecting both input and output. Here is anexample of running the fdisk program on one machine, but controlling itthrough the serial port from another machine. You need to have the nullmodem cable attached and run the terminal program as mentioned above.Here is how to redirect input and output:

fdisk /dev/hda </dev/ttyS0 1>/dev/ttyS0 2>/dev/ttyS0


Headless server settings

/etc/inittab

qconf">
7:2345:respawn:/sbin/agetty 115200 ttyS0 vt100

/etc/securetty

ttyS0

/etc/lilo.conf

append="console=ttyS0,115200 console=tty1"

/etc/sysconfig/kudzu

SAFE=yes


TERMINOLOGYSTEP1STEP2STEP3NOTESREFERENCE


References:

/usr/src/linux/Documentation/serial-console.txt
/usr/src/linux/Documentation/kernel-parameters.txt

原文转自:http://www.ltesting.net