rtrouton / create_macos_recovery Goto Github PK
View Code? Open in Web Editor NEWTool for repairing the Recovery volume (APFS) or partition (HFS+) on Macs running macOS 10.13.x or later.
License: MIT License
Tool for repairing the Recovery volume (APFS) or partition (HFS+) on Macs running macOS 10.13.x or later.
License: MIT License
First of all, awesome work on this script. Super useful and insightful.
I followed this tutorial for building a custom BaseSystem.dmg
, as I want to add some files to the recovery partition. Namely, I want to add /private/var/root/.bash_profile
so that I can add some aliases to the recovery shell.
In a nutshell, I took BaseSystem.dmg
, mounted it, cloned it as read-write
, modified it, and converted it back to compressed
. Then I tossed it over the original BaseSystem.dmg
in Install macOS Catalina.app
and ran the script. The script ran with no errors, but when I boot with โR, it takes me into internet recovery. If I reboot and run the script again with the original BaseSystem.dmg
, recovery mode works.
I'm wondering if anyone can help me out here. I realize this probably isn't an issue with your script, but with whatever it is I've done to create my custom BaseSystem.dmg
. Anyone know what might be wrong?
Always get an error:
Mac-Pro:create_macos_recovery-master rem$ sudo /Users/rem/Downloads/create_macos_recovery-master/create_macos_recovery.sh /Applications/Install\ macOS\ Catalina.app
Password:
-- macOS installer is /Applications/Install macOS Catalina.app
-- Installer application for macOS 10.15.7 detected. Proceeding....
Could not interpret boot device as either network or disk
Can't interpret EFI boot device
Could not find disk:
-- Target disk is .
Could not find disk:
-- Target filesystem is .
-- Downloading SecUpd2020-004HighSierra.RecoveryHDUpdate.pkg into /private/tmp
######################################################################################################################################################### 100.0%
-- Failed to create 10.15.7 Recovery partition on .
-- does not have an APFS or HFS+ filesystem.
Mac-Pro:create_macos_recovery-master rem$
P.S. Mac Pro 5.1, macOS Catalina 10.15.7 (19H2) - dosdude patched, Samsung SSD 860 EVO 1TB, Volume type : APFS Container,
Hi, I am getting the following error:
-- macOS installer is /Volumes/Data_Raid_0/Install macOS High Sierra.app
-- Installer application for macOS 10.13.6 detected. Proceeding....
Could not interpret boot device as either network or disk
Can't interpet EFI boot device
-- Target disk is .
-- Target filesystem is .
-- Downloading SecUpd2020-004HighSierra.RecoveryHDUpdate.pkg into /private/tmp
######################################################################## 100.0%
-- Failed to create 10.13.6 Recovery partition on .
-- does not have an APFS or HFS+ filesystem.
Any idea how I can fix this would be appreciated.
Thanks
Unable to run script because the SecUpd2019-007HighSierra.RecoveryHDUpdate.pkg package is no longer available.
SecUpd2020-003HighSierra.RecoveryHDUpdate.pkg is not there
Maybe it would be "better" to use SecUpd2020-003Mojave.RecoveryHDUpdate.pkg ?
SecUpd2020-001HighSierra.RecoveryHDUpdate.pkg
Not found either now.
Painful how they keep changing things.
The URL (http://swcdn.apple.com/content/downloads/22/27/061-21534-A_KW51WMNF7J/js06knary954a9qquzljmax1xtqga4yaaz/SecUpd2019-005HighSierra.RecoveryHDUpdate.pkg) for the download of SecUpd2019-005HighSierra.RecoveryHDUpdate.pkg doesn't seem to work.
If I try and hit that from a web browser I get a "not found" response.
I tried to find a comparable download from apple, (closest I could get is this one,
https://updates.cdn-apple.com/2019/cert/061-41807-20191024-e1f5cfe8-c906-4b7f-90b5-0ad98850cbd5/SecUpd2019-005HighSierra.dmg)
which doesn't contain the same tools that the script requires.
I accidentally deleted the recovery partition of my macOS 11.0, so im here to ask, does it work with macOS 11.0? thanks.
I am running MacBook Pro late 2011 with OS 10.13.6 and OS 10.15.6 and Windows 7 Pro. Also have dosdude's GPU patch running. I am also using zsh shell in Terminal and Login. Have Terminal also emulating .sh shell. The file create_macos_recovery is also on desktop. Here is my Terminal window from session which I did on desktop:
Anyone just pipe in with suggestions because I am a little new to this Github thing. I also have factory installed 256GB ssd and all volumes and container are APFS and GUID. All drives routinely run thru Disk Utility to detect any problems and Terminal show my OS 10.13.6 Recovery Partition and I can boot into recovery when OS High Sierra is startup Drive. Now I just need OS Catalina to have its own Recovery Partition and everything will be golden.
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$
I'm trying to use the script on macOS Big Sur beta 5, but the script failed with an "Unsupported version" error.
Is there any chance to adopt it?
Thanks
I was wondering if you'd consider adding an optional third argument in the command line to specify a different drive for creating the recovery partition on.
I run the script, it did stuff and informed that all went ok.
But there is no recovery partition to be found...
Any clues?
I have Catalina 10.15.2 and Macbook Pro 13" 2019
Also the disks are encrypted.
When I execute the script in macOS Mojave 10.14.6
with rEFInd Boot Manager
installed, it send following error.
$ sudo ./create_macos_recovery.sh /Applications/Install\ macOS\ Mojave.app
-- macOS installer is /Applications/Install macOS Mojave.app
-- Installer application for macOS 10.14.6 detected. Proceeding....
-- Target disk is EFI.
-- Target filesystem is msdos.
-- Downloading SecUpd2019-006HighSierra.RecoveryHDUpdate.pkg into /private/tmp
######################################################################## 100.0%
Error encountered while creating /private/tmp/recoveryupdate10.14.6. Error 17: File exists
-- Running ensureRecoveryPartition for non-APFS target volume: EFI
/private/tmp/recoveryupdate10.14.6/Scripts/Tools/dm - dm - Version 5
HFS/CS EnsureRecoveryPartition: LogicalTarget=disk2s1 BaseSystemDMG=/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.dmg BaseSystemCL=/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.chunklist DiagDMG=/Applications/Install macOS Mojave.app/Contents/SharedSupport/AppleDiagnostics.dmg DiagCL=/Applications/Install macOS Mojave.app/Contents/SharedSupport/AppleDiagnostics.chunklist VerifyImage=0 RepairDonor=0 Bless=0
HFS/CS EnsureRecoveryPartition: Async call initiate
HFS/CS EnsureRecoveryPartition: Operation in progress
HFS/CS EnsureRecoveryPartition: Operation start confirmed
HFS/CS EnsureRecoveryPartition: Operation 100.0% complete
HFS/CS EnsureRecoveryPartition: Operation fully complete
HFS/CS EnsureRecoveryPartition: Operation finished
HFS/CS EnsureRecoveryPartition: Error: A disk with a mount point is required (-69854)
-- Failed to create 10.14.6 Recovery partition on EFI.
-- Recovery tools returned the following non-zero exit code: 1
The I run:
$ sudo mount_apfs /dev/disk1s3 /Users/fernando/RecoveryDisk
Result:
$ sudo ./create_macos_recovery.sh /Applications/Install\ macOS\ Mojave.app
-- macOS installer is /Applications/Install macOS Mojave.app
-- Installer application for macOS 10.14.6 detected. Proceeding....
-- Target disk is EFI.
-- Target filesystem is msdos.
-- Downloading SecUpd2019-006HighSierra.RecoveryHDUpdate.pkg into /private/tmp
######################################################################## 100.0%
-- Running ensureRecoveryPartition for non-APFS target volume: EFI
/private/tmp/recoveryupdate10.14.6/Scripts/Tools/dm - dm - Version 5
HFS/CS EnsureRecoveryPartition: LogicalTarget=disk0s1 BaseSystemDMG=/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.dmg BaseSystemCL=/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.chunklist DiagDMG=/Applications/Install macOS Mojave.app/Contents/SharedSupport/AppleDiagnostics.dmg DiagCL=/Applications/Install macOS Mojave.app/Contents/SharedSupport/AppleDiagnostics.chunklist VerifyImage=0 RepairDonor=0 Bless=0
HFS/CS EnsureRecoveryPartition: Async call initiate
HFS/CS EnsureRecoveryPartition: Operation in progress
HFS/CS EnsureRecoveryPartition: Operation start confirmed
HFS/CS EnsureRecoveryPartition: Operation 100.0% complete
HFS/CS EnsureRecoveryPartition: Operation fully complete
HFS/CS EnsureRecoveryPartition: Operation finished
HFS/CS EnsureRecoveryPartition: Error: A disk with a mount point is required (-69854)
-- Failed to create 10.14.6 Recovery partition on EFI.
-- Recovery tools returned the following non-zero exit code: 1
Setting boot_drive
manually works fine.
My disks:
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 883.0 GB disk0s2
3: Microsoft Basic Data Win10 140.4 GB disk0s3
4: Windows Recovery 561.0 MB disk0s4
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +883.0 GB disk1
Physical Store disk0s2
1: APFS Volume macOS 443.3 GB disk1s1
2: APFS Volume Preboot 45.3 MB disk1s2
3: APFS Volume Recovery 1.0 GB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.