First of all, some related questions:
- How to move from one drive to another that's a different size?
- What utility can move my Windows boot partition over to another hard drive?
My situation is as follows:
- Create a virtual machine (VBox) to install Linux (Debian testing, 3.14 kernel).
- One BTRFS boot partition, one LUKS BTRFS root partition.
- Make IO intensive modifications in the VM for speed.
- Transfer the installation to an USB flash drive.
My initial attempt was to use a harddisk in the VM of the same size as the flash drive and just
dd the whole thing. For some reason, the boot partition's UUID cannot be retrieved and therefore used for booting on the flash drive.
If I partition the flash drive manually with a boot partition of EXT4 and a root partition of LUKS BTRFS, the UUID retrieval works fine all around. I then used
rsync -aEXS --progress to transfer the files from each mounted partition (VM image -> flash drive). I
chroot-ed into the flash drive and ran
grub-install on the flash drive device, along with
update-grub to update the filesystem UUIDs. This did not work. It was not able to correctly detect/use the encrypted partition to get root. I tried
update-initramfs -u without success.
What did I miss or could have done better to perform this scenario?