Skip to contentSkip to conversation

2.6-test1 startup messages?

DISCUSSION Robert L. Harris 5 participants 7 messages Jul 20, 2003 – Jul 21, 2003

lore
Share & tools
lore
#0 lore raw

I just converted a box to 2.6-test1. I've installed the module-init-tools
per another thread on the list. Spread throughout the startup messages of the system (Debian Unstable) are messages that read:

FATAL: Module /dev/tts not found
FATAL: Module /dev/tts not found
FATAL: Module /dev/ttsS?? not found
FATAL: Module /dev/ttsS?? not found

looking at /dev/tty* I have /dev/tty, /dev/tty0-tty63. There is no /dev/ttyS0 (serial console) or tts*.

Have they been renamed or did I miss something in my config? Can anyone point me to a thread? Digging through the archives gave some great reading material yet nothing that seemed to answer my problem.

Thanks for any pointers,
I'd still gladly recomend Linux to my friends.
Robert

:wq!
---------------------------------------------------------------------------
Robert L. Harris | GPG Key ID: E344DA3B

                                         @ x-hkp://pgp.mit.edu 

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.

Diagnosis: witzelsucht

IPv6 = [email protected] http://ipv6.rdlg.net
IPv4 = [email protected] http://www.rdlg.net

#1 lore raw
Quoted 5 lines · Robert L. Harris

I just converted a box to 2.6-test1. I've installed the module-init-tools
per another thread on the list. Spread throughout the startup messages of the system (Debian Unstable) are messages that read:

Quoted 8 lines

FATAL: Module /dev/tts not found
FATAL: Module /dev/tts not found
FATAL: Module /dev/ttsS?? not found
FATAL: Module /dev/ttsS?? not found

looking at /dev/tty* I have /dev/tty, /dev/tty0-tty63. There is no /dev/ttyS0 (serial console) or tts*.

Are you using devfs?
I get the same messages with devfs.
Looking up a /dev file that does not presently exist
or have a corresponding module results in the above warnings.
At boot time, on a redhat distro pam_console_apply tries to lookup
the devices specified in /etc/security/console.perms, which causes a zillion warnings for me. The question is - are those warnings to correct way to handle a devfs lookup of a nonexisting device. I don't remember getting warnings under 2.4. Maybe I did, and just didn't notice (but I doubt it). They're certainly annoying and I don't like them.

P.S. Not a kernel developer - just a tester :)

#2 lore raw

Yes I am using devfs and it's working with the exact same config under 2.4.21 without the errors.

Thus spake Ivan Gyurdiev ([email protected]):

Quoted 27 lines
Quoted 6 lines · Robert L. Harris

I just converted a box to 2.6-test1. I've installed the module-init-tools
per another thread on the list. Spread throughout the startup messages of the system (Debian Unstable) are messages that read:

Quoted 8 lines

FATAL: Module /dev/tts not found
FATAL: Module /dev/tts not found
FATAL: Module /dev/ttsS?? not found
FATAL: Module /dev/ttsS?? not found

looking at /dev/tty* I have /dev/tty, /dev/tty0-tty63. There is no /dev/ttyS0 (serial console) or tts*.

Are you using devfs?
I get the same messages with devfs.
Looking up a /dev file that does not presently exist
or have a corresponding module results in the above warnings. At boot time, on a redhat distro pam_console_apply tries to lookup the devices specified in /etc/security/console.perms, which causes a zillion warnings for me. The question is - are those warnings to correct way to handle a devfs lookup of a nonexisting device. I don't remember getting warnings under 2.4. Maybe I did, and just didn't notice (but I doubt it). They're certainly annoying and I don't like them.

Quoted 3 lines

P.S. Not a kernel developer - just a tester :)

:wq!
---------------------------------------------------------------------------
Robert L. Harris | GPG Key ID: E344DA3B

                                         @ x-hkp://pgp.mit.edu 

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.

Diagnosis: witzelsucht

IPv6 = [email protected] http://ipv6.rdlg.net
IPv4 = [email protected] http://www.rdlg.net

#3 lore raw
In reply to Ivan Gyurdiev
Quoted 12 lines · Ivan Gyurdiev
Quoted 11 lines

