Re: initramfs howto?

From: Chris Lingard
Date: Mon Apr 19 2004 - 14:50:03 EST


On Friday 09 April 2004 6:21 pm, Bryan O'Sullivan wrote:
> On Thu, 2004-04-08 at 23:48, Miles Bader wrote:

> I'm agnostic. It's a two-line patch. I don't care if it's called
> /spam/fandango/wubble, so long as the brave souls who are trying out
> initramfs don't keep stumbling over the same problem again and again :-)

May I suggest

diff -Naur linux-2.6.5.old/init/main.c linux-2.6.5/init/main.c
--- linux-2.6.5.old/init/main.c 2004-04-05 18:19:04.000000000 +0100
+++ linux-2.6.5/init/main.c 2004-04-18 15:37:56.000000000 +0100
@@ -604,7 +604,12 @@
smp_init();
do_basic_setup();

- prepare_namespace();
+ /*
+ * check if there is an early userspace init, if yes
+ * let it do all the work
+ */
+ if ( ! sys_access("/linuxrc", 0) == 0)
+ prepare_namespace();

/*
* Ok, we have completed the initial bootup, and

linuxrc already exists for initrd systems, and is coded in anyway.

I have tested this with both with both linuxrc -> bin/ash
and with a script that brings up a full system. (I have made
a boot CD that installs Linux-2.6.5 with udev)

Chris Lingard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/