For the tl;dr, skip to the bottom.
I have a dual-boot setup with Mac OS X at the beginning of my drive and three GNU/Linux partitions at the end of the drive. I don't have the relevant machine on hand to give an
fdisk dump, but here's a rough overview of the original disk layout:
/dev/sda1: EFI System Partition /dev/sda2: Macintosh HD (main OS X partition) /dev/sda3: Recovery HD (part of OS X's recovery system) /dev/sda4: / /dev/sda5: /home inside a LUKS container /dev/sda6: swapspace inside a LUKS container
I'm reinstalling GNU/Linux on this system and as a part of that, I want to make
/ encrypted. However, that requires a separate
/boot. In order to create that partition, I resized Macintosh HD and moved Recovery HD back to the end of Macintosh HD. I also took the opportunity to make my
/ larger. So the end result is a disk that looks like this:
/dev/sda1: EFI System Partition /dev/sda2: Macintosh HD (main OS X partition) (smaller than before) /dev/sda3: Recovery HD (part of OS X's recovery system) /dev/sda4: /boot /dev/sda5: / (larger than before, and now inside a LUKS container) /dev/sda6: /home inside a LUKS container /dev/sda7: swapspace inside a LUKS container
tl;dr: Here's the problem: due to the order in which I configured things, I now have a
cryptsetup-created LUKS container in the middle of
/dev/sda5. Because it's in the middle, nothing can find it to unlock/mount/recover it. How can I move my cryptcontainer to the beginning of the partition? Probably this involves two distinct steps (actually finding the thing on disk, then using that information to move it), but I'm not sure. Googling's turned up nothing.