Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Recreating a recovery partition via shell script - still can't boot to recovery

Recreating a recovery partition via shell script - still can't boot to recovery
Thread Tools
shifuimam
Addicted to MacNN
Join Date: Aug 2006
Location: The deep backwoods of the PNW
Status: Offline
Reply With Quote
May 25, 2020, 05:31 PM
 
This is on my mid-2010 MBP running High Sierra, but I'm going to do the same thing with my newer MBP running Catalina, so if there are differences between the two, that'll matter here.

I'm using this shell script to rebuild the recovery partition after replacing the drive and clean installing OS X. My Catalina MBP also dual boots Arch Linux with a firmware boot entry (no grub).

I ran this script on my High Sierra MBP, and it completed with no apparent errors. It seems like I have a recovery partition, but it doesn't show up in the Startup Disk settings or in the bootloader itself.

Do I even have a real recovery partition? Before I run this on my newer MBP I want to make sure I'm not doing something dumb.

Code:
/dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *120.0 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_APFS Container disk1 119.8 GB disk0s2 /dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +119.8 GB disk1 Physical Store disk0s2 1: APFS Volume Mac OS 25.1 GB disk1s1 2: APFS Volume Preboot 22.3 MB disk1s2 3: APFS Volume Recovery 514.9 MB disk1s3 4: APFS Volume VM 4.3 GB disk1s4
Sell or send me your vintage Mac things if you don't want them.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 25, 2020, 07:00 PM
 
When I want recovery partitions for multiple OS versions on a single drive, I use iPartition to clone the recovery partition in question from a source drive.

Coriolis Systems has shut down, mostly due to the APFS transition. Sales did not justify the effort to rebuild for APFS. Apple didn't help things by sitting on the APFS docs for a year before releasing them outside Apple.

But Coriolis Systems made all their software free downloads today, with license files included. Anyone can use iPartition, or iDefrag. Just don't use iDefrag on APFS volumes. iPartition mostly doesn't care about partition content. However, a partition shrink operation might trigger file compaction, which would stop with an error on APFS.
     
shifuimam  (op)
Addicted to MacNN
Join Date: Aug 2006
Location: The deep backwoods of the PNW
Status: Offline
Reply With Quote
May 25, 2020, 08:33 PM
 
Doesn't that mean I'm stuck on my newer MBP with APFS? I also noticed that running the recovery partition creator script appears to have converted my other MBP running 10.13 to APFS, too.
Sell or send me your vintage Mac things if you don't want them.
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
May 27, 2020, 12:01 PM
 
Is the recovery partition OS-version sensitive?

When I was dinking around with rebuilding my iMac, I looked into several tools that would “create a recovery partition on you drive”, but I couldn’t get solid assurances that the created recovery partition would work with whichever OS version I was playing with.

I would assume that the recovery tools would be at least somewhat version-sensitive, but really only Disk Utility would need to be really up to date for a transition to non-APFS systems. Or I’m woefully under informed about the details of both recovery and APFS versus newer file systems.

Glenn -----OTR/L, MOT, Tx
     
shifuimam  (op)
Addicted to MacNN
Join Date: Aug 2006
Location: The deep backwoods of the PNW
Status: Offline
Reply With Quote
May 29, 2020, 05:03 PM
 
Originally Posted by ghporter View Post
Is the recovery partition OS-version sensitive?

When I was dinking around with rebuilding my iMac, I looked into several tools that would “create a recovery partition on you drive”, but I couldn’t get solid assurances that the created recovery partition would work with whichever OS version I was playing with.

I would assume that the recovery tools would be at least somewhat version-sensitive, but really only Disk Utility would need to be really up to date for a transition to non-APFS systems. Or I’m woefully under informed about the details of both recovery and APFS versus newer file systems.
ffs wrote a response and I ate it because I'm dumb.

TL;DR - the script does work, but the partition it creates doesn't show up anywhere. The only way to boot it is via Cmd+R.

With a factory-configured disk, does the recovery partition show up in Opt+Boot and the Startup Disk prefs pane?

I successfully used the script linked in my OP on both Catalina and High Sierra, on two different 13" MBPs.
Sell or send me your vintage Mac things if you don't want them.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 29, 2020, 05:58 PM
 
Recovery partitions do not show in Startup Disk pref pane. I do see them in the firmware boot selector.
     
shifuimam  (op)
Addicted to MacNN
Join Date: Aug 2006
Location: The deep backwoods of the PNW
Status: Offline
Reply With Quote
May 29, 2020, 07:16 PM
 
Originally Posted by reader50 View Post
Recovery partitions do not show in Startup Disk pref pane. I do see them in the firmware boot selector.
Interesting. I'd like to see them show up in the bootloader. I know the bootloader will auto-detect EFI stuff, but any ideas on how I might add it manually?
Sell or send me your vintage Mac things if you don't want them.
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
May 30, 2020, 05:49 PM
 
Hold Command-R during boot to boot to the recovery partition. With the startup chime a thing of the past, I don't know what cue to use for when to hold those keys down...

Glenn -----OTR/L, MOT, Tx
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:23 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,