Re: 2.6.12 initrd module loading seems parallel on bootup

Darryl L. Miles
2005-06-27T05:47:42Z

Are we sure we are not talking about two different problems here.

I'm using RedHat and mkinitrd, in the initrd image there is already a
skeleton /dev tree that contains my real-root device. udev also exists
in the initrd image. I don't think any /dev device magic was necessary
for me too mount root.

It is not clear Chris which tools you are using on initrd, standard
Gentoo methods or a home brew setup ? What shell is calling modprobe ?
Can you confirm at what point you are seeing modprobe exit ?

* Immediatly (before device driver has detected hardware and reported /
registered its findings). This is the symptom I was seeing, but the
cause was incorrect shell handling.
* After detection but before device node creation.
* After device node creation.

FYI - This looks like the snippet from nash.c

@@ -403,7 +450,7 @@
int otherCommand(char * bin, char * cmd, char * end, int doFork) {
char ** args;
char ** nextArg;
- int pid;
+ int pid, wpid;
int status;
char fullPath[255];
static const char * sysPath = PATH;
@@ -479,10 +526,20 @@

close(stdoutFd);

- wait4(-1, &status, 0, NULL);
- if (!WIFEXITED(status) || WEXITSTATUS(status)) {
- printf("ERROR: %s exited abnormally!\n", args[0]);
- return 1;
+ for (;;) {
+ wpid = wait4(-1, &status, 0, NULL);
+ if (wpid == -1) {
+ printf("ERROR: Failed to wait for process %d\n", wpid);
+ }
+
+ if (wpid != pid)
+ continue;
+
+ if (!WIFEXITED(status) || WEXITSTATUS(status)) {
+ printf("ERROR: %s exited abnormally with value %d ! (pid %d)\n", args[0], WEXITSTATUS(status), pid);
+ return 1;
+ }
+ break;
}
}

--
Darryl L. Miles