Re: Init single and Serial console : How to ?

From: Milton Miller
Date: Sun Jul 04 2004 - 01:08:56 EST


Configuration is quite simple : at the LILO prompt, I key in :
LILO: linux console=ttyS0 -s
...
The problem is that the bash prompt ends on the monitor, not on the serial
port.
...
When you have a remote machine, for which you have a serial access at boot
time, but which is not completed its "go to runlevel 3" boot to give you
a serial console, how is it possible to force it to give you a prompt on
the serial port in single mode ?

Not quite single mode, but what I have done in similar situations is boot with
console=ttyS0 init=/bin/sh

which will give a shell on /dev/console before any init scripts have run. At
this point mount -o remount,rw / and edit the inittab (you might need to mount
/usr depending on your configuration). To get back, unmount the filesystems,
remount root read-only, and either reboot or (from the first shell)
exec /sbin/init -s to follow the normal bootup to single mode (Be sure you
remounted root ro in this case or your init scripts will likely fail).

-
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/