Comment 2 for bug 1514120

Revision history for this message
GizmoChicken (gizmochicken) wrote : Re: Encrypted Ubuntu on dual boot

I can confirm that this is a bug because, although encrypted Ubuntu can be installed alongside another OS in numerous ways to allow dual booting, none of the ways of doing so is even remotely straightforward. So I agree that that this should be fixed.

For those interested in attempting to accomplish this with Ubuntu 15.10 or Ubuntu 16.04, here are a few tips:

(1) First, BACKUP all your data before proceeding. Then, after verifying your backup, use a standalone copy of gparted to reformat your drive appropriately. What constitutes reformatting your drive "appropriately" will, of course, differ from situation to situation. If intending to dual boot Ubuntu with one of W7, W8 or W10, I suggest creating one Ext4 partition (which Windows doesn't recognize) at the end of your disk with sufficient free (non-formatted) space before it. (This Ext4 partition serves as a place holder and will be deleted later.) The amount of non-formatted space should equal the amount of space that you want to devote to W7, W8 or W10. Then install W7, W8 or W10 into that FREE SPACE. Once Windows is installed, reboot into the standalone copy of gparted. Your Windows installation should be in the first two or three partitions. Now delete the Ext4 partition (the place holder) that you created before installing Windows. In place of the place holder partition that you just deleted, create AT LEAST two new Ext4 partitions, the first (smaller) for boot and the second (larger) for root. (Note: Depending on whether your system uses UEFI or BIOS, and also depending whether you are using a GPT or MS-DOS partition table, you will either create these additional partitions as multiple primary partitions or as multiple logical partitions within a single extended partition.) That is, create the desired partitions before starting the Ubuntu installation. Although you could use less, I typically use 1 GB for the boot (smaller) partition.

(2) Boot into the Ubuntu installation media. During the Ubuntu install, select the "something else" option. Configure the installer to install boot (/boot) into the first (smaller) of the two Ext4 previously created. (I typically format it to EXT4, but many recommend using EXT2.) Using the "create physical volume for encryption" option, create a LUKS-encrypted volume on the second (larger) of the two Ext4 partitions previously created. Wait a bit (sometimes a minute or more), and "sda2_crypt" (or similar) will appear among the list of installable locations. Configure the installer to install root (/) into the "sda2_crypt" (or whatever) previously created. (I typically format this encrypted volume to EXT4.)

(3) At least as of now, do NOT attempt to install home or any other directories into separate partitions. Just stick to installing boot into the smaller partition and root into the larger partition. (You can have other partitions on your disk, but don't attempt to install anything into them.)

(4) Do NOT attempt to create a swap partition during installation. Instead, acknowledge the warning regarding the lack of swap space during installation and move on to the next step. (You can create a swap file within your encrypted volume once installation is complete. Or if you really want a swap partition, there are ways of creating them after installation, provided you left some space on your disk when creating partitions using gparted.)

NOTE: For those who want to install boot (/boot) into non-encrypted sda1, root (/) into LUKS-encrypted sda2, and home (/home) into into LUKS-encrypted sda3, please see my bug report at https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1523194