[no subject]

From: Hank Leininger
Date: Sun Jul 04 2004 - 01:07:43 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2004-07-04, "Paul Rolland" <rol@xxxxxxxxxx> wrote:

> Configuration is quite simple : at the LILO prompt, I key in :
> LILO: linux console=ttyS0 -s
>
> This is supposed to start Linux, and have the console on ttyS0.
>
> The problem is that the bash prompt ends on the monitor, not on the
> serial port.

The lilo console redirection means boot messages, etc will go to the
serial port. But they don't necessarily mean a login prompt will be
spawned on the console. For that, you also want an entry in
/etc/inittab (depending on distro, there's probably one there already,
commented out):

s1:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100

...Change the speed if necessary. Make sure that runlevel 1 is
included--that's single user mode. You should probably also make sure
that ttyS0 is uncommented in /etc/securetty (or root logins on the
serial console won't be allowed).


If you've got no physical access to the box other than the serial
console, you can't very well boot it and log in at the keyboard in order
to edit /etc/inittab. In that case, boot with:

LILO: linux console=ttyS0 init=/bin/sh

That will boot the system in a *very* minimal state, and will (probably ;)
give you a text console on the serial port, from which you can remount /
read-write ('mount -n -o remount,rw /') and mount any other local
filesystems ('mount -a -v -t nonfs,nosmbfs'). From there, you can vi
/etc/inittab and /etc/securetty. Save, remount / readonly
('mount -o remount,ro /') and reboot--probably with '/sbin/reboot -f',
since init isn't there to run shutdown scripts, and you can't feed a
ctl-alt-del down the serial port.

HTH,

Hank Leininger <hlein@xxxxxxxxxxxxxxxxxxxx>
E407 AEF4 761E D39C D401 D4F4 22F8 EF11 861A A6F1
-----BEGIN PGP SIGNATURE-----

iD8DBQFA555LIvjvEYYapvERAk3XAJ9JdBWRL6fSIlZafeugeT9Yufp+qgCghCsG
QS3ZV9/9G3NbJ2jMFPRwydY=
=KWwJ
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/