I configured my MacbookPro (Retina) as follows:
/dev/disk0 (GUID partition scheme) EFI 200 MiB Apple CoreStorage 128 GiB <- FileVault 2 encrypted Apple Boot 650 MiB <- Recovery partition ... Linux Swap 16 GiB Linux (Ext4) the rest of the drive <- Ubuntu 14.04 '/' (root)
I usually boot it into Ubuntu GNU/Linux, so I need to re-bless GRUB2 (
/boot/efi/EFI/ubuntu/grubx64.efi?) every time I perform any OS/X update.
My mac is rather short of disk space:
$ sudo du -chxd 1 / 208K /.DocumentRevisions-V100 2.9M /.fseventsd ... 41G /Users 605M /usr 14K /Volumes 63G / 63G total
The command above should include Time Machine's local backup files (
/.MobileBackups), Document Revisions, Spotlight indexes, swaps, temporary folders and so on. (I disabled Time Machine some months ago because I keep backups without it.)
I periodically run Disk Utility's "verify filesystem" command.
$ sudo df -h / Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 127Gi 103Gi 24Gi 82% 26987006 6291264 81% /
(Interestingly, every file accessible as root (
du -chxd 1 / -> 63 GiB) does not sum up to 103 GiB in
df -h /. Around 40 GiB is missing. "Non-files" I can't manage are eating precious disk space?)
Anyway, I could not find enough space on the internal SSD drive.
So, it came to me the idea of moving OS/X boot partition (with Recovery HD) back and forth among internal and external drives (while keeping both boot capability and encryption) according to the need.
To move it safely, I first need to be able to make (bootable) copies of my OS/X boot partition (with Recovery HD) (and if it is successful, maybe delete the original).
The question is:
How to make a copy of my FileVault-2-encrypted OS/X boot partition (with Recovery HD)
- The copy must be bootable.
- The copy must not rely on any other drives to boot.
- If I copy my OS/X boot partition to an external drive and delete the original, my Ubuntu installation must boot normally as the default boot option without strange error messages or going to "Network Recovery" (as OS/X is not found).
- If I plug in an external drive with an encrypted OS/X boot partition and
Recovery HDinside, I must be able to boot into it with an
- If I boot the copy, it must present a normal "EFI" Login Window to select a user and enter my password to unlock it and login.