From owner-freebsd-current@freebsd.org Sun Jan 14 11:10:20 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31944E62DE8 for ; Sun, 14 Jan 2018 11:10:20 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A395377168 for ; Sun, 14 Jan 2018 11:10:19 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from hermann.intern.walstatt.dynvpn.de ([85.182.8.155]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LfSyv-1fBsbx3v7x-00p2D7 for ; Sun, 14 Jan 2018 12:10:17 +0100 Date: Sun, 14 Jan 2018 12:10:15 +0100 From: "Hartmann, O." To: FreeBSD CURRENT Subject: /lib/casper: read error: Invalid argument Message-ID: <20180114121011.56204f3f@hermann.intern.walstatt.dynvpn.de> Organization: walstatt.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:315Nj6kOhywFqCl5El1mFTlSphCyCSvm8gJVZBsGND+iBzA4+rW YpDpCfQo96/ZmOK2MF9b+wADZ4a7Nvrjc4kMf0pKvo2D/d3wkgszJOSbBnhJ9uNs+FqAguw 84nHHHT54udXRVjKihCuDXCIdJBUct5l07hgA6hrM8hMhk6mnmyRfBoAIa44mDIytvzz2Pf 9q4aTyXVgbkyBVZO3fqaw== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZHyeK2ttgIk=:2PSrbncQMphzxBI+L0IOS9 IDnwr4l1pWTam+l7YBn8TKitCuQWD6UzozAh4+TahVhF2w1TJazfPs9mG5bBq38QIPuU8DF5P eCdEltXIx1w+OinNfzPIVVlBgzjOYnC851sq1fWU5U4vkgneNQ95Hlik7N+QYvZzy/yo1ujuS bmmhHQuj4uD/d99Nb37ueKnMYPj1zEfz/L0b1UuD2DF5ZU5EFIuHa1OD9fwxMtuSZlYgkXI0o xoBxiplL2qvIAlxWFQxbYu2cZAmTavbvaF2pgOeJz8d+iFQ3//n8tBIWDIY9dmy8CwXUDtbdP XVtZXHgk7j5loypG7koHljR3YWng1f9ugx4wIE5LznElZ3K2NS43M0A0S7XGedawNrCFwjcO7 cHZbbnVe7zGAoJDXYokurn3bY97nn7DLwcO4nMkYPqsiMkUuAz+B61sjnozmQ3nOogCXy7Lng HVDab97+xLok+OQ3u3KYpme4u6z5zMAfH9o5ZIivzWKyTa5om3WWJKutZSC2Iv5hdkZYX4gdq /6GEydm/WCGrzW7pkcBDhDj1IBDilpeUFkCMugTsrNrgUW1oYhtu2DeSe63LGHJ7TTFmjk+FR HRzVsXIcQBM3Pze1R+f/Jw6p/w7uDOd3PlBLr4jSq69AWeUtdKWKhdGC5aTPql0JwMf1sBt1c xi8MSeNCApVediyheTE4pNcAsiJx/xsqjP3D3dw+HiI4cjVTaZ8f5C8UUssL/iShqWgnKzbwL GZlYOrYTIAkmFB3Cs+NnGIxH7p35s+31tD8gLbQbmSHnRxHA9Ld7OLfEdzu8M0IHolbknn4lb VxQXhg5Wj47ppMT2P0NSWssGO+47l0ksb+zvS34uUleUxE1euM= X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jan 2018 11:10:20 -0000 Again, I ran into a havoc update of CURRENT last night. While booting a freshly installed kernel and performing "make -j4 installworld", the box suddenly rebooted - out of the blue. With the wrecked CURRENT left behind (r327866), I'm not able to boot even into single user mode. The box halts with a starnge BTX loader message indicating BTX halted followed by a set of register dumps. I saw this weird behaviour last year around November, when the boot chain has been corrupted. Well, when the strange "BTX halted" message doesn't appear, some other strange message occurs claiming that there is no /boot/loader. I tried to investigate with the USB image created 10th January 2018 from ISO downloads and it showed, that /boot/ was obviously intact, but files in /usr/sbin, /usr/bin were zero in size, also some libs in /usr/lib and /lib. While /boot/ seemingly being already installed while other portions failed, I knew from the past that I had to replace all /boot, /bin, /sbin, /usr/sbin, /usr/bin, /lib, /usr/lib , /usr/libexec and /libexec from the recent USB image. I did so via "pax -v -rw -pe", but I had to "chflags noschg" some files/libraries on the target to get them overwritten. I simply did a chflags noschg * to every folder/subfolder and "pax'ed" the destination then. So far. I'm able to boot into single user again, but when it comes to the shell and /bin/sh is supposed to be executed, I get the strange message: /lib/casper/: read error: Invalid argument and the prompt is jumping back to ensure the PASSWORD (console is password protected). So, when using /rescue/sh (which is a remaining from the broken update procedure), I'm able to have a shell in single user mode. But I have no chance to repair the system by using the fully intact /usr/src and /usr/obj infrastructure! Why? Again, when typing "make buildworld", I'm bothered with /lib/casper/: read error: Invalid argument and make: "/usr/src/share/mk/bsd.compiler.mk" line 142: warning: "cc --version|| echo 0.0.0" returned non-zero status and a following line complaining about line 155: Unable to determin compiler type for CC=cc. Consider setting COMPILER_TYPE. Something is hindering to start the compiler somehow and it is related to /lib/casper/: read error: Invalid argument? What is wrong here? How to fix this? Again, the useless, minimalistic USB iamges provided by the FreeBSD.org site without compiler infrastructure are useless for desaster recovery, since I can not simply boot into the image and performing a DESTDIR-delegated installworld of an existing precompiled world! How can I use the ISO image to rescue the system? I do not find anything in recent docs. A couple of years ago such a task was possible until some people started to get rid of the compiler/installation infrastructure necessary to installworld. Thanks in advance for the help, kind regards, oh