-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I am quite puzzled by the structure of the resulting initrd image. If I have understood what is happening (and I must admit I am struggling) the following steps occur
1) the kernel calls linuxrc to run 2) linuxrc saves the contents of real-root-dev in its own initrd image 3) linuxrc then changes the real-root-dev to its own initrd image 4) linuxrc exits which causes the kernel to start /sbin/init in the initrd image 5) /sbin/init then loads modules runs scripts etc 6) /sbin/init recovers the saved original real-root-dev and pivot_roots to it. My question is, why go to great trouble to store and then change real-root-dev. Why can't all of the meat of the action just happen in linuxrc and then pivot_root to the original root? Alan Chandler - ---------- Forwarded Message ---------- Subject: Bug#164498: mkinitrd doesn't seem to create the correct initrd image Date: Sun, 13 Oct 2002 10:44:12 +1000 From: Herbert Xu <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Herbert Xu <[EMAIL PROTECTED]> wrote: > On Sat, Oct 12, 2002 at 11:31:34PM +0100, Alan Chandler wrote: >> Just after partition check on the two IDE drives I have >> >> kjournald starting. Commit interval 5 seconds >> EXT3-fs: mounted file system with ordered data mode >> warning: can't open /etc/mtab: No such file or directory >> pivot_root: No such file or directory > > Hmm, does your system have a /initrd directory? This patch should fix it. - -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - -- Index: init =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/initrd-tools/init,v retrieving revision 1.9 diff -u -r1.9 init - --- init 11 Oct 2002 10:12:24 -0000 1.9 +++ init 13 Oct 2002 00:35:09 -0000 @@ -18,16 +18,16 @@ done if [ -n "$fstype" ]; then mount -nrt "$fstype" ${flags:+-o "$flags"} /dev2/root /mnt - - else - - IFS=, - - set -f - - set +f -- $FSTYPES - - unset IFS - - for i; do - - mount -nrt "$i" ${flags:+-o "$flags"} /dev2/root / && - - break - - done + return fi + IFS=, + set -f + set +f -- $FSTYPES + unset IFS + for i; do + mount -nrt "$i" ${flags:+-o "$flags"} /dev2/root /mnt && + break + done } call() { - ------------------------------------------------------- - -- Alan Chandler [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) iD8DBQE9qmDQuFHxcV2FFoIRAtTzAJwPYA/dmyDXMuqhttspDPRqvC+ptACdF+cS an43Y8WN/OgtMyehoJGOoQA= =Yg+o -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]