rtrouton / create_macos_recovery

Tool for repairing the Recovery volume (APFS) or partition (HFS+) on Macs running macOS 10.13.x or later.
MIT License
118 stars 23 forks source link

cannot use the script #7

Closed yuukiAme closed 2 years ago

yuukiAme commented 4 years ago

I have both the .sh and the installer app on Desktop. I navigate in terminal to the Desktop. Ran the script. Stuck on

-- The path to the macOS installer application is required as the first argument.

Full output below

tom@toms-MacBook-Air:~$ cd Desktop
tom@toms-MacBook-Air:~/Desktop$ chmod +x create_macos_recovery.sh 
tom@toms-MacBook-Air:~/Desktop$ sudo create_macos_recovery.sh "/Users/tom/Desktop/Install\ macOS\ High\ Sierra.app "
Password:
sudo: create_macos_recovery.sh: command not found
tom@toms-MacBook-Air:~/Desktop$ sudo ./create_macos_recovery.sh "/Users/tom/Desktop/Install\ macOS\ High\ Sierra.app "
-- The path to the macOS installer application is required as the first argument.
Usage:
create_macos_recovery.sh "/Users/tom/Desktop/Install macOS High Sierra"
Description:
This script uses a macOS 10.13 and later installer application to repair the Recovery volume (APFS) or partition (HFS+).
Requirements:
Compatible macOS installer application for the Mac's installed OS.
Account with the ability to run commands using sudo, to allow specific functions to run with root privileges.
tom@toms-MacBook-Air:~/Desktop$
yuukiAme commented 4 years ago

Testing another way. Came with this output

tom@toms-MacBook-Air:~/Desktop$ bash
bash-5.0$ sudo create_macos_recovery.sh /Users/tom/Desktop/Install\ macOS\ High\ Sierra.app 
Password:
sudo: create_macos_recovery.sh: command not found
bash-5.0$ sudo ./create_macos_recovery.sh /Users/tom/Desktop/Install\ macOS\ High\ Sierra.app 
-- macOS installer is /Users/tom/Desktop/Install macOS High Sierra.app
-- Installer application for macOS 10.13.6 detected. Proceeding....
-- The macOS installer app provided installs 10.13.6's Recovery, which is earlier than macOS 10.9.5
-- Please use an installer app which installs macOS 10.9.5 or later.
Usage:
create_macos_recovery.sh "/Users/tom/Desktop/Install macOS High Sierra"
Description:
This script uses a macOS 10.13 and later installer application to repair the Recovery volume (APFS) or partition (HFS+).
Requirements:
Compatible macOS installer application for the Mac's installed OS.
Account with the ability to run commands using sudo, to allow specific functions to run with root privileges.
bash-5.0$
yuukiAme commented 4 years ago

I just removed the portion of code below and ran it. Gave me new error.

# Detect if the macOS installer application is running macOS 10.13.x or later. If the
# macOS installer application is for 10.12.x or earlier, stop and display an error message.

if [[ "$installer_qualifies" -lt 1013 ]]; then
    msg_error "This script supports repairing Recovery for macOS 10.13.0 and later."
    msg_error "Please use an installer app which installs macOS 10.13.0 or later."
    exit 1
else
    msg_status "Installer application for macOS $installer_version detected. Proceeding...."
fi

if [[ "$installer_version_digits_only" -lt "$macos_version_digits_only" ]]; then
    msg_error "The macOS installer app provided installs $installer_version's Recovery, which is earlier than macOS $macos_version"
    msg_error "Please use an installer app which installs macOS $macos_version or later."
    usage
    exit 1
fi

this new error...

bash-5.0$ sudo ./create_macos_recovery.sh /Users/tom/Desktop/Install\ macOS\ High\ Sierra.app 
-- macOS installer is /Users/tom/Desktop/Install macOS High Sierra.app
Could not interpret boot device as either network or disk
Can't interpet EFI boot device
-- Target disk is .
-- Target filesystem is .
-- Downloading SecUpd2020-002HighSierra.RecoveryHDUpdate.pkg into /private/tmp
######################################################################## 100.0%
-- Failed to create 10.13.6 Recovery partition on .
--  does not have an APFS or HFS+ filesystem.

Found the problem. My OS drive is using MacOS Extended (Journaled) not APFS or HFS+.