I just converted a box to 2.6-test1. I've installed the
module-init-tools
per another thread on the list. Spread throughout the startup messages of the system (Debian Unstable) are messages that read:
FATAL: Module /dev/tts not found
FATAL: Module /dev/tts not found
FATAL: Module /dev/ttsS?? not found
FATAL: Module /dev/ttsS?? not found
looking at /dev/tty* I have /dev/tty, /dev/tty0-tty63. There is no /dev/ttyS0 (serial console) or tts*.

Quoted 11 lines

Are you using devfs?
I get the same messages with devfs.
Looking up a /dev file that does not presently exist
or have a corresponding module results in the above warnings. At boot time, on a redhat distro pam_console_apply tries to lookup the devices specified in /etc/security/console.perms, which causes a zillion warnings for me. The question is - are those warnings to correct way to handle a devfs lookup of a nonexisting device. I don't remember getting warnings under 2.4. Maybe I did, and just didn't notice (but I doubt it). They're certainly annoying and I don't like them.

It's the new modprobe that complains louder than the old one. I guess it's trivial to remove the printout from the source code.

Signature · 2 lines
Måns Rullgård
[email protected]
#4 lore raw
Quoted 1 line · Måns Rullgård

Ivan Gyurdiev <[email protected]> writes:

[...]

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

I just converted a box to 2.6-test1. I've installed the
module-init-tools
per another thread on the list. Spread throughout the startup messages of the system (Debian Unstable) are messages that read:
FATAL: Module /dev/tts not found
FATAL: Module /dev/tts not found
FATAL: Module /dev/ttsS?? not found
FATAL: Module /dev/ttsS?? not found

[...]

Quoted 2 lines

It's the new modprobe that complains louder than the old one. I guess it's trivial to remove the printout from the source code.

couldn't you just set the 'install' action for "/dev/tts", etc. to '/bin/true'?

Signature · 1 line
Charles Lepple <ghz.cc!clepple>
#5 lore raw
Quoted 3 lines

couldn't you just set the 'install' action for "/dev/tts", etc. to '/bin/true'?

You'd have to do that for every single device program x.y.z might try to find in /dev. I, personally, get at least 25 warnings on boot.

#6 lore raw
In reply to Ivan Gyurdiev
Quoted 15 lines · Ivan Gyurdiev
Quoted 5 lines · Robert L. Harris

I just converted a box to 2.6-test1. I've installed the module-init-tools
per another thread on the list. Spread throughout the startup messages of the system (Debian Unstable) are messages that read:

Quoted 8 lines

FATAL: Module /dev/tts not found
FATAL: Module /dev/tts not found
FATAL: Module /dev/ttsS?? not found
FATAL: Module /dev/ttsS?? not found

looking at /dev/tty* I have /dev/tty, /dev/tty0-tty63. There is no /dev/ttyS0 (serial console) or tts*.

Quoted 11 lines

Are you using devfs?
I get the same messages with devfs.
Looking up a /dev file that does not presently exist
or have a corresponding module results in the above warnings. At boot time, on a redhat distro pam_console_apply tries to lookup the devices specified in /etc/security/console.perms, which causes a zillion warnings for me. The question is - are those warnings to correct way to handle a devfs lookup of a nonexisting device. I don't remember getting warnings under 2.4. Maybe I did, and just didn't notice (but I doubt it). They're certainly annoying and I don't like them.

You could try the attached patch. Rusty do not like it though =)

Regards,

