1830242 Members
2330 Online
109999 Solutions
New Discussion

using serial console

 
K.C. Chan
Trusted Contributor

using serial console

All,
this is a follow on this link:
"http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=305330"


Here's my grub conf file:

default=0
timeout=10
serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
terminal --timeout=15 serial console
title Red Hat Linux (2.4.18-27.7.x)
root (hd0,0)
kernel /vmlinuz-2.4.18-27.7.x ro root=/dev/hda5 console=tty0 console=ttyS0 linux
initrd /initrd-2.4.18-27.7.x.img


Everything works on ttyS0, but when I am at the console, the boot up stop displaying the boot status when it is starting up services in (right after it loaded the kernel) "/etc/rc.d/init.d/" until it gets into a log in prompt. How do I get it all boot messages on tty0 (the acutal physical console which is attached to the server)? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
5 REPLIES 5
Tom Ward_1
Honored Contributor

Re: using serial console

Hello K.C.,

You may need to add the key word "text" to the kernel line.

Mine looks like:
title Red Hat Linux SMP (2.4.20-28.9smp)
root (hd0,0)
kernel /vmlinuz-2.4.20-28.9smp ro root=LABEL=/ hdc=ide-scsi text console=ttyS0,57600,vt102
initrd /initrd-2.4.20-28.9smp.img

And I get all the boot status to the serial console.

Regards,
Tom
K.C. Chan
Trusted Contributor

Re: using serial console

I have NO problem gettting boot messages to appear on serial console, it's the actual console which I am having problem with. It stops displaying boot up status after the kernel load. I want to be able to have the "boot up messages" to appear on the serial console as well as the actual physcial console; It doesn't have to appear on both screen at the same time, it could be either or, dedpending which keyboard was hit first during the boot up. Any idea? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Tom Ward_1
Honored Contributor

Re: using serial console

Hello K.C.,

So you want boot messages to either console: Serial or Local?

The only idea I can come up with is to have two entries in your grub.conf -- one for serial console and one for local console.

title Serial Console Linux (2.4.18-27.7.x)
root (hd0,0)
kernel /vmlinuz-2.4.18-27.7.x ro root=/dev/hda5 console=tty0 console=ttyS0 linux
initrd /initrd-2.4.18-27.7.x.img

title Local Console Linux (2.4.18-27.7.x)
root (hd0,0)
kernel /vmlinuz-2.4.18-27.7.x ro root=/dev/hda5
initrd /initrd-2.4.18-27.7.x.img

You then have to select the correct entry for whichever terminal you're using to boot from.

I hope I understand what you're looking for correctly this time.

Regards,
Tom
Stephen P. Schaefer
Frequent Advisor

Re: using serial console

I believe you want the output from the startup scripts run by /etc/rc.d/rc to go to the serial line. You could change that script to force stdin/stdout/stderr to /dev/ttyS0 with the line

exec /dev/ttyS0 2>/dev/ttyS0

but I would have thought there was some way to inform the kernel itself that /dev/console should go to the serial line (it appears that /dev/console is what init is initially attached to). Have you tried removing /etc/ioctl.save?
K.C. Chan
Trusted Contributor

Re: using serial console

I have not removed /etc/ioctl.save. I want to be able to to Serial line as well as Physical console. The Serial line have no problem getting the ouput of startup scripts. But some reasone the physical console is not getting the output from the startup script? Any idea? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour