User Tools

Site Tools


dual_boot_with_encryption_ubuntu_linux_mint

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
dual_boot_with_encryption_ubuntu_linux_mint [2019/05/12 21:39]
hankwang ↷ Page name changed from dual_boot_with_encryption to dual_boot_with_encryption_ubuntu_linux_mint
dual_boot_with_encryption_ubuntu_linux_mint [2019/08/18 19:17] (current)
hankwang tweak commands to work in Mint 19.2
Line 25: Line 25:
   echo pvcreate /​dev/​mapper/​$pvname   echo pvcreate /​dev/​mapper/​$pvname
 Now create the volumes: Now create the volumes:
-  vgcreate $vgname $pvname+  vgcreate $vgname ​/​dev/​mapper/​$pvname
   lvcreate -L 4G -n swap $vgname   lvcreate -L 4G -n swap $vgname
   lvcreate -L 24G -n root $vgname   lvcreate -L 24G -n root $vgname
-  lvcreate -100%FREE -n home $vgname+  lvcreate -100%FREE -n home $vgname
 Set the swap size to such that the sum of swap space and internal memory is at least 12 GB. (See also [[https://​askubuntu.com/​questions/​49109/​i-have-16gb-ram-do-i-need-32gb-swap|AskUbuntu:​ How much swap]].) If you want to be able to hibernate your laptop, you need the swap space to be at least the size of your internal memory, but since Ubuntu/Mint don't support hibernation out of the box, you will need other tweaking as well. A separate partion for /home is not strictly necessary, but it will allow you to reinstall Linux without a lengthy restore process. ​ Set the swap size to such that the sum of swap space and internal memory is at least 12 GB. (See also [[https://​askubuntu.com/​questions/​49109/​i-have-16gb-ram-do-i-need-32gb-swap|AskUbuntu:​ How much swap]].) If you want to be able to hibernate your laptop, you need the swap space to be at least the size of your internal memory, but since Ubuntu/Mint don't support hibernation out of the box, you will need other tweaking as well. A separate partion for /home is not strictly necessary, but it will allow you to reinstall Linux without a lengthy restore process. ​
 +
 =====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).+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).
   ​   ​
 When the installation has finished, *do not reboot yet*.  When the installation has finished, *do not reboot yet*. 
Line 38: Line 39:
 Continue in the root shell that you opened before. If you accidentally close it, you need to set the variables ''​pvname'',​ ''​vgname'',​ ''​boot_part'',​ and ''​crypt_part''​ again. ​ You can also boot again from the live image and start a new shell again. Continue in the root shell that you opened before. If you accidentally close it, you need to set the variables ''​pvname'',​ ''​vgname'',​ ''​boot_part'',​ and ''​crypt_part''​ again. ​ You can also boot again from the live image and start a new shell again.
  
-First, re-open the encrypted volume:+First, re-open the encrypted volume ​(necessary after a reboot):
   cryptsetup luksOpen $crypt_part $pvname   cryptsetup luksOpen $crypt_part $pvname
 Check that it worked: Check that it worked:
Line 90: Line 91:
   umount /t/dev   umount /t/dev
   umount /t   umount /t
 +  swapoff -a
   vgchange -a n /​dev/​mapper/​$vgname   vgchange -a n /​dev/​mapper/​$vgname
   cryptsetup close /​dev/​mapper/​$pvname   cryptsetup close /​dev/​mapper/​$pvname
 Now you can reboot. If you were asked during the installation process to disable secure boot for driver installation,​ you'll get a "​MOK"​ screen for this reboot only. Now you can reboot. If you were asked during the installation process to disable secure boot for driver installation,​ you'll get a "​MOK"​ screen for this reboot only.
dual_boot_with_encryption_ubuntu_linux_mint.txt · Last modified: 2019/08/18 19:17 by hankwang