No, sorry chickpee, I believe you're incorrect.
Is an encrypted Time Machine disk really just the same as a normal
disk, full-disk-encrypted using FileVault?
Yes. It is. This would be "FileVault 2" we are talking about, aka CoreStorage, Apple's newish logical volume manager. This is different that the previous TM and FileVault technologies, which are based on AES-encrypted sparse-bundle disk images (which are still used for network backups, etc.). The process that starts in System Preferences (these days) when you enable disk encryption (whether on an external disk, for Time Machine, or on the boot drive for FileVault), provided the disk is suitable, it does an online conversion from a traditional GPT Partition Table to a single monolithic data store, with a very small partition for the CS firmware. Logical volumes (in logical volume groups) are then carved out of this, and these (software) volumes are then HFS formatted and encrypted.
I believe the most straightforward method for doing this would be to:
- Attach the disk you're going to use, wipe it. Free space or a single HFS+ partition.
diskutil cs create/convert
(wasn't/was formatted; unimportant) to initialize and add a new LVG
diskutil cs createVolume
, create a single LV. You could enable encryption at this point, with diskutil cs encryptVolume
, if you know the passphrase you're going to use;
if not, leave it unencrypted for now.
diskutil partitionDisk diskX
-- see below -- CS volumes appear as if they are completely autonomous, separate disks, so you partitionDisk.
Then: mount and unlock the volume on your new user's machine. Once the disk is unlocked, there shouldn't be any trouble 'adopting' it for use there. If you want to put it into a config script, I believe it's just something like tmutil -a /Volumes/Foo
, tmutil startbackup -ad disk...
. This is the part I'm least sure about, but I'm also sure its easily doable. I haven't done this for Time Machine per se my self, but I pre-encrypt disks for FileVault like this all the time, and the OS sort of just knows what to do with if after that.
A properly suitable CS-enabled-disk is going to appear like this in diskutil (although you might not have the third partition on disk0 if it's knows it's not going to be a boot drive:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 250.1 GB disk0s2
3: Apple_Boot Boot OS X 250.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh LV *249.8 GB disk1
disk0 will not appear as encrypted, ever, since this is what the volume manager basically has to 'boot' off of. disk1 will be encrypted and will require the passcode to mount.
fdesetup
is the tool to encrypt a volume and once that's done,tmutil setdestination
would let you set a mounted drive as the destination for time machine.tmutil inheritbackup [machine_directory | sparsebundle]
, which you have created in advance - maybe encrypted withhdiutil -encryption [AES-128|AES-256]
sudo diskutil cs list
shows that the volume is now encrypted,sudo fdesetup status
tells me FileVault is off.