Date: Mon, 17 Feb 2003 17:41:58 -0500 From: The Anarcat <anarcat@anarcat.ath.cx> To: hackers@FreeBSD.org Subject: Results: what userland files are necessary for an installworld? Message-ID: <20030217224158.GA606@lenny.anarcat.ath.cx> In-Reply-To: <20030213015956.GD2066@gothmog.gr> References: <20030212202327.GH522@xtanbul> <20030213015956.GD2066@gothmog.gr> <20030212202327.GH522@xtanbul> <20030213012627.GA1050@BSDWins.Com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030217224158.GA606>