-
Notifications
You must be signed in to change notification settings - Fork 54
Auto detect Volume Format for eraseVolume #200
Conversation
Doesn't apple already handle this when performing an install? We don't format the volumes prior to using startosinstall and we end up with APFS volumes. I don't think fusion drives are supported yet with APFS. |
This is for when you want to wipe the drive and install macOS fresh. |
With an imaging workflow or startosinstall? |
startosinstall |
Weird. So are you seeing 10.13.x HFS devices (non fusion) not being converted to APFS when using startosinstall? |
No, they are converted just fine. I think we are talking about different things. eraseVolume in its current form defaults to JHFS+, you have to specify a volume format. So you can't use the same workflow to fresh install (startosinstall) 10.13 on a current 10.12 machine as you would on an already converted 10.13 or a HFS+ 10.13 machine (Fusion drive). With this change you can. |
Are you positive? During the install, Apple will concert the volume to APFS, regardless if it's a new install (blank HFS volume) or an upgrade. The change is small and harmless, but none of us have seen this behavior, so something isn't adding up. |
I don't think there's any behavior to "see". |
Imagr/MainController.py
Outdated
@@ -1676,8 +1676,22 @@ def eraseTargetVolume(self, name='Macintosh HD', format='Journaled HFS+', progre | |||
Erases the target volume. | |||
'name' can be used to rename the volume on reformat. | |||
'format' can be used to specify a format type. | |||
'format' type of 'auto_hfs_or_apfs' will check for HFS+ or APFS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix this formatting? You likely have a tab character instead of space or vise versa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Okay I think I may understand what's happening now - Chris is ultimately concerned about accidentally having a Fusion Drive set to APFS and would like to keep the the original drive format. If and when Apple fully supports fusion drives, startosinstall could upgrade to APFS automatically and this workflow could be left untouched. |
Whilst this PR looks fairly harmless, I'm not sure I see the need. I am formatting all disks back to JHFS+ and letting the installer decide what to do. |
@erikng No I'm not concerned about having it accidentally set, I wanted something that would just let startosinstall do its thing, cover any current supported configs, and not have to fully destroy all the partitions to get back to HFS+, since it seems as we have seen with the TouchBar MacBook Pros and I assume the coming iMac Pros will be more trouble than it's worth. @grahamgilbert I assume you are repartitioning since eraseVolume doesn't let you format an APFS volume back to HFS+? |
@chrisgrande Yes, all of our repurposed computers are encrypted, so we need to blow everything away. |
@grahamgilbert ahh, that makes sense - yea these are student labs I'm dealing with, thankfully no encryption, but a mix of Fusion and SSD machines. |
Please update the wiki with this new functionality. It will be in version 1.4.2. |
I just wanted to question the need to detect the existing volume's format, given that there is a diskutil verb called |
What does this PR do?
Setting the eraseVolume format key to "auto_hfs_or_apfs" the eraseVolume component will detect the format (HFS or APFS) of the volume and erase it using the same format.
The default if no format is specified is still JHFS+
What issues does this PR fix or reference?
Currently when moving to 10.13 in a lab environment with mixed machines (HD, SSD, Fusion) the volume format may be different and the would require different workflows to erase the volume correctly.
This change coupled with startosinstall APFS conversion also allows the same workflow to install 10.13 on a 10.12 machine and upgrade it to APFS and 10.13 to be fresh installed on an already APFS volume.