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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]