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

Does not detect Recovery Partition, it detects rEFInd Boot Manager #3

Closed nando2301 closed 4 years ago

nando2301 commented 4 years ago

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
rtrouton commented 4 years ago

I've updated the script to look specifically for apfs or hfs filesystems, which are the two filesystems which can be updated. This should address the issue by gracefully failing where the filesystem is not APFS or HFS+.

LABANAMUSIC commented 3 years ago

Hi Master… I’ve got the same problem… How can I solve the Issue??

— Failed to create 10.14.6 Recovery partition on . — does not have an APFS or HFS+ filesystem.

Mojave 10.14.6