Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== dualboot ubuntu and windows with encrypted ubuntu partition ====== [[https://www.mikekasberg.com/blog/2020/04/08/dual-boot-ubuntu-and-windows-with-encryption.html]] {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-153631.png}} {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-153741.png}} {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-153851.png}} {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-154000.png}} cryptsetup luksFormat --type=luks1 /dev/nvme0n1p6 cryptsetup open /dev/nvme0n1p6 crypt pvcreate /dev/mapper/crypt vgcreate ubuntu-vg /dev/mapper/crypt lvcreate -L 8G -n swap ubuntu-vg lvcreate -l 100%FREE -n root ubuntu-vg {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-154550.png}} {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-172014.png}} {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-172049.png}} {{dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition:pasted_20210401-172335.png}} next, click on "Install Now" to proceed with the installation.. from now on just do whatever you do to install ubuntu, but when you are done, don't reboot yet, click on "Continue Testing" open a terminal mount /dev/ubuntu-vg/root /mnt mount PARTLABEL=boot /mnt/boot/ for i in dev proc sys etc/resolv.conf; do mount -o bind /$i /mnt/$i; done chroot /mnt blkid /dev/nvme0n1p6 nano /etc/crypttab # <target name> <source device> <key file> <options> # options used: # luks - specifies that this is a LUKS encrypted device # tries=0 - allows to re-enter password unlimited number of times # discard - allows SSD TRIM command, WARNING: potential security risk (more: "man crypttab") # loud - display all warnings crypt UUID="879761ba-42bc-455a-9126-fd21fa386f07" none luks,discard update-initramfs -k all -c exit reboot dualboot_ubuntu_and_windows_with_encrypted_ubuntu_partition.txt Last modified: 01.04.2021 17:36by Pascal Suter