Setup of Debian 9 on a Lenovo Thinkpad 470

Preparation

Grab a copy of the current Netinstall ISO, at the time of writing it can be found at https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.2.1-amd64-netinst.iso

Image an empty CD or USB stick with that ISO - how to do that depends on your current operating system and is out of scope for this guide.

Enter the EFI of the the notebook and make sure that Secure Boot under the Security Tab is set to Disabled .

Insert your created boot medium and reboot.

Booting the Installer

In the Debian GNU/Linux installer boot menu select Install.

Select your native Language, Country and Keyboard layout in the next dialogues.

Make sure your network cable is connected to the notebook before confiriming the Keyboard selection, as the Installer will try to auto-detect the network in the next step. When you are asked to load the non-free firmware from an external disk, select No, and select the wired network connection (enp…) as primary interface.

Now enter the hostname for your new laptop, and your domain name in the next dialogue. If you have a local network, set your domain name to local or another name that identifies your network.

Now leave the fields for the root password blank twice. This tells the Installer to disable the root login, and your User that will be created afterwards will be granted sudo-rights.

Enter your Full Name (not username), and on the next page your desired username. Provide a secure password twice.

Partitioning the disk

Select the first option to use the guided partitioning, and select the third option to use the whole disk with encrypted LVM. Now select your internal drive from the list. If you have booted from USB, the installer medium will also show up, so be careful to select the right disk.

Now select the fourth option, to create separate /home, /var and /tmp partitions. Select Yes to setup LVM and enter your encryption master password. The longer the password, the safer.

On the next screen you see the to be created partitions. Select the /boot partition and change the Filesystem type to ext4. Select the last option in the overview to apply the changes.

Software selection

You are prompted to add another CD/DVD, select no. Now choose the nearest mirror, it should be preselected with a sane default, so just choose this. You are prompted to partake in the package usage survey, this will send statistics about the packages you install from the official repositories to the debian maintainers.

You are now prompted to install package groups. Select the Debian desktop environment, GNOME, Cinnamon, Printserver, SSH server and Standard System Tools groups.

During the installation of the selected packages, you might get prompted about the default paper size and the PAM-Profiles to be activated. For the pam profiles it is safe to select all of them. Do not enable setuid for manpages, the notebook is fast enough to do that live.

If you are asked which display manager to use by default, choose gdm3.

Finishing the setup

Choose yes to install the GRUB boot manager onto the boot disk, and select the SSD on the next page.

Post-Setup

Login to your new machine, and edit the file /etc/apt/sources.list`to contain `contrib non-free`after each occurence of`main:

deb http://deb.debian.org/debian/ stretch main contrib non-free
# repeat for every line

Enable the backports repository by adding the following to the new file /etc/apt/sources.list.d/backports.list:

deb http://ftp.debian.org/debian stretch-backports main contrib

Update the package repositories and install the wifi firmware as well as virtualbox:

apt update
apt install firmware-iwlwifi virtualbox

Now reboot to make sure the virtualbox modules and wifi firmware are loaded on boot.