Debian Installation Checklist

After Googling and ogling a lot of documentation about installing Debian in a chroot environment, I decided to put together this quick checklist, mostly for my own purposes, so that I wouldn't have to search around so much the next time I install Debian. Feel free to use it if you wish.

Pre-installation steps

  1. Partition the hard drive as you wish and create filesystems of your choice on the partitions to use. Make sure to have at least a root directory and a swap partition.
  2. Set the system time and date, if necessary.

Main procedure

  1. Get and install debootstrap. The Debian package can be fetched from /debian/pool/main/d/debootstrap on your preferred Debian mirror, such as ftp://ftp.se.debian.org/.
  2. Run debootstrap to bootstrap the base system. Quick command:
    debootstrap --arch amd64 buster /mnt/debian ftp://ftp.se.debian.org/debian
  3. Mount /proc and /sys in Debian's prefix.
  4. Chroot into the bootstrapped system.
  5. Set the timezone by running dpkg-reconfigure tzdata.
  6. Set up /etc/fstab.
  7. Add LANG="en_US.UTF-8" or similar to /etc/default/locale.
  8. Set up network information in /etc/hostname, /etc/hosts and /etc/network/interfaces. A rather standard configuration for the last would be as follows:
    auto lo eth0
    
    iface lo inet loopback
    iface eth0 inet dhcp
    debootstrap should have gotten /etc/resolv.conf right, but it is wise to check to be sure.
  9. Set up /etc/apt/sources.list. The following is a rather sane default configuration for a stable system:
    deb http://ftp.se.debian.org/debian buster main contrib
    deb-src http://ftp.se.debian.org/debian buster main contrib
    deb http://security.debian.org/ buster/updates main contrib
    deb-src http://security.debian.org/ buster/updates main contrib
    Remember to run apt-get update afterwards.
  10. Set the root password.
  11. Set APT::Install-Recommends "0"; in /etc/apt/apt.conf.
  12. Install the locales-all package.
  13. Install the console-data, unicode-data and kbd packages.
  14. Install a kernel, such as linux-image-amd64. It is probably a good idea to set up a /etc/kernel-img.conf first, as well. Sample contents:
    do_symlinks = Yes
    do_initrd = Yes
    link_in_boot = Yes
    
  15. Install sysvinit-core and remove systemd.
  16. Install and set up GRUB. Note that the package from GRUB 2 is grub-pc, not grub. Sample config:
    set timeout=10
    set default=0
    
    menuentry "Debian Buster" {
    	insmod gzio
    	set root=(hd0,msdos1)
    	linux /boot/vmlinuz ro root=/dev/sda1
    	initrd /boot/initrd.img
    }
    Note, in particular, that the initrd requires a root filesystem on LVM to be specified as /dev/mapper/$VG-$LV, not as /dev/$VG/$LV.
  17. You can now boot into your Debian system, if you wish.

Post-installation goodies

You may want to run tasksel to get some common packages (for example, the standard set).

Useful extra packages

Valid XHTML 1.1! Valid CSS! This site attempts not to be broken.
Author: Fredrik Tolf <fredrik@dolda2000.com>
Last changed: Thu Apr 29 17:48:20 2021