Signature · 1 line
Martin Schlemmer
modprobe.c renamed from modprobe.c.orig +58 -4
@@ -52,6 +52,8 @@ struct module {
 
 /* Do we use syslog or stderr for messages? */
 static int log;
+/* Should we be totally quiet? */
+static int quiet = 0;
 
 static int getlen(const char *fmt, va_list ap)
 {
@@ -70,6 +72,9 @@ static void message(const char *prefix, 
 	va_list arglist;
 	int len;
 
+	if (quiet)
+		return;
+
 	va_start(arglist, fmt);
 	len = strlen(prefix) + getlen(fmt, arglist) + 1;
 	buf = malloc(len);
@@ -87,7 +92,7 @@ static void message(const char *prefix, 
 
 #define warn(fmt, ...) message("WARNING: ", fmt , ## __VA_ARGS__)
 #define fatal(fmt, ...) \
-	do { message("FATAL: ", fmt , ## __VA_ARGS__); exit(1); } while(0)
+	do { message("FATAL: ", fmt , ## __VA_ARGS__);  if (quiet) exit(0); else exit(1); } while(0)
 
 static void grammar(const char *cmd, const char *filename, unsigned int line)
 {
@@ -1093,6 +1098,7 @@ static struct option options[] = { { "ve
 				   { "showconfig", 0, NULL, 'c' },
 				   { "autoclean", 0, NULL, 'k' },
 				   { "quiet", 0, NULL, 'q' },
+				   { "really-quiet", 0, NULL, 'Q' },
 				   { "show", 0, NULL, 'n' },
 				   { "dry-run", 0, NULL, 'n' },
 				   { "syslog", 0, NULL, 's' },
@@ -1108,6 +1114,7 @@ static struct option options[] = { { "ve
 				   { NULL, 0, NULL, 0 } };
 
 #define DEFAULT_CONFIG "/etc/modprobe.conf"
+#define MODPROBE_DEVFSD_CONF "/etc/modprobe.devfs"
 
 int main(int argc, char *argv[])
 {
@@ -1146,7 +1153,7 @@ int main(int argc, char *argv[])
 		try_old_version("modprobe", argv);
 
 	uname(&buf);
-	while ((opt = getopt_long(argc, argv, "vVC:o:rknqsclt:aif", options, NULL)) != -1){
+	while ((opt = getopt_long(argc, argv, "vVC:o:rknqQsclt:aif", options, NULL)) != -1){
 		switch (opt) {
 		case 'v':
 			add_to_env_var("-v");
@@ -1193,6 +1200,10 @@ int main(int argc, char *argv[])
 			add_to_env_var("-q");
 			fail_if_already = 0;
 			break;
+		case 'Q':
+			add_to_env_var("-Q");
+			quiet = 1;
+			break;
 		case 's':
 			add_to_env_var("-s");
 			log = 1;
@@ -1215,8 +1226,51 @@ int main(int argc, char *argv[])
 		}
 	}
 
+	/* A hack to have absolutely no output if:
+	 *
+	 *   1) we have no logging enabled
+	 * 
+	 *   2) our config file is /etc/modprobe.devfs or /etc/modules.devfs
+	 *   
+	 *   3) with the module name starting with '/dev/'.
+	 *
+	 * Rasionale:  This is what modprobe from modutils-2.4.22 does:
+	 *
+	 *   gateway root # modprobe /dev/sd1   
+	 *   modprobe: Can't locate module /dev/sd1
+	 *   gateway root # modprobe -C /etc/modules.conf /dev/sd1
+	 *   modprobe: Can't locate module /dev/sd1
+	 *   gateway root # modprobe -C /etc/modules.devfs /dev/sd1
+	 *   gateway root #
+	 *   
+	 *   gateway root # modprobe foo     
+	 *   modprobe: Can't locate module foo
+	 *   gateway root # modprobe -C /etc/modules.conf foo     
+	 *   modprobe: Can't locate module foo
+	 *   gateway root # modprobe -C /etc/modules.devfs foo     
+	 *   modprobe: Can't locate module foo
+	 *   gateway root #
+	 *   
+	 *   gateway root # modprobe -C /etc/modules.devfs /dev/sd1 && echo yes
+	 *   yes
+	 *   gateway root # modprobe -C /etc/modules.devfs foo && echo yes
+	 *   modprobe: Can't locate module foo
+	 *   gateway root # 
+	 *   
+	 */
+	if (!log && !quiet && !dump_only && config) {
+		if (strncmp(argv[optind], "/dev/", 5) == 0
+				/* Handle recursive calls */
+			&& ((strcmp(MODPROBE_DEVFSD_CONF, config) == 0)
+				/* devfsd calls modprobe with '-C /etc/modules.devfs' */
+				|| (strcmp("/etc/modules.devfs", config) == 0))) {
+			add_to_env_var("-Q");
+			quiet = 1;
+		}
+	}
+
 	/* If stderr not open, go to syslog */
-	if (log || fstat(STDERR_FILENO, &statbuf) != 0) {
+	if (log || (!quiet && fstat(STDERR_FILENO, &statbuf) != 0)) {
 		openlog("modprobe", LOG_CONS, LOG_DAEMON);
 		log = 1;
 	}
@@ -1253,7 +1307,7 @@ int main(int argc, char *argv[])
 		if (strcmp("/etc/modules.conf", config) == 0)
 			config = NULL;
 		else if (strcmp("/etc/modules.devfs", config) == 0)
-			config = "/etc/modprobe.devfs";
+			config = MODPROBE_DEVFSD_CONF;
 	}
 
 	/* -r only allows certain restricted options */