[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

successful serial installation of redhat 6.2 / i86



Hello

I have tried a serial installation of RedHat 6.2 / i86 and was successful after some workarounds. As the process was not straightforward and it took  me to do some recherche over several sources and a applay a trial and error approach I would like to contribute this feedback in order that others will be faster to succeed.

The situation was, that I bought a small Intel inside box (compaq deskpro en small) for the purpose of a small soho file- and mail-server  for our Apple Powerbooks. As I found it unnecessary to buy also an external monitor for this server in order to have the monitor switched on only for installation and for time to time maintenance I wanted to use a terminal emulation at the serial port of the server.

These are the steps for a successful installation of RedHat 6.2 on a i86 box:

- Serial cable and connection:

To connect your PC, Mac or standalone Terminal you will need a null-Modem serial cable. You can buy it or make it your self. You can find some guidance on the web (I soldered the cable for the Mac myself):

for PC see:
http://www.hwb.acc.umu.se//menu_Cable.html

for Mac see:
http://www.edprint.demon.co.uk/se/serial.html

- Preparing the RedHat 6.2 boot floppy:

I was not successful to get a console connection to the intel box on which I wanted to install RedHat Linux 6.2 by typing in the the following commands at the boot prompt mentioned by the RedHat installation guide for a serial installation:

boot: Linux console=ttyS0

(I chose serial port A or 1 which corresponds to ttyS0, may be it is a better choice to select serial port B or 2 (ttyS1) because ttyS0 is by default used for mouse connection)

As I was not successful with this entry as mentioned before, although the system booted normally but without redirecting the console to the serial port, I chose to modify the file SYSLINUX.CFG in the following way:

original SYSLINUX.CFG file:

default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 general.msg
F3 expert.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
     kernel vmlinuz
     append initrd=initrd.img local
label text
     kernel vmlinuz
     append initrd=initrd.img local text
label expert
     kernel vmlinuz
     append expert initrd=initrd.img local
label ks
     kernel vmlinuz
append ks initrd=initrd.img local

modified SYSLINUX.CFG file:

default install
prompt 1
timeout 150
display boot.msg
F1 boot.msg
F2 general.msg
F3 expert.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
     kernel vmlinuz
     append initrd=initrd.img local
label text
     kernel vmlinuz
     append initrd=initrd.img local text
label expert
     kernel vmlinuz
     append expert initrd=initrd.img local
label ks
     kernel vmlinuz
     append ks initrd=initrd.img local
label install
     kernel vmlinuz
     append initrd=initrd.img local console=ttyS0
label postinstall
     kernel vmlinuz
     append linux single root=/dev/hda3 initrd= local console=ttyS0

Now you can boot the system with this modified boot floppy. I modified also the timeout for the autostart to 15 sec. but you can also type in blindly with some attached keyboard the command install.

The system will now boot to the RedHat installation wizard and you will see all boot message on your terminal emulator window if you have set the communications parameters to: Terminal Type: VT100; Baud Rate: 9600, Data Bits: 8; Parity Bit:  none, Stop Bit: 1

- Installation:

Now you may follow the installation guidance from the RedHat installation wizard. This will be the normal installation procedure. So I skip to the post installation setup.

- Post Installation Setup:

Now after successful installation there are two choices. You leave the installation as it is because you have access to your linux box now over ethernet based telnet and/or you want still to have a console connection over the serial port to your installed system.

I have prepared before the SYSLINUX.CFG file on the boot floppy also for this step. You will find the following section at the end:

label postinstall
     kernel vmlinuz
     append linux single root=/dev/hda3 initrd= local console=ttyS0

these commands are necessary to boot the system without booting again to the RedHat installation wizard. I tried first to boot in rescue mode with the command: linux rescue console=ttyS0

The system booted in the rescue mode and showed all boot up messages as expected on the connected terminal emulator but stopped at the end with the message of the sort: kernel panic! no device to boot from.

I guess for booting in rescue mode some special rescue disk are needed. But I did not have them at hand. So I tried to boot with the command I mentioned before:

label postinstall
     kernel vmlinuz
     append linux single root=/dev/hda3 initrd= local console=ttyS0

where /dev/hda3 is the root partition in my system. According to the Red Hat Linux Reference Guide this works only for systems without SCSI harddisks because with the statement initrd= the image for SCSI support is passed over. Maybe somebody can contribute a workaround for SCSI-Systems?

Now you may reboot from floppy with the postinstall command as mentioned. After the bootup process you will have a bash# prompt  at your terminal and your system is ready for some additional setups.

- Modifying LILO settings

In order that your system will also redirect the console output to the serial port at boot time from harddisk you may modify your lilo config file as in the following indicated:

the lilo configuration can be found at: /etc/lilo.conf

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
linear
default=linux

image=/boot/vmlinuz-2.2.14-5.0
        label=linux
        read-only
        root=/dev/hda3
        append="console=ttyS0"
 

I have added to the lilo.conf file the line append="console=ttyS0"

After this addition you may run the /sbin/lilo program in order to load the new configuration. Now you will have the console output redirected to the serial port and to your terminal emulator by bootup from harddisk. Unfortunatly the setup procedure is not at its end.
With these setups you will have the console output only redirected to you serial port during bootup and after issuing a reboot or shutdown command. That means that you will lose console output to your serial port after the booting process has accomplished and the console is prompting for a login. Therefor a setup for normal serial dump terminal is needed.

- Configuring a dump terminal connection

This is a well documented operation found in different books and in several Linux how-to's. Although I will provide this information for completeness.

located the file: /etc/security/console.perms
located the following line in the file console.perms:
<console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
add  "/dev/ttyS0" in order that the line shows like this:
<console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9]   /dev/ttyS0

