Debian basic system install
Debian basic system
Installation
In this example Debian 13 Trixie was installed using Network install
Note: "before Debian 12 (Bookworm), firmware was not included in the normal Debian installer images", but images with non-free firmware are available at Debian DVD image with non-free firmware
- At installer boot, no changes to grub menu are needed, but is convenient to choice the non graphical install mode
- Example of disk partition:
Note: swap partitions are easier to detect in case of partition table recovery, consider to put the most important partition as last one, with a swap partition before it.
Note: I'm not a fun of swap, in my experience when swap start to really be in use the system became unrecoverable, I'm testing Zram instead.
Note: consider to have a secondary partition, in this example used as /srv, of same size as root partition, it can be used in emergency cases or to test a fresh O.S. install without overwrite the previous root.
+-------------+-------+-----------+ | partition | type | size | +-------------+-------+-----------+ | ORIG. STUFF | vary | vary | | SWAP | swap | 1GB | | / | xfs | 32GB | | /srv | xfs | 32GB | | SWAP | swap | 1GB | | /home | xfs | remaining | +-------------+-------+-----------+
- When asked, chose no Desktop environment at all (without any gnome, kde, fce, etc), select just standard system utilities and SSH server if you want.
Configuration (at first reboot)
Note: if you installed any graphical desktop environment, use CTRL+ALT+F2 to switch back in console.
Wifi connection
Note: if you have configured a wireless during the install, probably you just have the wifi device configured in /etc/network/interfaces configured like this
... iface wlXXXN inet dhcp wpa-ssid XXXX wpa-psk XXXX
It works well, but you may have some difficult to easily change wifi network if needed. In case you prefer, while having the same internet connection configured during installation, you can install NetworkManage and configure it to manage your wifi interfaces:
# install apt-get install network-manager # verify state of your wireless device (the name of the device will change according to your system): nmcli device # if the state of your wireless device is unmanaged you need to remove any reference to it in the mentioned file: nano /etc/network/interface # and restart any ifup managed networks: systemctl restart ifup@* # then you can restart NetworkManager itself: systemctl restart NetworkManager # and now you should see the device state as disconnected: nmcli device # then finally you can configure your wifi network: nmcli device wifi connect <ESSID> password <PASSWORD>
Etckeeper [optional]
Etckeeper can be used to keep tracks /etc config changes
- To install and configure it, see Git server config backup
Note: if you are not using network install, etckeeper may not be contained in the install CD/DVD, and it needs git package, so you will need to download etckeeper package and use the install CD/DVD to install its dependencies).
Configure dialog localization and timezone
- Dialog
apt-get install dialog
- Locales
apt-get install locales dpkg-reconfigure locales # choose en_US.UTF8, None default etckeeper commit -m "configure locales" # [optional]
- Timezone
apt-get install tzdata dpkg-reconfigure tzdata # choose Etc -> UTC etckeeper commit -m "configure tzdata" # [optional]
Configure Grub [optional]
from from https://wiki.debian.org/GRUB2?action=show&redirect=Grub2
I prefer a clean text base Grub menu and a complete output from the boot process, so I usually edit /etc/default/grub and ensure the follow configs:
GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_TERMINAL=console
After edit, run
update-grub etckeeper commit -m "configure grub" # [optional]
Use cryptography for /home partition [optional]
If you prefer, you may use Cryptsetup to have an encrypted /home partition with your personal data. See Cryptsetup.
Note: remove any /home/USERNAME before mount.
Note: if you use Cryptsetup for your /home partition, you will need to mount it manually, in the old fashion tty console, at each boot before to login as a common user to use the system.
Zram instead of swap [optional]
See Zram.
Disable tmpfs for /tmp [optional]
systemctl mask tmp.mount etckeeper commit -m "disable tmpfs"
CPU scaling [optional]
I used TLP in the past, not anymore, but take a look at PowerManager.
See also https://wiki.debian.org/CpuFrequencyScaling#With_cpupower
Suspend (lid close/idle actions)
TO DEFINE, see again PowerManager'
Setup a Graphical Environment
I prefer a minimal environment with no distractions and minimal mouse interaction, so I usually:
- Manually install Xorg
apt-get install xserver-xorg
- Setup xdm as X login manager
See Xdm
- Setup i3wm as window manager
See I3wm
- Remove Gnome stuff (if installed)
apt-get autoremove --purge gdm3 task-gnome-desktop gnome-core gnome-session* gnome-shell* gnome-terminal* chrome-* cheese* evolution*
- TODO [to improve]: remove additional stuffs
apt-get autoremove --purge desktop-base+ task-desktop+ gnome-software+ firefox\* libreoffice\* gdm\* evolution\* gnome-control-center gnome-settings-daemon gnome-terminal gnome-keyring
Add firmware packages
apt-get install firmware-linux-free apt-get install firmware-linux-nonfree firmware-misc-nonfree
Reboot (to start using graphical environment
This is a good point to do a reboot and use the configs and packages just installed.
Add i386 support to Apt [optional]
Add backport support to Apt [optional]
See Debian_backports
Install useful packages
- Update the current system
apt-get dist-upgrade
- Add minimal packages
apt-get install apt apt-utils base-files base-passwd coreutils dash debconf dpkg grep gzip hostname libc6 libc-bin nano passwd procps psmisc readline-common sed sysvinit-utils tar
- Add base packages
apt-get install bash bc binutils bsdutils bzip2 ca-certificates curl dialog dnsutils findutils iptables iputils-ping kmod less locales lsof man mount mutt ncal netcat-traditional nmap telnet tzdata util-linux
- Add gui packages [optional]
apt-get install arandr audacious brightnessctl conky-std eog evince feh ffmpeg file-roller firefox-esr geany gimp imagemagick alsa-utils scrot spacefm claws-mail xine-ui xterm
- Add dev package [optional]
apt-get install astyle autoconf automake cmake ddd diffuse doxygen g++ gdb git kdiff3 make
- Add audio packages
from https://wiki.debian.org/PipeWire
Starting from Debian 13 Trixie, pipewire is used as default audio server replacing pulseaudio
apt-get install pipewire pipewire-pulse pipewire-alsa systemctl --user restart wireplumber pipewire pipewire-pulse
- Add a minimal libreoffice packages [optional]