Skip to content

Debian - Basics and common info

Tasks for new installs

This includes following steps:

  • Install vim including my preferred config and theme
  • Install ble.sh - a fancy bash style including nice features
  • Install net-tools, mc, git, bind9-dnsutils, ripgrep, fzf, curl, htop, bat, ranger
Install & Configuration of common packages including a fancy bash
wget -O - https://download.al1al7.de/vim/mydebian.sh | bash -s

Configure polkit for group netdev

This configuration is to allow shutdown, reboot and network configuration in KDE for RDP sessions

Create polkit rule for netdev group
cat <<EOF > /etc/polkit-1/rules.d/50-netdev.rules
polkit.addRule(function(action, subject) {
        if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("netdev")) {
                return polkit.Result.YES;
        }
});

polkit.addRule(function(action, subject) {
        if ( subject.isInGroup("netdev") && ((action.id == "org.freedesktop.login1.reboot" ||
             action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
             action.id == "org.freedesktop.login1.power-off" ||
             action.id == "org.freedesktop.login1.power-off-multiple-sessions")) ) {
                return polkit.Result.YES;
        }
});
EOF

Upgrade Debian bookworm (12) to trixie (13)

Hints

This update needs conversion of dovecot configuration scheme, otherwise dovecot will not start

  • Debian trixie will be shipped with Plasma 6 (6.3.6) and KDE 6.13
  • Folder /tmp will be a RAM-based tmpfs file system (see info in upgrade section)
  • APT sources list format will be changed to deb822, a structured format for APT sources that improves readability and flexibility.
  • OpenSSH no longer supports DSA keys
  • Kernel 6.12.x

This update can cause renaming of network interfaces - be sure to have access to the machine when interface is renamed.

Upgrade workflow

Update to latest bookworm release
apt update
apt upgrade

Reboot system after last upgrade

Cleanup
apt autoremove
apt clean

Check mariadb state after stop mariadb service

Shutdown of mariadb must be clean - recovery after a major release upgrade of mariadb is not possible

Stop mariadb [optional]
1
2
3
systemctl stop mariadb
# check log
journalctl -n 100 -f
Switch to trixie sources
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
apt update

Check folder /etc/apt/sources.list.d for manually installed sources

Minimal upgrade
apt upgrade --without-new-pkgs
Full upgrade
apt full-upgrade

Reboot after upgrade

Cleanup auto installed packages
apt autoremove
Cleanup orphaned and local installed packages
1
2
3
apt list '~o'
# check before purge the packages
apt purge '~o'
Modernize apt sources - convert to deb822 format
apt modernize-sources

/tmp folder is now a RAM-based tmpfs - after upgrade old files must be cleaned

Bind mount to make old /tmp files visible
1
2
3
4
mount --bind / /mnt
# delete old files
rm -rf /mnt/tmp/{*,.*}
umount /mnt