--- linux-2.2.19-LEAF-RAID-orig/init/main.c	Wed Jul 11 10:39:10 2001
+++ linux-2.2.19-LEAF-RAID/init/main.c	Wed Jul 11 10:46:11 2001
@@ -1465,19 +1465,19 @@
  	cpu_idle(NULL);
 }
 
-#ifdef CONFIG_BLK_DEV_INITRD
 static int do_linuxrc(void * shell)
 {
 	static char *argv[] = { "linuxrc", NULL, };
 
 	close(0);close(1);close(2);
 	setsid();
-	(void) open("/dev/console",O_RDWR,0);
+	(void) open("/linuxrc.tty",O_RDWR,0);
 	(void) dup(0);
 	(void) dup(0);
 	return execve(shell, argv, envp_init);
 }
 
+#ifdef CONFIG_BLK_DEV_INITRD
 static void __init no_initrd(char *s,int *ints)
 {
 	mount_initrd = 0;
@@ -1510,6 +1510,9 @@
  */
 static void __init do_basic_setup(void)
 {
+
+int i, pid;
+
 #ifdef CONFIG_BLK_DEV_INITRD
 	int real_root_mountflags;
 #endif
@@ -1626,21 +1629,22 @@
 	/* Mount the root filesystem.. */
 	mount_root();
 
+	pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
+	if (pid>0)
+		while (pid != wait(&i));
+
+#ifdef CONFIG_BLK_DEV_MD
+	autodetect_raid();
+#endif
+
 #ifdef CONFIG_BLK_DEV_INITRD
 	root_mountflags = real_root_mountflags;
 	if (mount_initrd && ROOT_DEV != real_root_dev
 	    && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
 		int error;
-		int i, pid;
-
-		pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
-		if (pid>0)
-			while (pid != wait(&i));
+		
 		if (MAJOR(real_root_dev) != RAMDISK_MAJOR
 		     || MINOR(real_root_dev) != 0) {
-#ifdef CONFIG_BLK_DEV_MD
-			autodetect_raid();
-#endif
 			error = change_root(real_root_dev,"/initrd");
 			if (error)
 				printk(KERN_ERR "Change root to /initrd: "
