Skip to content

Commit 1f542db

Browse files
committed
step2.sh: Detect non-1TR and issue a user-friendly diagnostic
Signed-off-by: Hector Martin <[email protected]>
1 parent 148eeea commit 1f542db

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

m1n1

Submodule m1n1 updated 1 file

src/step2.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ echo
1515
echo "VGID: $VGID"
1616
echo "System volume: $system_dir"
1717
echo
18+
19+
if ! bputil -d -v "$VGID" | grep -q 'one true recoveryOS'; then
20+
echo "Your system did not boot in One True RecoveryOS (1TR) mode."
21+
echo
22+
echo "To perform step 2 of the installation, the system must be in"
23+
echo "this special mode. Perhaps you forgot to hold down the power"
24+
echo "button, or momentarily released it at some point?"
25+
echo
26+
echo "Note that tapping and then pressing the power button again will"
27+
echo "allow you to see the boot picker screen, but you will not be"
28+
echo "in the correct 1TR mode. You must hold down the power button"
29+
echo "in one continuous motion as you power on the machine."
30+
echo
31+
echo "Your system will now shut down. Once the screen goes blank,"
32+
echo "please wait 10 seconds, then press the power button and do not"
33+
echo "release it until you see the 'Entering startup options...'"
34+
echo "message, then try running this script from recoveryOS again."
35+
echo
36+
echo "Press enter to shut down your system."
37+
read
38+
shutdown -h now
39+
exit 1
40+
fi
41+
1842
echo "You will be prompted for login credentials two times."
1943
echo "Please enter your macOS credentials (for the macOS that you"
2044
echo "used to run the first step of the installation)."
@@ -26,6 +50,9 @@ read
2650

2751
bputil -nc -v "$VGID"
2852

53+
echo
54+
echo
55+
2956
if [ -f m1n1.macho ]; then
3057
kmutil configure-boot -c m1n1.macho -v "$system_dir"
3158
else

0 commit comments

Comments
 (0)