Re: init is pid 1 vs. initrd

Martin Schulze (joey@kuolema.Infodrom.North.DE)
Fri, 17 Apr 1998 21:00:57 +0200


--JwB53PgKC5A7+0Ej
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

On Fri, Apr 17, 1998 at 02:05:12PM -0400, Raul Miller wrote:
> [I'm replying to a message I deleted.]
>=20
> I am confused by this concept of "can't call mount for initrd"
> because "then init wouldn't be process 1". I mean, can't you
> just create the init process first (as in: you don't have to
> exec init right away)?
>=20
> Even simpler would be: on the initrd make /bin/init be a shell
> script. Conceptually, it a installs some modules, remounts
> root, then exec's /bin/init.

Too difficult. Why not just
=2E use initrd
=2E add modules
=2E tell the kernel its root device
=2E exit
=2E let the kernel load its root device.

With rootfs on RAID0 I use the following as /linuxrc in initrd

#! /bin/ash

if [ -s /etc/mdtab -a -f /sbin/mdadd ]
then
echo "Preparing system for rootfs raid."
/sbin/mdadd -ar
/bin/mount -t proc /proc /proc
echo 0x900 > /proc/sys/kernel/real-root-dev
/bin/umount /proc
else
echo "No mdtab or mdadd found."
fi

I'm sending you a longer description in a different mail, describing this.
If others are interested, drop me a line.

Regards,

Joey

--=20
/ Martin Schulze http://home.pages.de/~joey/ =
=20
/ *** Fatal Error: Found [MS-Windows], joey@linux.de /
/ repartitioning Disk for Linux ... /

--JwB53PgKC5A7+0Ej
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia

iQCVAwUBNTem6BRNm5Suj3z1AQH5twP+P+SwOg9StikrqmhTzdtbkF3sp+0lknFw
eZexfjD9uKMj632649CDUVBE4KIwymryXjP1qxeqf/krFHXTILbBxHRPz7xth7GK
ujx0PFxl7tEdCkMpzp2IvX0fvzD+xsjoF4A5/baZWLZ0SzJCTzqt7TgRc9duApQu
Q6LQ2ogr/QY=
=4WKi
-----END PGP SIGNATURE-----

--JwB53PgKC5A7+0Ej--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu