Bug 231325 - rescue/sh check failed, installation aborted
Summary: rescue/sh check failed, installation aborted
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-12 11:03 UTC by Jochen Neumeister
Modified: 2018-11-21 04:11 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Neumeister freebsd_committer 2018-09-12 11:03:53 UTC
:/usr/src # make installworld
make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at rescue on Wed Sep 12 10:59:33 CEST 2018
/bin/sh: /usr/obj/usr/src/amd64.amd64/rescue/rescue/rescue: not found
rescue/sh check failed, installation aborted
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.

/usr/src is up-to-date with "svn up"

 # uname -a
FreeBSD rescue 12.0-ALPHA5 FreeBSD 12.0-ALPHA5 #0 r338597: Tue Sep 11 23:07:44 CEST 2018     root@rescue:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
Comment 1 Ed Maste freebsd_committer 2018-09-13 03:05:30 UTC
Do you have anything in /etc/src.conf?
Comment 2 Ed Maste freebsd_committer 2018-09-24 13:51:39 UTC
This is the test that failed:

# If installing over the running system (DESTDIR is / or unset) and the install
# includes rescue, try running rescue from the objdir as a sanity check.  If
# rescue is not functional (e.g., because it depends on a system call not
# supported by the currently running kernel), abort the installation.
#
.if !make(distributeworld) && ${MK_RESCUE} != "no" && \
    (empty(DESTDIR) || ${DESTDIR} == "/") && empty(BYPASS_INSTALLCHECK_SH)
_installcheck_world: __installcheck_sh_check
__installcheck_sh_check: .PHONY
        @if [ "`${OBJTOP}/rescue/rescue/rescue sh -c 'echo OK'`" != \
            OK ]; then \
                echo "rescue/sh check failed, installation aborted" >&2; \
                false; \
        fi
.endif

Note that this is bypassed if WITHOUT_RESCUE is set, and you can set BYPASS_INSTALLCHECK_SH to skip this.  Can you please run installworld again with that set?
Comment 3 Jochen Neumeister freebsd_committer 2018-10-01 07:59:18 UTC
After a new install with ALPHA7 it works. I think, we can close here :-)

Tahnks for your help Ed.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-20 04:05:44 UTC
Just for reference, I just hit something similar:

- Updating from base r339405 (12.0-ALPHA10 amd64) to base r340547
- Standard 'everything' buildworld + META_MODE (KERNCONF=GENERIC-NODEBUG)
- /etc/src.conf: MALLOC_PRODUCTION="YES" WITH_RETPOLINE="yes"

[root@CURRENT-amd64:/usr/src] make installworld
make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at CURRENT-amd64 on Sun Nov 18 21:05:57 AEDT 2018
Trace/BPT trap (core dumped)
rescue/sh check failed, installation aborted
*** Error code 1

BYPASS_INSTALLCHECK_SH=yes gets installworld further, which later fails at:

===> usr.bin/bmake (install)
install  -s -o root -g wheel -m 555   make /usr/bin/make
install  -o root -g wheel -m 444  make.debug /usr/lib/debug/usr/bin/make.debug
install  -o root -g wheel -m 444 make.1.gz  /usr/share/man/man1/
===> usr.bin/bmake/tests (install)
*** Signal 10

Going to try another full fuild WITH_META_MODE disabled to recover
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-20 04:07:17 UTC
Correct and update classification
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-20 04:39:49 UTC
Looks like my issue is related to WITH_RETPOLINE (See bug 233336)
Comment 7 Ed Maste freebsd_committer 2018-11-20 14:16:55 UTC
(In reply to Kubilay Kocak from comment #4)
> BYPASS_INSTALLCHECK_SH=yes gets installworld further, which later fails at:

Note that I added the installworld rescue test explicitly to make sure a working rescue will exist after the install in case it's needed for recovery. BYPASS_INSTALLCHECK_SH should only be used if you have some other way to recover (a ZFS boot environment, alternate boot media, etc.)