> Pardon my ignorance, but how do you get a PC-based Linux box to operate
> headless? I didn't think you could even boot without a video card
> of some kind in the box.
Even if you can, I'd still leave some video board in the machine. If
the system fails really badly (e.g. config RAM corruption), it's
easier to connect a CRT and a keyboard to fix it than to open it,
add a video board you've never used before, risk running into some
stupid other problems, etc. Low-end VGA boards are essentially for
free these days.
Quote:> I'd love to be able to run some Linux-based
> servers using a serial port as console. Is this possible?
Yup, I'm using such a configuration since a few weeks on two PCs who
get lots of printks. It seems to work. What you need are a kernel
patch (for printk) and a few minor config changes:
- link /dev/console to /dev/ttySwhatever
- change inittab to start a getty on that device (useful if the net
fails)
- add something like serial=1,9600 and append="scon=0x02f8" to
your /etc/lilo.conf
I've attached a patch that should do the trick (it's extracted from
a larger patch, so maybe some parts have to be applied manually)
with some recent kernel. But don't tell Ted about it ... ;-)
- Werner
---------------------------------- cut here -----------------------------------
--- ref/arch/i386/config.in Tue Mar 7 15:25:26 1995
#if [ "$CONFIG_M586" = "n" ]; then
bool 'Use -m486 flag for 486-specific optimizations' CONFIG_M486 y
#fi
+bool 'Serial console support' CONFIG_SERIAL_CONSOLE y
comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS n
--- ref/drivers/char/console.c Thu Mar 23 17:09:13 1995
video_screen_size = video_num_lines * video_size_row;
}
+
+#ifdef CONFIG_SERIAL_CONSOLE
+
+
+static unsigned long tty_base = 0;
+
+
+static void put_scon(char ch)
+{
+ unsigned long flags;
+
+ while (1) {
+ while (!(inb_p(tty_base+5) & 0x20));
+ save_flags(flags);
+ cli();
+ if (inb_p(tty_base+5) & 0x20) break;
+ restore_flags(flags);
+ }
+ outb_p(ch,tty_base);
+ restore_flags(flags);
+}
+
+
+static void print_scon(const char *str)
+{
+ if (!tty_base) return;
+ while (*str) {
+ if (*str == '\n') put_scon('\r');
+ put_scon(*str++);
+ }
+}
+
+
+void serial_console_setup(char *str,int *ints)
+{
+ if (ints[0] != 1) return;
+ tty_base = ints[1];
+}
+
+
+#endif
+
+
/*
* long con_init(long);
display_desc,
video_num_columns,video_num_lines,
MIN_NR_CONSOLES, (MIN_NR_CONSOLES == 1) ? "" : "s", MAX_NR_CONSOLES);
+#ifdef CONFIG_SERIAL_CONSOLE
+ if (tty_base) {
+ register_console(print_scon);
+ return kmem_start;
+ }
+#endif
register_console(console_print);
return kmem_start;
}
--- ref/init/main.c Fri Feb 24 15:41:01 1995
extern void sonycd535_setup(char *str, int *ints);
#endif CONFIG_CDU535
void ramdisk_setup(char *str, int *ints);
+#ifdef CONFIG_SERIAL_CONSOLE
+void serial_console_setup(char *str,int *ints);
+#endif
#ifdef CONFIG_SYSVIPC
#ifdef CONFIG_CDU31A
{ "cdu31a=", cdu31a_setup },
#endif CONFIG_CDU31A
+#ifdef CONFIG_SERIAL_CONSOLE
+ { "scon=", serial_console_setup },
+#endif
{ 0, 0 }
};
--
_________________________________________________________________________
/_IN_R_311__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/