public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Init single and Serial console : How to ?
@ 2004-07-04  5:09 Paul Rolland
  2004-07-04 10:09 ` Bernd Eckenfels
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Rolland @ 2004-07-04  5:09 UTC (permalink / raw)
  To: linux-kernel

Hello,

I'm trying to activate a serial console on a Linux 2.4.20 (OK, this is not
the
most recent one, but this is the one I'm running).

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.

I've read about the :

    ioctlsave is a small utility to create the Linux SysV init file
    /etc/ioctl.save from a multiple user run level rather than from single
    user mode. /etc/ioctl.save contains the terminal settings to be used in
    single user mode. Users of terminals or modems which cannot be
    configured to operate at 9600bps (and thus set ioctl.save using the
    standard mechanism) will find this utility useful. 

but,  the problem is that this operation is only possible if you can have
access to the machine (to run the ioctlsave utility).

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 ?

Regards,
Paul


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Init single and Serial console : How to ?
@ 2004-07-04  6:07 Milton Miller
  2004-07-04  8:44 ` Paul Rolland
  0 siblings, 1 reply; 8+ messages in thread
From: Milton Miller @ 2004-07-04  6:07 UTC (permalink / raw)
  To: Paul Rolland; +Cc: linux-kernel

> 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).


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-07-09  6:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-04  5:09 Init single and Serial console : How to ? Paul Rolland
2004-07-04 10:09 ` Bernd Eckenfels
2004-07-04 10:32   ` Paul Rolland
2004-07-08  5:32     ` Paul Rolland
2004-07-08  7:44       ` Russell King
2004-07-09  6:28         ` Paul Rolland
  -- strict thread matches above, loose matches on Subject: below --
2004-07-04  6:07 Milton Miller
2004-07-04  8:44 ` Paul Rolland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox