Installing testing on a laptop

An example installation of Debian testing on a laptop

Author: Francesco Poli
Contact: invernomuto@paranoici.org
Version: 0.15
Copyright: Expat license
Notice:

Copyright (c) 2007-2026 Francesco Poli

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About this document
Web form HyperText Markup Language
Source form reStructuredText
Web stylesheet Cascading StyleSheets
Build directives Makefile

Contents

Testing on a laptop step by step

The purpose of this document is showing an example installation of Debian testing on a laptop.

Please note that this is just a step by step description of the installation process for a particular case. It is not meant to replace or substitute the official Debian installation guide: you can find the Debian stable installation guide and the Debian testing installation guide online.

Hardware

For the record, the machine under consideration is a Star Labs StarLite shipped with 1 TB of storage, a US layout StarLite Magnetic Keyboard, and no pre-installed operating system. Other accessories include a Logitech M115 optical wheel USB mouse and a NOVOO USB C Hub 7-in-1 Dock.

The numeric output of lspci on this box is:

$ lspci -n
00:00.0 0600: 8086:4617
00:02.0 0300: 8086:46d3
00:0a.0 1180: 8086:467d (rev 01)
00:14.0 0c03: 8086:54ed
00:14.2 0500: 8086:54ef
00:14.3 0280: 8086:54f0
00:15.0 0c80: 8086:54e8
00:15.2 0c80: 8086:54ea
00:1d.0 0604: 8086:54b0
00:1e.0 0780: 8086:54a8
00:1f.0 0601: 8086:5481
00:1f.3 0401: 8086:54c8
00:1f.4 0c05: 8086:54a3
00:1f.5 0c80: 8086:54a4
01:00.0 0108: 10ec:5765 (rev 01)

Preparation

The hardware architecture of the box is AMD64 (EM64T). Since the goal is installing a 64 bit system, an amd64 installation medium is needed. The following testing netinst installation ISO hybrid image (with debian-installer based on the latest unstable port for the amd64 architecture) is chosen:

$ wget \
https://cdimage.debian.org/cdimage/daily-builds/daily/current/amd64/iso-cd/debian-testing-amd64-netinst.iso

Insert a USB flash memory stick into a USB port and check which device name it was assigned (by looking at recently created /dev/sd* files or by reading log messages in /var/log/syslog or with dmesg). You can now write the image to the USB stick:

# dd if=debian-testing-amd64-netinst.iso of=/dev/sdd bs=16M \
     status=progress oflag=sync

Other available images are linked from the Debian Installer page.

Installation

Power on the laptop and press [Down] to enter coreboot setup. Select language "Standard English".

In the Advanced Configuration section, Secure Boot Configuration subsection, enable "Attempt Secure Boot", choose Secure Boot Mode "Standard Mode"; in the Platform Setup Menu subsection, enable "Bluetooth Runtime-D3", choose Memory Speed "6400MT/s", choose Power Profile "Balanced", disable "Intel Management Engine", disable "Modern Standby (S0ix)", enable "VT-d", choose Maximum Charge Level "100%", choose Charging Speed "0.5C", choose Power LED Brightness "Normal", disable "Power on after failure", enable "Accelerometer", enable "Card Reader", enable "Display: Use Native Resolution", disable "Gaussian & Neural Accelerator", choose Lid Switch "Normal", enable "Microphone", enable "Touchscreen", enable "Webcam", enable "Wireless", enable "PCIe Clock Power Management", choose PCIe PCH RP ASPM "Auto", choose PCIe L1 Substates "L1.2", choose Console Log Level "Debug".

In the Boot Manager section set to boot from the USB flash memory stick (already inserted) and boot. Check that the UEFI variant of d-i is being run. Select "Install" and press [Enter] at the boot prompt in order to start the installation process.

First questions

The very first thing you are asked to select is the language you want to use for the installation process (which will subsequently be set as default language for the installed system): choose English, if you share my preferences. After that, you have to choose your country, so that the correct timezone will be set: select other, then Europe, and Italy (or otherwise, if you live elsewhere...). On next screen, choose the locale: select "en_US.UTF-8". Then choose the keymap to use: select "American English", since the chosen keyboard has a US layout.

At that point the installer warns that multiple network interfaces were found in the system and asks the user to choose the primary interface. One is an unknown Ethernet interface and the other one is the Intel Corporation CNVi Wi-Fi (wireless): choose the Ethernet one as primary interface. The installer then proceeds to configure the network through DHCP. If you have a DHCP server on your LAN (as in my case), it succeeds and no further configuration is needed.

Now, use your creativity and choose a hostname for your box! You have to enter one in the next screen. Hereinafter, I'll refer to the chosen hostname as $HOSTNAME. Then, you have to enter the domain name: leave the field blank, if you have no established domain name for your LAN.

Time to set the root password: try and think a good one! You can create a regular user as well: enter your full name, a username, and a password.

Wait for the time server synchronization.

Partitioning the disk

The goal is setting up a (hopefully) good partitioning layout for a laptop usage, with disk encryption for security reasons. When asked, choose the manual partitioning method.

Next screen displays the current disk partition table. The screen also displays the partition table for the USB stick, but we are not going to touch that, so let's ignore it.

Select any partition and choose "Delete the partition" from the dialog screen. Now the screen displays the following updated status:

/dev/nvme0n1 - 1.0 TB NVMe-1TB SSD
         1.0 TB      FREE SPACE

The procedure to create new partitions is: select the free space line and choose "Create a new partition" from the dialog screen; enter the partition desired size; create the partition at the beginning of the available space, use as ESP (EFI System Partition), /boot, or physical vol for encryption (depending on which partition you are creating) and set the bootable flag to "on" (for ESP) or "off" (for the other partitions); choose "Done setting up the partition".

Use the above-explained procedure to create:

partition entered size
ESP with boot flag "540 MB"
/boot (ext4)
"560 MB"
physical vol for enc max

The options for encryption (dm-crypt) are:

option value
encryption aes
key size 256
IV algorithm xts-plain64
encryption key Passphrase
erase data yes
bootable flag off

Back to the partition table screen: choose "Configure encrypted volumes"; you'll be asked to confirm that changes should be written: answer "Yes". The next screen allows you to configure the encrypted volumes: choose "Create encrypted volumes", check /dev/nvme0n1p3   (1023109MB; crypto) and choose "Continue" and then "Finish". You'll be asked to confirm that you really want to erase data on /dev/nvme0n1p3: answer "Yes".

Enter a passphrase (before entering the passphrase, switch to the second virtual console and check the keyboard mapping is as expected).

After returning to the main partitioning menu, encrypted volumes will be visible as additional partitions which can be configured just as ordinary partitions.

Select the encrypted volume and use it as "physical volume for LVM". After choosing "Done setting up the partition", you get back to the partition table.

Choose "Configure the Logical Volume Manager"; you'll be asked to confirm that changes should be written: answer "Yes". The next screen allows you to configure the LVM: choose "Create volume group" and enter a suitable two- or three-letter abbreviation of $HOSTNAME (let's call it $HOSTABBR) as volume group name. Select the big partition for the new volume group. Back to the LVM configuration menu: choose "Create logical volume" and select the only possible volume group. Enter logical volume names and sizes according to the following table:

LV name entered size
swap "18 GB"
root "150 GB"
var "30 GB"
home accept proposed size (about "825 GB")

Choose "Finish" from the LVM configuration menu. You get back to the partition table screen, where you can select the LVs (the #1 SIZE lines) and set filesystems and mount point according to the following table:

LV name filesystem mount point
swap (swap) (swap)
root ext4 /
var ext4 /var
home ext4 /home

Choose "Finish partitioning and write changes to disk"; you'll be asked to confirm that changes should be written: answer "Yes". The desired filesystems are created and the swap area is prepared.

Finishing the installation

At this point, you just have to wait for the base system to be installed.

Afterwards, you'll be asked to choose a Debian network mirror: select a mirror near you (for instance, choose Italy, deb.debian.org). You also have to specify an HTTP proxy, if you use one; if instead you do not use any HTTP proxy on your LAN (as in my case), then leave the proxy field blank.

Then you'll be asked whether you want to contribute to popcon: answer "Yes", if you care about Debian. The next screen allows you to select groups of packages: since the goal here is installing the base system only, deselect everything and choose "Continue".

The installation is complete: remove the USB stick and choose "Continue" to reboot the system!

Configuring the boot process

If the efibootmgr command is not available, install the corresponding package:

# apt update && apt install efibootmgr

This tool is useful to display and configure the boot order.

You may check whether the system has SecureBoot enabled or disabled by issueing the following command:

# mokutil --sb-state

Conclusions

Now the system is installed and ready to run: you can boot it and log in as root or as the previously created regular user. But very little can be done with the base system only: next step is tweaking the system so that it can become a little more user friendly. You may do that (and more) in a way similar to the workstation/desktop setup: follow the steps documented in

  • Preliminary configuration (HTML, reST), but set Generic 86-key PC" as keyboard model, "English (US)" as keyboard layout, and "Right Alt (AltGr)" as compose key (see console fonts subsection)
  • Initial configuration (HTML, reST), but set 'powersave' as cpupower governor (see CPU clock frequency and voltage scaling section)
  • Console configuration (HTML, reST), but do not load the unneeded nct6775 kernel module (see utilities section)
  • Desktop environment configuration (HTML, reST), but set Xft.dpi to 144 in ~/.Xresources, remembering that the screen resolution for our laptop should be 2160x1440 with a 24 bit color depth, set the xfce4-panel row size to 45 pixels, and remember that conky configuration should be adapted to a laptop (see below for a reference to a document where laptop-specific tweaks are described), and that the subsection on software RAID monitoring should be skipped; finally set compose:ralt among the options passed to setxkbmap (see multilingual text input for X section)
  • Network tools configuration (HTML, reST)

After this, you can tweak some laptop-specific things. More details in a separate document (HTML, reST).

And then you can go on following the steps documented in

  • E-mail configuration (HTML, reST)
  • Web browsers configuration (HTML, reST)
  • Backup configuration (HTML, reST), but you may skip the user data backup section (since user data should be copied from/to desktop machines), and you may also skip the writing CDs/DVDs section (since our example laptop has no DVD drive)
  • Audio software configuration (HTML, reST), but set the soundcard volume levels according to the table at the end of this document, and add the --outchannels 2 option to the jackd invocation to make audio output work for both internal speakers and audio jack on the same two playback channels (system:playback_1 and system:playback_2), rather than on four distinct ones (see the sound server section), and skip the audio CD encoder section (since our example laptop has no CD reader), and skip the configuration for the external USB sound card (which will not be kept connected to the laptop)
  • Image and video software configuration (HTML, reST)
  • Document system configuration (HTML, reST)

Soundcard volume levels

Item Mute Value Left Right
Master OO 94 N/A N/A
Headphone OO N/A 49 49
Speaker OO N/A 100 100
Bass Speaker 00 N/A N/A N/A
PCM N/A N/A 100 100
Mic OO N/A 44 44
Mic Boost N/A N/A 53 53
S/PDIF OO N/A N/A N/A
S/PDIF 1 OO N/A N/A N/A
S/PDIF 2 OO N/A N/A N/A
S/PDIF 3 OO N/A N/A N/A
Capture N/A CAPTUR 70 70
Auto-Mute Mode N/A Enabled N/A N/A
Internal Mic Boost N/A N/A 0 0
Loopback Mixing N/A Disabled N/A N/A