[Sussex] Start up/Shutdown dialogue - Errors shown.

Steve Dobson steve at dobson.org
Wed Dec 8 07:37:52 UTC 2004


John

On Wed, Dec 08, 2004 at 05:29:59AM +0000, John D. wrote:
> Looked at both dmesg and /var/log/messages (yes I opted for syslog-ng),
> but from memory, there's some stuff that doesn't show in either file.
> 
> I suppose I'll have to resort to long hand, but just be very careful
> when noting down and when retyping stuff! Bugger!

If you have another computer, even a windozs system there is another
way.  But this maybe a little more involved that you want.  If you
configure the system to boot using a serial console then you can use
your another computer to "record" all the boot messages that come out
of the console.

To use this method you will need a serial "null modem" cable.  If you
haven't got one then be careful when buying one as now-a-days that name
is not used.  (Some who knows the modern name help me out here, the last
time I bought one I had a little trouble).  At the end of the day it
will be a cable wired like the one at
http://www.loop-back.com/null-mod.html

Next check that you have serial working, you almost certainly do,
as having the options set doesn't effect the kernel unless activated.
The kernel config parameters are:
   SERIAL_8250=y
   SERIAL_8250_CONSOLE=y
   SERIAL_8250_SHARE_IRQ=y

Please note these *CAN NOT* be modules, you will need these settings
when you start running the Linux kernel, way before the disks are even
looked for let along mounted.

Once you are running a appropriately configured kernel enabled logging
on via the first serial device (COM1).  The easiest way of doing this
is to change the config of init(1) and then HUP it.

To enabled a login prompt on COM1 you need getty(1) running and monitoring
ttyS0.  As "ps -ef | grep getty" will show you what is already running.
You'll probably see something like this:
   # ps -ef | grep getty
   root  386     1  0 Jun06 tty1     00:00:00 /sbin/getty 38400 tty1
   root  387     1  0 Jun06 tty2     00:00:00 /sbin/getty 38400 tty2
   root  388     1  0 Jun06 tty3     00:00:00 /sbin/getty 38400 tty3
   root  389     1  0 Jun06 tty4     00:00:00 /sbin/getty 38400 tty4
   root  390     1  0 Jun06 tty5     00:00:00 /sbin/getty 38400 tty5
   root  391     1  0 Jun06 tty6     00:00:00 /sbin/getty 38400 tty6
   root  9669 9568  0 07:44 pts/127  00:00:00 grep getty
This show that I have six getty(1)s running monitor the six virtual 
consoles.

Now change inittab(5) and uncomment or put in a line that looks like
this:
  S0:3:respawn:/sbin/getty -L 9600 ttyS0 vt320

The first three values ("S0", "3" and "respawn") are documented in 
the man page for inittab, so I won't copy them here.  The next
value is the command to run followed by it's arguments.  The arguments
are explained in the man page for getty(1) so I'll leave you to 
do the research as I know that is how you like to learn.  I would
switch to 19200 baud if I were you, it's faster.

Once changed to get init(1) to see the new setting (you don't need to
reboot) just HUP it (# kill -HUP 1).

You should now see an entry for a getty(1) monitoring ttyS0 when you
re-run the ps(1) command then you are now ready to test out the
serial cable.  Connected it to the second computer and run a tty
monitor (for Wintel use HyperTerminal, for Linux use minicom(1)).
With minicom/HyperTerminal configured to use the same baud rate (plus 
eight bits of data, one stop bit and no parity)r.  By hitting
return you should see a login prompt on the screen.  Login in, try
it out.  This is how we use to connect to Unix boxes in the good old
days :-)

Now turn logging on in minicom/HyperTerminal and reboot the computer.
When you get your lilo/grub prompt provide the following extra argument
"console=ttyS0,19200n8".  I don't know how to do this in grub but for
lilo it is "linux console=ttyS0,19200n8" (assuming that you default
boot entry in lilo.conf is labeled "linux".  This tells the kernel to
boot using ttyS0 as the console with 19200 baud, "n"o parity and "8"
bits of data.

When the computer boots all those message will now appear on the 
serial line which you can record.

Hope this helps,
Steve






More information about the Sussex mailing list