Skip to contentSkip to conversation

Kernel 2.6.10 Can't Open Initial Console on FC3

DISCUSSION Pete Zaitcev 1 participant 1 message Dec 31, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 7 lines · Joseph D. Wagner

The newly compiled kernel gets through everything OK including mounting the root file system as read-only EXT3. However, it freezes on the very last line, which says:

Warning: unable to open an initial console

I feel like an idiot for posting this. I'm probably missing something obvious.

Man, I know the feeling. It's rather annoying that the message does not tell what is happening, not even the errno. I was thinking about having the attached patch submitted, but I don't know if it's worth it.

In case of FC3, the most common problem is that udev somehow fails to start. I do not know what the precise mechanics of it, because /dev/console exists in initrd images, but with all the crazy root pivoting it's no wonder it's ineffective. Anyhow, if udev quits, open in the init/main.c will fail with ENOENT.

The only solution I know is to do everything over again, and make sure you copied right configuration from /boot/config-2.6.9-1.678_FC3, and that your mkinitrd run created a sensible initrd image. Verify that udev runs and if not, debug that.

-- Pete

init/main.c +4 -2
diff -urp -X dontdiff linux-2.6.10-rc2-bk8/init/main.c linux-2.6.10-rc2-bk8-usb/init/main.c
@@ -691,6 +691,8 @@ static inline void fixup_cpu_present_map
 
 static int init(void * unused)
 {
+	int rc;
+
 	lock_kernel();
 	/*
 	 * Tell the world that we're going to be the grim
@@ -738,8 +740,8 @@ static int init(void * unused)
 	system_state = SYSTEM_RUNNING;
 	numa_default_policy();
 
-	if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
-		printk("Warning: unable to open an initial console.\n");
+	if ((rc = sys_open((const char __user *) "/dev/console", O_RDWR, 0)) < 0)
+		printk("Warning: unable to open an initial console (%d).\n", rc);
 
 	(void) sys_dup(0);
 	(void) sys_dup(0);