[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

2.2 kernel & serial consoles troubles



Hello,

  I'm running in troubles with interaction between serial console support in
2.2 kernels and boot floppies.
The problem is that /dev/tty is not initialized anymore when booting from
serial console.  Therefore:
1. modconf fails to run because it redirects its i/o to/from /dev/tty
2. and modprobe is flooding the screen with the following message every time
   after the drivers are configured:

  modprobe: can't locate module char-major-4
  modprobe: can't locate module char-major-4
  ...

I fixed the latter problem by disabling connections to other than the first
terminal in init when booting on serial console.  In fact, I found that
these messages were indirectly sent by init because it tries to log to
/dev/tty3 & run a shell in /dev/tty2.

As a workaround for modconf, I've added a --tty option.  It defaults to
/dev/tty but dbootstrap is passing "--tty /dev/console" if installing from 2.2
kernel.
BTW, I'm wondering why modconf is redirecting its i/o to /dev/tty ?

Below is the patch against modconf.
Enrique, could it be applied to the modconf package ASAP ?
Thanks in advance.


--- modconf.orig	Mon Jan 18 21:37:59 1999
+++ modconf	Sun Feb 14 16:51:25 1999
@@ -5,6 +5,8 @@
 umask 022
 readonly rm=rm
 
+ttydev=/dev/tty
+
 if [ -x /usr/bin/tput ]; then
     readonly bold=`tput bold`
     readonly clear=`tput clear`
@@ -123,7 +125,7 @@
 	fi
 
 	$DIALOG_TEST whiptail $DIALOG_OPTIONS --title "$title" \
-     --backtitle "$backtitle" "$type" "$text " 0 0 "$@" 2>&1 1>/dev/tty
+     --backtitle "$backtitle" "$type" "$text " 0 0 "$@" 2>&1 1>$ttydev
 	
 	return $?
 }
@@ -150,7 +152,7 @@
 	fi
 
 	# Note that dialog needs stdin to be the terminal, so I redirect here.
-	< /dev/tty dialogBox --textbox $TempFile "$1"
+	< $ttydev dialogBox --textbox $TempFile "$1"
 	local result=$?
 	${rm} -f $TempFile
 	return $result
@@ -707,6 +709,10 @@
 		;;
 	--run-shell)
 		Run_Shell="$Run_Shell $2"
+		shift
+		;;
+	--tty)
+		ttydev=$2
 		shift
 		;;
 	*)

-- 
 Eric Delaunay                 | "La guerre justifie l'existence des militaires.
 delaunay@lix.polytechnique.fr | En les supprimant." Henri Jeanson (1900-1970)


Reply to: