Unable to prevent APFS partition from mounting automatically in Mojave (10.14.5)
I'm trying to prevent macOS from asking me the FileVault password for 2 APFS partitions on boot. I don't want them to be mounted at all.
APFS container:
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +121.1 GB disk1
Physical Store disk0s2
1: APFS Volume macOS 43.2 GB disk1s1
2: APFS Volume Preboot 121.3 MB disk1s2
3: APFS Volume Recovery 1.0 GB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
5: APFS Volume Shared 7.7 GB disk1s5
6: APFS Volume macOS Beta - Data 21.7 GB disk1s6
7: APFS Volume macOS Beta 10.0 GB disk1s7
Partition 1:
Device Identifier: disk1s6
Device Node: /dev/disk1s6
Whole: No
Part of Whole: disk1
Volume Name: macOS Beta - Data
Mounted: No
Partition Type: 41504653-0000-11AA-AA11-00306543ECAC
File System Personality: APFS
Type (Bundle): apfs
Name (User Visible): APFS
Owners: Disabled
OS Can Be Installed: No
Booter Disk: disk1s2
Recovery Disk: disk1s3
Media Type: Generic
Protocol: PCI
SMART Status: Verified
Volume UUID: C6C28412-1505-4F19-8056-369FAE57B0CF
Disk / Partition UUID: C6C28412-1505-4F19-8056-369FAE57B0CF
Disk Size: 121.1 GB (121123069952 Bytes) (exactly 236568496 512-Byte-Units)
Device Block Size: 4096 Bytes
Volume Total Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Volume Free Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Read-Only Media: No
Read-Only Volume: Not applicable (not mounted)
Device Location: Internal
Removable Media: Fixed
Solid State: Yes
Hardware AES Support: No
Partition 2:
Device Identifier: disk1s7
Device Node: /dev/disk1s7
Whole: No
Part of Whole: disk1
Volume Name: macOS Beta
Mounted: No
Partition Type: 41504653-0000-11AA-AA11-00306543ECAC
File System Personality: APFS
Type (Bundle): apfs
Name (User Visible): APFS
Owners: Disabled
OS Can Be Installed: No
Booter Disk: disk1s2
Recovery Disk: disk1s3
Media Type: Generic
Protocol: PCI
SMART Status: Verified
Volume UUID: 55930D94-2CF3-481B-B845-FEAB3C492F23
Disk / Partition UUID: 55930D94-2CF3-481B-B845-FEAB3C492F23
Disk Size: 121.1 GB (121123069952 Bytes) (exactly 236568496 512-Byte-Units)
Device Block Size: 4096 Bytes
Volume Total Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Volume Free Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Read-Only Media: No
Read-Only Volume: Not applicable (not mounted)
Device Location: Internal
Removable Media: Fixed
Solid State: Yes
Hardware AES Support: No
Current /etc/fstab
which doesn't work:
UUID=55930D94-2CF3-481B-B845-FEAB3C492F23 none apfs rw,noauto
UUID=C6C28412-1505-4F19-8056-369FAE57B0CF none apfs rw,noauto
What am I doing wrong? Is it because of a mistake I made or is /etc/fstab
no longer supported? What's /etc/fstab.hd
for?
Operating System: macOS Mojave 10.14.5
Hardware: MacBook Air (13-inch, Early 2015)
Solution 1:
"Educated" guess:
In your case FileVault unlocking is managed by the preboot APFS volume (disk1s2).
Your specific APFS container configuration implies that preboot manages booting to macOS 10.14.5 as well as macOS 10.15 beta.
At this boot stage disk1s1's /etc/fstab is probably not yet involved and thus entries won't work.
If you really want to disable disk1s6/disk1s7, you probably have to rename one of the two folders with UUID names (one for macOS 10.14.5 and the other for macOS 10.15 beta) in preboot. The folder names correspond with the APFS boot volume UUIDs you get with diskutil ap list
.
You have to rename the one which is identical with the UUID of macOS 10.15 beta's boot volume.
Not tested - absolutely not recommended!
BTW: I tried to find some kernel flag to add to /Volumes/Preboot/[UUID]/Library/Preferences/SystemConfiguration/com.apple.Boot.plist to prevent FV unlocking but failed.