Debian installation

last modified

2024–9–11

Fresh installation of Debian 12, on elektra on 2023–6–25, on sydney on 2023–8–11, and on PFSNSQ859196 on 2024–5–26.

Debian installer

  • Copy netinst installation image on USB stick:

    cp debian-12.0.0-amd64-netinst.iso /dev/sdX

    Restart, and select the USB stick as boot device from BIOS (F12).

  • Preserve configuration files, e.g. zip /etc to a location where it is preserved.

  • In the installer, select English language, US location, and German keyboard. Ignore the timezone for now.

  • On a laptop, select the WiFi network. Get the password e.g. from Android under ‘Share’. Keep the domain name mynet.

  • Simplest partitioning: Delete all Linux partitions which do not contain user data, use guided partitioning, use the largest contiguous free space, all files in one partition.

  • Select deb.debian.org as package server. Select the tasks

    • SSH server (task-ssh-server)
    • standard system utilities (tasksel install standard)

    Do not select KDE Plasma or any other desktop environment, because they pull in all kinds of stuff. task-laptop does not have to be selected because it is automatically installed on a laptop.

  • Reboot.

Basic setup

  • Log in as root on a virtual console.

  • Make the Linux console usable by running

    dpkg-reconfigure console-setup

    and choosing ‘UTF-8’, ‘Latin-1’, ‘Terminus’, and ‘16x32’ or ‘14x28’ depending on the screen resolution.

  • Fix the timezone by

    dpkg-reconfigure tzdata
  • Add user(s) to sudo group:

    adduser <username> sudo
  • Install a sane editor: joe (or just use nano)

  • Make sure all available Debian package repositories and sections are configured. /etc/apt/sources.list should look like

    deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
    deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
    deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
    deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware

    The backports repository has by default a lower precendence than the other repositories, which means no upgrades to packages from it will be performed automatically. This can be fixed by creating /etc/apt/preferences.d/99debian-backports with the content

    Package: *
    Pin: release n=bookworm-backports
    Pin-Priority: 500
    Caution

    However, this may break installation from the regular repositories. It may be better to keep the low precedence and only install from backports as needed.

  • Install aptitude & update:

    apt install aptitude
    aptitude safe-upgrade

    At this point, regular packages may be replaced by higher versions from backports.

KDE installation and system configuration

  • Install KDE via packages plasma-desktop and sddm, plus konsole and dolphin.

  • On a laptop, network-manager is useful. Install it and plasma-nm, and make sure that the WiFi configuration in /etc/network/interfaces (left over from the installation) is commented out, so that WiFi is managed by NetworkManager.

    Otherwise, make sure that network-manager and plasma-nm are not installed.

  • Reboot into KDE.

KDE ‘System Settings’

  • In Regional Settings / Region & Language

    • set Language to ‘American English’
    • set Measurements to ‘C (Metric)’
    • set Paper Size to ‘C (A4)’.
    • set Time to “English (Sweden)” for ISO date format and 24 h clock.
      This is really necessary only for Dolphin.

    In principle, a system locale en_SE.UTF-8 is generated and active from the next reboot, but that doesn’t seem to work; among other things, Aptitude (Perl-based?) complains.

  • Instead, apart from KDE we use the locale en_DK.UTF-8 for time, which however has to be explicitly generated with

    sudo dpkg-reconfigure locales

    Keep en_US.UTF-8, disable en_SE.UTF-8, and enable en_DK.UTF-8.
    Then set LC_TIME=en_DK.UTF-8 in ~/.bashrc.

  • In Applications / Locations, set all unwanted locations to the home directory. This information is stored in .config/user-dirs.dirs.

    Make sure wanted locations (e.g. Downloads) actually exist, then run xdg-user-dirs-update.

    Delete the old, automatically generated folders.

    cd
    rmdir Desktop Documents Downloads Videos Pictures Music Public Templates
  • In Input Devices / Keyboard / Advanced select:

    • Layout of numeric keypad: Unicode arrows and math operators on default level (keypad:future)
    • Non-breaking space input: Non-breaking space at the 3rd level (nbsp:level3)
    • Position of Compose key: Caps Lock (compose:caps)

Nvidia drivers

  • Install nvidia-driver, and reboot.

Further installation and configuration

  • Install further packages, e.g.

    ark bc colorized-logs copyq curl ddcutil djview4 dolphin-plugins encfs exim4 firefox-esr fonts-ebgaramond fonts-ebgaramond-extra fonts-sil-gentium fuse-zip gh gimp git htop inkscape ipython3 jq kcharselect kcolorchooser kde-spectacle kmag knotes latexmk locate meld minify mpv mpv-mpris mricron mutt net-tools openconnect pdftk poppler-utils qcomicbook qdirstat qttools5-dev-tools redshift remmina ripgrep sqlitebrowser terminator texlive-xetex tidy tree ttf-mscorefonts-installer wmctrl xclip xdotool
  • Synchronize the Configlibrary via Seafile.

  • From ~/Config/dot, run ./install and sudo ./install.

  • Install fonts from ~/Config/Fonts.
    Configure Konsole, Terminator, and other applications which need a monospace font to use Consolas at 15pt.