From owner-freebsd-hackers Mon Feb 17 14:42: 9 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EA1037B401 for ; Mon, 17 Feb 2003 14:42:05 -0800 (PST) Received: from lenny.anarcat.ath.cx (dsl-135-123.aei.ca [66.36.135.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA75543F75 for ; Mon, 17 Feb 2003 14:42:02 -0800 (PST) (envelope-from anarcat@lenny.anarcat.ath.cx) Received: from lenny.anarcat.ath.cx (localhost.anarcat.ath.cx [127.0.0.1]) by lenny.anarcat.ath.cx (8.12.6/8.12.6) with ESMTP id h1HMfxiK015448 for ; Mon, 17 Feb 2003 17:41:59 -0500 (EST) (envelope-from anarcat@lenny.anarcat.ath.cx) Received: (from anarcat@localhost) by lenny.anarcat.ath.cx (8.12.6/8.12.6/Submit) id h1HMfwnO015447 for hackers@FreeBSD.org; Mon, 17 Feb 2003 17:41:58 -0500 (EST) Date: Mon, 17 Feb 2003 17:41:58 -0500 From: The Anarcat To: hackers@FreeBSD.org Subject: Results: what userland files are necessary for an installworld? Message-ID: <20030217224158.GA606@lenny.anarcat.ath.cx> References: <20030212202327.GH522@xtanbul> <20030213015956.GD2066@gothmog.gr> <20030212202327.GH522@xtanbul> <20030213012627.GA1050@BSDWins.Com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <20030213015956.GD2066@gothmog.gr> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ok. A few panics later, I brought the box back from the dead, with the help of a 5.0-rel mini-iso. :) I have put the gory details (a script record of the session) on http://anarcat.ath.cx/scrapped.log (warning: it's big and ugly as the rest of this mail). A few things about the final setup: my /var is hosed, I moved most files from / and /usr into subdirectories so they're considered "dead". After this experiment, I can say that make installworld need much more than just make and /usr/{src,obj}. In fact, if you have lost either of {/usr}/{s}bin or /usr/lib/libc* or /usr/libexec/ld-elf.so.1, consider using an iso or a install floppy. :) First of all, my mistake was to think make could live without /bin/sh. :) So that's the first thing that's needed. Then there's make(1) "system mk files": lenny# cd /usr/src^M lenny# ~/make^M make: no system rules (sys.mk). ouch! So I brought back /usr/share and /bin/sh from the dead. Then there's is a long list of binaries that are used here and there: date(1): lenny# make installworld^M date: not found "/usr/src/Makefile", line 120: warning: "LC_ALL=3DC date" returned non-zero= status echo(1): "/usr/src/Makefile", line 120: warning: "LC_ALL=3DC date" returned non-zero= status echo:No such file or directory sysctl(8): sysctl: not found "/usr/src/Makefile.inc1", line 126: warning: "sysctl -n kern.osreldate" ret= urned non-zero status At this point, we can consider that those tools (date, echo and sysctl) are pretty much essential. But what about some less obvious stuff: mktemp(1): /usr/bin/mktemp: not found "/usr/src/Makefile.inc1", line 161: warning: "/usr/bin/mktemp -d -u -t inst= all"=20 returned non-zero status grep(1): grep: not found ERROR: Required smmsp user is missing, see /usr/src/UPDATING. Then I got tired and just restored /bin, /sbin /usr/bin and /usr/sbin. But installworld wasn't happy yet: lenny# make installworld^M Running test variables ELF interpreter /usr/libexec/ld-elf.so.1 not found^M FAIL: Test failed: regression detected. See above. ELF interpreter /usr/libexec/ld-elf.so.1 not found^M *** Signal 6 Stop in /usr/src/tools/regression/usr.bin/make. Abort trap Yes-yes... The regression tests try out the non-working, userland make, then try to build one because it doesn't see *it already has one in /usr/obj*. Ouch! So, I restored the original /usr/bin/make. :( Then I got problems over the /etc front: grep: /etc/passwd: No such file or directory ERROR: Required smmsp user is missing, see /usr/src/UPDATING. *** Error code 1 (continuing) I avoided this one by copying master.passwd from /usr/src, but installworld could have seen this one coming. Generating /etc/passwd automatically demands pwd_mkdb, but I could've wrote it by hand or called in mergemaster to the rescue. Then I got a little bit farther: Testing installed kernel for new sigaction(2) syscall Seems ok.. mkdir -p /tmp/install.VpIC0A0d for prog in [ awk cat chflags chmod chown date echo egrep find grep ln mak= e mkd ir mtree mv pwd_mkdb rm sed sh sysctl test true uname wc zic; do cp `whic= h $pr og` /tmp/install.VpIC0A0d; done usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory This is of course not very wise to do when you don't have those tools installed. Restoring /bin, /sbin, /usr/bin and /usr/sbin along with ld-elf.so.1 (since /usr/* stuff is dynamic) solves that one.=20 At this point, I managed to trash my backup copies of [/usr]/[s]bin and I just dropped the whole experience. I don't recommend people to rely on /usr/obj to get their system back from the dead. Only a "real" bootstrap tool such as a livecd, the install disks or the install floppies can get you out of a mess such as /bin being dead. This, of course, ignoring the backup argument. :) I'll send my acpiconf experiments results on -current later on. A. --=20 Legislation should outlaw an advertiser's attempts to use its economic relationships with a media enterprise to influence the enterprise not to print or broadcast content that it would otherwise choose to present . . . . There is little reason to allow this use of economic power to censor others' speech and to block the public's access to information or viewpoints. - C. Edwin Baker --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+UWU1ttcWHAnWiGcRAkk+AKCEj6vq9GIKhHt2uVQItn+IcVk5sQCfUT7A CQdXHRFQPDBYPM8pn7cu8qA= =yD6/ -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message