Subject: Re: From zero to /bin/sh?
To: Petar Bogdanovic <p+netbsd@2005.smokva.net>
From: Rui Paulo <rpaulo@NetBSD.org>
List: netbsd-users
Date: 09/16/2005 18:07:58
--NKoe5XOeduwbEQHU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2005.09.16 18:28:52 +0200, Petar Bogdanovic wrote:
| Hello all,
|=20
| I would like to 'build' an extremely minimal (i386-)NetBSD-System. (Not=
=20
| for use, just as an exercise.) What do I need if I just want to get a she=
ll?
|=20
| I assume:
|=20
| - a medium (cd, usb-stick, harddisk, etc.)
| - a ms-dos partition-table with (at least) one primary partition (p.p.)
| - a disklabel on the p.p. with a root-(disklabel-)partition (i.e. wd0a)
| - a root-fs (ffs on wd0a)
| - a primary boot block (/usr/mdec/bootxx_ffsv1) in the MBR or at the
|   beginning of the p.p.
|=20
| - a kernel: /netbsd
| - /bin/init
| - /etc/fstab
| - /bin/sh
|=20
| Is that enough for single-user? What should I add for multi-user?

For something really minimal you can have only /netbsd and a static
binary of /bin/sh. :) But of course, you can't do much with it.
You must also ``ln -s /bin/sh /sbin/init'' or change the initpaths
array in sys/kern/init_main.c.

		-- Rui Paulo

--NKoe5XOeduwbEQHU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFDKvvuZPqyxs9FH4QRAmAwAKCZwUfCGm0M0v5RM/zUS70PbfHcSQCgiCAT
lSJDuE174GqpekcEi0uk8T8=
=SFEa
-----END PGP SIGNATURE-----

--NKoe5XOeduwbEQHU--