Minimal Installation of Debian 9
We will do the installation form Debian's netinstall iso, grab it from https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.9.0-amd64-netinst.iso
- Boot from the CD, choose “Install”
- Select your language, country, locale
- Enter a hostname
- Enter a root password, a user and user password
- Partitioning method: select “Guided – use entire disk” and confirm
- The installer will now install the base system
- Select mirror country
- In Software selection select nothing, de-select all pre-selected items, continue
- Install grub to the MBR
- Reboot
After your new installation comes up login as root
- Optional:
apt install openssh-server
, ssh into your box - Edit /etc/network/interfaces
# The primary network interface
allow-hotplug enp0s3
iface enp0s3 inet static
address 10.0.2.16/24
gateway 10.0.2.2
dns-nameservers 1.1.1.1
replace the interface name , address, gateway with your values
Now clean up some unnecessary stuff
systemctl mask systemd-journald
systemctl disable systemd-timesyncd
Reboot
That's it. If your did read the the article about Minimal Installation of Ubuntu 19.04 you will note, that Debian needs far less steps to get a minimal installation. That's mainly because Debian installs less stuff in the base system from the beginning. Additionally some of the modern systemd components, like systemd-networkd, haven't been integrated in Debian (yet).
On my system it uses 690 MB hard disk space (Ubuntu: 2,0 GB, Fedora 1,2 GB) and uses 50 MB (Ubuntu: 68 MB, Fedora 114 MB) RAM.
Of course, if you now start to install software it is very likely that some of the packages we removed will be pulled in back.
Minimal installation of Xorg with Fluxbox
apt install fluxbox
apt install xinit
apt install xterm
As a user edit ~/.xinitrc
exec startfluxbox
Save the file and then type startx. The fluxbox window manager will appear, you should be able to right-click and launch xterm by Applications –> Shells –> Bash