Disk Utility and upgrade woes
I managed to completely hose my disk upgrading to the El Capitan GM today, and ended up having to do a clean install + restore from Time Machine. I wish I had the proper steps to reproduce this, and I wish I’d taken screenshots along the way, but at the least I can write up what I remember of it.
I had two boot volumes on my MacBook Pro: one for Yosemite, and one for the El Capitan beta. Both were encrypted with File Vault.
What I wanted to do this morning was:
- Remove the El Capitan volume
- Expand the Yosemite volume to take up the full disk again
- Upgrade my Yosemite installation to El Capitan
In hindsight, I probably should have started by turning off File Vault. I didn’t though, and things went bonkers on me.
To start, I was booted up in Yosemite. I opened up Disk Utility and ran Verify Disk on the volumes to make sure everything was okey-dokey before I started changing anything. Disk Utility reported an error and told me to restart in Recovery Mode to fix it.
I did that, but ran into a problem right away: Disk Utility in El Capitan can’t unlock encrypted volumes.
(It’s there, I just didn’t find it.)
Yosemite’s Disk Utility can unlock them:
What I should have done at this point: unlock the volumes on the command line and delete the El Capitan volume from there. I didn’t think of it at the time though, and instead booted back in up in Yosemite. I didn’t want to mess around too much in the Recovery volume here, because it was from a beta El Capitan and I wasn’t sure how much I trusted it.
Instead, I booted back into Yosemite, deleted my El Capitan beta volume, and ran the El Capitan installer, reasoning that it’d upgrade the Recovery partition and then let me try and expand the volume during the install. Bad idea on my part.
The El Cap installer went through, did it’s thing, and upgraded my Yosemite installation. The install went fine, as far as I could see. I tried to expand the volume to fill up the rest of the disk, and Disk Utility just wouldn’t let me do it.
Reasoning that maybe it was because I was booted into it, I rebooted in the Recovery volume again and tried to do it there. Same thing: no matter what I tried, I couldn’t expand the boot volume up to use the rest of the disk. (I wasn’t thinking at the time that hey, the Recovery volume is on the same physical disk, ninny.)
Not thinking clearly now, I used the nuclear option and deleted the volume. I was vaguely thinking that I could net-install El Capitan before I realized that hey, that’s probably not available yet.
I gave up at this point. Messaged my wife, told her I broke my laptop, asked her to start downloading the El Capitan seed for me at home on our iMac, and went to lunch.
I was swearing a lot about Disk Utility at this point. (Sorry, Disk Utility devs!) This whole mess is mostly my fault: I should have held off on trying to upgrade at the first hint of trouble, but man, it failed me on fixing things.
I built a bootable USB stick, booted the laptop off of that, and completely wiped the drive from the command line. Installed El Capitan and then restored from Time Machine, which thankfully I thought to run right before starting this whole mess.
Aside: Restoring from Time Machine went beautifully. I started it a bit after 3:00 PM, and by 5:00 PM (time to go home), it still reported having an hour+ left to go. I really don’t like leaving my personal laptop at work, so I decided to experiment and put the it to sleep for a few minutes, and woke it up again to see how it would react.
No problem: the restore picked up where it left off. So I went full crazy:
- Put the MacBook Pro to sleep.
- Unplugged the Time Machine drive.
- Stuck the whole mess of system, drive, and cables in my backpack and went home.
- After dinner, plugged the drive back in and woke the system back up.
The OS prompted me to unlock the Time Machine drive (did I mention that’s encrypted too?), and again, picked up right where it left off. An hour later it was done. Time Machine worked perfectly here: everything’s right where I left it.
So now I’ve turned File Vault on again and I’m letting the system encrypt itself, and everything’s fine.
My gut feeling about what happened with resizing those volumes is:
- Enabling File Vault on both volumes put them into separate Core Storage Logical Volume Families. I somewhat remember seeing that on the command line, but I didn’t take a screenshot and it didn’t click until just now.
- Both volumes took up the entire space available in their respective Logical Volume Families.
- As a result, Disk Utility couldn’t expand the volume I wanted it to because it would have to change the Logical Volume Family to do it, and it’s not built to do that.
Looking at the command line options (now that I’m calm about it), I don’t know if there is a way to do what I wanted short of blowing away the whole disk. I do wish Disk Utility.app could tell me a bit more about what was going on though, and it’s still annoying that you can’t unlock a volume from within it anymore.
(You can still unlock an encrypted DMG via File -> Open Disk Image…, but if I don’t let Finder unlock my Time Machine disk when I plug it in, Disk Utility doesn’t give me the option.)