devnull/debootstrap_minimal_dekstop...

1.1 KiB

Howto debootstrap a bare minimal Debian Desktop from scratch

  • partitioning and filesystem
  • create a root partition and swap partition
  • mkfs.ext4 and mkswap
  • run debootstrap
  • debootstrap bullseye /mnt/ http://ftp.de.debian.org/debian
  • bind mound dev proc and sys
  • for m in dev proc sys ; do mount /$m /mnt/$m ; done
  • chroot into the new environment and run bash
  • chroot /mnt/ /bin/bash
  • give the machine a good hostname
  • echo mycrazyhostname > /etc/hostname
  • install basic stuff, like linux kernel, grub and networking-scripts
  • apt update ; apt install linux-image-generic grub-pc ifupdown man console-data locales
  • do locales settings
  • dpkg-reconfigure locales
  • configure keyboard
  • dpkg-reconfigure keyboard-configuration
  • install X-Server and window manager
  • apt install --no-install-recommends xserver-xorg jwm xdm xterm
  • ensure grub is installed
  • grub-install /dev/sdXY ; update-grub
  • set root password
  • passwd root
  • create a user
  • adduser coolusername
  • create fstab with content
  • /dev/sdXY / ext4 defaults 0 1
  • exit chroot and reboot