This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
dual_boot_with_encryption_ubuntu_linux_mint [2020/05/24 13:01] hankwang typo |
dual_boot_with_encryption_ubuntu_linux_mint [2020/12/05 19:50] (current) hankwang Updated for Mint 20 |
||
---|---|---|---|
Line 26: | Line 26: | ||
Create a physical volume. Dangerous! It will do this without asking for confirmation. Double-check the volume name before removing ''echo''. | Create a physical volume. Dangerous! It will do this without asking for confirmation. Double-check the volume name before removing ''echo''. | ||
echo pvcreate /dev/mapper/$pvname | echo pvcreate /dev/mapper/$pvname | ||
- | Now create the volumes: | + | Now create the volumes (adjust sizes to taste): |
vgcreate $vgname /dev/mapper/$pvname | vgcreate $vgname /dev/mapper/$pvname | ||
lvcreate -L 4G -n swap $vgname | lvcreate -L 4G -n swap $vgname | ||
Line 34: | Line 34: | ||
=====Install Linux===== | =====Install Linux===== | ||
- | Start the installer from the USB live image and select "something else". The logical volumes should be recognized; mark them correctly (mount points / for root and /home for home, format as ext4). The boot device should probably be the system FI partition rather than 'dm-1' (decrypted device). | + | Start the installer from the USB live image and select "something else". The logical volumes should be recognized. Mark the partitions and volumes: |
- | + | * boot partition: ext4, mount point ''/boot'', format | |
- | When the installation has finished, ***do not reboot yet***. | + | * root volume: ext4, mount point ''/'', format |
+ | * home volume: ext4, mount point ''/home'', format | ||
+ | As boot device: | ||
+ | * On Mint 19, select the system FI partition (not: 'dm-1' (decrypted device)). | ||
+ | * On Mint 20, select the storage device, e.g. ''/dev/nvm0n1'' or ''/dev/sda''. | ||
+ | When the installation has finished, **do not reboot yet**. | ||
=====Make your system bootable===== | =====Make your system bootable===== | ||
Line 44: | Line 49: | ||
cryptsetup luksOpen $crypt_part $pvname | cryptsetup luksOpen $crypt_part $pvname | ||
Check that it worked: | Check that it worked: | ||
- | blkid | + | blkid | grep ^/dev |
This should list something like this: | This should list something like this: | ||
/dev/mapper/decryp_pv: UUID="AQbmo-XVM3-CmEO-W9TL-QOLV-6XoP-XSaH56" TYPE="LVM2_member" | /dev/mapper/decryp_pv: UUID="AQbmo-XVM3-CmEO-W9TL-QOLV-6XoP-XSaH56" TYPE="LVM2_member" | ||
Line 78: | Line 83: | ||
# REMOVED: quiet splash | # REMOVED: quiet splash | ||
GRUB_CMDLINE_LINUX_DEFAULT="" | GRUB_CMDLINE_LINUX_DEFAULT="" | ||
- | GRUB_CMDLINE_LINUX="cryptopts=target=$pvname,source=/dev/disk/by-uuid/$uuid_part,lvm=$vgname" | + | # On the following line, the part after ,luks should match the options in /etc/crypttab. |
+ | GRUB_CMDLINE_LINUX="cryptopts=target=$pvname,source=/dev/disk/by-uuid/$uuid_part,luks,tries=10,discard" | ||
EOF | EOF | ||
echo "-- $fng --"; cat $fng; echo "---" | echo "-- $fng --"; cat $fng; echo "---" |