this entry ensures that also the console at the serial port is secured and you are not allowed to login as root but as a normal user and then will be able switching with "su -l" to root.

now the serial connection has to be set:

locate the file:  /etc/inittab
add at the end of the file the following line:
# Run gettys for serial interface
t0:2345:respawn:/sbin/getty -h ttyS0 DT9600 vt100

t0  means terminal 1
:2345 means the Linux System run levels at which the console is redirected to you serial port
respawn ... specifies the console/terminal program
-h  means no hangup during startup
ttyS0 specifies the serial port
DT9600 specifies the connection type defined in the file /etc/gettydefs
vt100 specifies the terminal type

Please check in the file /etc/gettydefs if there is an entry for the label DT9600
otherwise add the following lines:
# 9600 baud Dumb Terminal entry
DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL # S login: #DT9600

you may also specify an other serial line connection speed, higher than 9600 Baud but in this case you would have to switch you terminal emulator software settings after every bootup and after every session because the console connection during boot up and shutdown is by default set to 9600 Baud. So it is wise to use 9600Baud also for the login session on this serial port.

Now you have finished with the setup!  You may no reboot your system and all should be fine as expected.

You may have done this settings in a very straight forward way. That is fine!  It took me several hours to arrive at this point because there were many  uncertainties beginning with the right serial cable and also because some topics were not documented at all or were new to me. But is was great to see the fist prompts on the terminal emulator ... by the way I am using on my Macintosh the Terminal emulator dataComet 4.6b6-68K  <ftp://ftp.databeast.com/pub/datacomet/> because it has a plenty of very well done terminal emulation (16-color PC-ANSI; DEC VT52 (Heath-19), VT100, VT102, and VT220; IBM Models 3278 and 3279 Color ). You may also use dataComet in normal telnet configurations.

- and finally ...

Now I thought I have finished and I would be ready to go further. Therefore I positioned my Linux / intel in side box at its definitive place, pulled out the PC-keyboard which came with the computer and rebooted the system again. The system did not reboot at all! Neither from floppy nor from harddisk! I inserted again the connector of this mega keyboard and could reboot the system normally as before. I tried two or tree times this two alternatives and noticed that the bootup process will stop with a detached keyboard immediately after sensing the floppy drive and the harddisk without going further. I did the same test with an other Workstation, in this case a DELL system. This system showed me a Keyboard-failed message and continued to boot up after some seconds with out problems. So I guess my intel in side box, an compaq deskpro en small, performs a complex system test by the BIOS a stops to boot if the keyboard test fails. That meant that I had to  reconnect my keyboard enclosed in a protective cover to the computer for proper system operation and wasting unnecessary space or I will have to get an external monitor :-)  soon to alter the the BIOS settings .....
 

... I'm sorry for my wordy explanations ...
 

--

Andre Mueller
Okenstrasse 7 / CH-8037 Zurich / Switzerland
Tel +41-1-350 76 10 / Fax +41-1-350 76 12
mailto:muelleran acm org /
http://www.datacomm.ch/aspectus/Andre_Mueller/
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]