Kamil Gierach-Pacanek
CyberEthical.Me: Hacking for the Security Awareness

CyberEthical.Me: Hacking for the Security Awareness

How to dual boot encrypted Kali Linux with Windows 11

How to dual boot encrypted Kali Linux with Windows 11

Partitioning when dual-booting Linux with Windows

Kamil Gierach-Pacanek
ยทSep 19, 2022ยท

4 min read

Subscribe to my newsletter and never miss my upcoming articles

Table of contents

  • Prerequisites
  • Preparation
  • Create non-encrypted boot partition
  • Prepare encrypted filesystem partition
  • Configuring LVM
  • Configuring mount points
  • After reboot
  • Additional readings

Prerequisites

  • Windows 11 already installed and running
  • Free space on drive where we are going to install the Kali Linux
  • Bootable USB drive with Kali Linux

Preparation

Follow the Kali installation as usual until you encounter the partitioning step - choose "Manual partitioning". This screen is the main one we are going to come back to after each of partitioning operation. I'll be using the highlighted free space to setup the Linux partitions. image.png

Create non-encrypted boot partition

  1. Double click the free space (or click Continue with Free space selected).
  2. Select New partition. Set it to 1.8GB. image.png
  3. Create at the beginning of free space.
  4. Set the values as shown below. image.png
  5. Confirm setting up partition.
  6. Rest of the free space assign ext4 - it will be the filesystem encrypted partition. image.png

โ— When writing a guide, I've tried different solutions for placing the boot partition. Now I know it should be set as ext4, /boot mount point, not bootable and not encrypted. I've tried to change the images to correct ones, but I could omit a few. Please just remember ext4, not bootable.

Prepare encrypted filesystem partition

  1. Select Configure encrypted volumes image.png
  2. Please notice that this step cannot be undone. After you confirm, boot and filesystem (which we are going to encrypt) will be formatted. Select Yes and Continue. image.png
  3. Confirm creating encrypted volumes
  4. Select the filesystem partition (which was left after we created boot in the first phase). image.png
  5. Remove the / mount point (select it and choose Do not mount) and confirm default encryption settings. image.png
  6. Select Finish
  7. Confirm erasing the partition before encryption.
  8. Type the encryption password.
  9. After process finished you should end up with the similar setup. image.png
  10. Choose Configure the Local Volume Manager. Confirm. image.png

Configuring LVM

You are welcomed with the following screen. image.png

  1. Create new volume group "kali-vg1" and use the whole filesystem partition. image.png
  2. Create logical volumes called swap, root, var, tmp and home. image.png

    โ„น Only swap and root are required. I'm using separate var and tmp mainly because of security reasons, separate home allow me to mount that in other distribution.

  3. This is how it looks on my example. image.png

    โ„น Please take these volume sizes with a grain of salt, I'm using small volumes to save on space when writing this guide (it doesn't matter for showcasing this idea).

  4. Select Finish and Continue.

Configuring mount points

image.png

Now it is time to final step: assigning mount points to freshly created logical volumes.

  1. Highlight the swap volume and click Continue (or double click). image.png
  2. Select Use as and choose swap. Confirm. image.png
  3. Highlight the root volume and click Continue. Fill details as shown below. image.png
  4. Do the same for other logical volumes.
  5. This is how it looks afterwards: image.png
  6. Select "Finish partitioning and write changes to disk" image.png
  7. Confirm. Continue with the installation.

After reboot

With the setup I provided there is one more step - optional - without it, your machine will boot up automatically to Windows. You can still boot the Kali by interrupting the booting process (F2 on my Acer) and selecting the kali from boot manager.

โ„น If you want to be more stealthy with your Kali, so it is a bit harder to determine you are using it, it is perfectly fine to stop here.

Launch Kali either by

  • interrupting the booting process and selecting Kali from boot manager,
  • or restarting Windows with Shift key pressed when choosing Restart option from power menu; then select proper device to boot up Kali

Open console and type

sudo su
nano /etc/default/grub

Add the following line: image.png

Save the file and run update-grub command image.png

That's it! Now you can select both Windows and Kali on launch. You successfully achieved dual boot with Windows 11 and Kali on encrypted volume! image.png

Additional readings

Did you find this article valuable?

Support Kamil Gierach-Pacanek by becoming a sponsor. Any amount is appreciated!

See recent sponsors |ย Learn more about Hashnode Sponsors
ย 
Share this