Index ¦ Archives ¦ Atom

Setting Up Full Disk Encryption on Debian 9 Stretch

Previously I did a tutorial on Installing Debian 8 Jessie with full disk encryption, in that tutorial I went into a lot of detail about manually partitioning the disks. If for some reason you want to manually partition your disks I would reccomend that tutorial, it will still work for Debian 9 Stretch.

However this tutorial is much more simplified I've used the grapical installer and gone with "Guided - use entire disk and set up encrypted LVM".

As I've mentioned in all my tutorials on Full Disk Encryption I say "Full" disk encryption but that's not entirely correct there is still a small partition /boot that's unencrypted. That contains your kernel, grub config and initrd and needs to be unencrypted so we can start booting and decrypt the rest of the OS.

So let's get started

Installing

Boot up your CD, USB flash drive, ISO file or install media of choice and select Graphical install.

CD Boot

Select your language.

Select a language

Select your location.

Select a location

Set your keyboard layout.

Configure the Keyboard

Pick a name for your computer.

Configure the network

Set your local domain.

Configure the network

I personally leave the root password blank, this disables the root account and instead sets you up with a first user that can run sudo to become root.

set up users and passwords

Enter your full name.

set up users and passwords

Pick your username (the default is usually pretty good).

set up users and passwords

Set your password.

set up users and passwords

Set your timezone.

Configure the clock

The encryption

This is where the magic happens, actually it's quite simple, we are going to pick "Guided - use entire disk and set up encrypted LVM" and then just go with the defaults. As I said before if for some reason you want to manually partition your disks I would reccomend a previous tutorial.

Partition disks

Select the volume to install Debian. (This will wipe whatever you have on that disk!!)

Partition disks

Pick "All files in one partition (recommended for new users)".

Partition disks

Pick 'Yes' to write the changes to the disks.

Partition disks

Now the disk will be writen with random data, this is to prevent analysis of the disk. This step can be skipped by pressing cancle but it's highly reccomend you wait it out. It could take several minutes to a few hours so now is an absolutely smashing time to go and have a cup of tea.

Partition disks

Now set a passphrase for your disk.

Partition disks

Select "Finish partitioning and write changes to disk"

Partition disks

Pick 'Yes' to write the changes to the disks.

Partition disks

Continue the installation

Now we continue the installation as per normal.

Pick 'No' for any extra CDs.

configure the package manager

Pick your country to find a local mirror .

configure the package manager

And pick your mirror of choice, often (at least in Australia) you will find your local ISP has a mirror and this will likely be fastest for you.

configure the package manager

Enter any proxy information (most times this will be blank)

configure the package manager

You are given the option to opt-in to Debian's statistics collection.

Configure the popularity contest

Pick your software, I've gone with KDE as my desktop of choice but it's a matter of personal taste.

Debian Software Selection

Install GRUB

Install the grub boot loader on a hard disk

Pick your boot disk.

Install the grub boot loader on a hard disk

and finish the installation.

Finish the installation

Boot your system

Now when you boot up you should presented with a prompt asking for the key to decrypt sda5_crypt (your encrypted volumne)

Enter your passphrase (Note: you won't see characters as you type)

Finish the installation

Now you can log in and enjoy your new Debian system

Finish the installation

Finish the installation

Creative Commons License
Content on this site is licensed under a Creative Commons Attribution 4.0 International License.
Built using Pelican. Based on a theme by Giulio Fidente on github.