Installing Debian 13 on a PM or KVM VM

Last updated:18.01.2025 for trofie (see Debian Trixie rollout).

Warning: this page is in development!

Introduction

This page describes the procedure for installing Debian 12 on a physical machine (PM) or a KVM-based VM. The procedure is deliberately kept as short as possible, with most of the work being offloaded to PCMS. Other pages on this website explain how to configure server applications.

Prologue

  1. Prepare DNS entries.
  2. Perform a full backup! Yes, really.
  3. Prepare Debian 13 amd64 Netinst ISO image (any point version ok) on USB stick.
  4. An internet connection is required.

BIOS configuration

This section is for physical machines only.

  1. torchio, fiori:
    1. disable secure boot
    2. disable quickboot/fastboot
    3. disable Intel Smart Response Technology (SRT)
    4. enable power-on after power-outage
  2. ragu, sugo:
    1. press ESC (‘Startmenü’) and F10 (‘BIOS Setup’)
    2. Set Datei–>Standard-Setup–>Werkstinst. als Standard speichern
    3. Set Datei–>Standard übernehmen und schließen
    4. Press ESC and F10.
    5. Set Sicherheit–>Systemsicherheit–>Virtualisierungstechnologie: Aktiviert
    6. Set Erweitert–>Systemstart-Optionen–>POST-Meldungen: Aktiviert
    7. Set Erweitert–>Systemstart-Optionen–>POST Verzögerung: 5
  3. pici, ziti:
    1. disable hyper-threading technology
    2. disable ‘ErP’ (in theory this should remove a block on WoL)
    3. set preferred operating mode to advanced
    4. set Windows 10 features to ‘other OS’
  4. halusky:
    1. does not support UEFI

Creating the perfect KVM-based VM

This section is for KVM-based VMs only.

Features of this “perfect” VM are:

  1. libvirt-managed volume or DRBD volume
  2. use of UEFI firmware
  3. a graphical console capable of running X11 (provided by the mouse, keyboard, Spice-based display and QXL video)
  4. USB device redirection (allowing a VM to access USB devices attached to where virt-viewer is run from; provided by a suitable USB controller, USB redirector and one Spice channel per concurrently accesses USB device)
  5. a serial console, which is adequate for a typical server (provided by the serial interface)
  6. a lot of unwanted hardware is stripped
  7. Addition of CD-ROM in order to install from ISO images
  8. support for nested KVM-based VMs

The VM is created using scripts.

  1. If not done already then download the virttools module:
    mkdir -p ~/opt
    svn co https://svn.pasta.freemyip.com/main/virttools/trunk ~/opt/virttools
  2. Decide on the volume names: if the VM will have only one disk then <vol-name> should probably be <vm-name>. If the VM will have more than one disk then the <vol-name>s should probably be something like <vm-name>_<one-word-description> or alternatively <vm-name>_disk1, <vm-name>_disk2, etc.
  3. The page that led you here should have specified volume and VM creation commands; run them on one node of the virtualisation cluster now.
  4. Start the VM with:
    virsh start <container-name>
    
  5. Connect to its console.

Creating the perfect VirtualBox-based VM

This section is for VirtualBox-based VMs only.

  1. Download the ISO image (see page that lead you here).
  2. Launch VirtualBox.
  3. Click “New” and then click “Expert Mode”.
  4. In the “Virtual Machine Name and Operating System” section of the window, enter:
    • Name: poprad
    • Folder: <leave-default>
    • ISO Image: <browse-to-the-debian-netinst-iso-image>
    • Type: Linux
    • Version: Debian (64-bit)
    • Skip Unattended Installation: yes
  5. In the “Hardware” section of the window, enter:
    • Base Memory: 4GB
    • Processors: 1
    • Enable EFI: yes
  6. In the “Hard Disk” section of the window, enter:
    • Create a Virtual Hard Disk Now: 30GB
    • Skip Unattended Installation: yes
  7. Click “Finish” and verify that the new VM is listed and marked Powered Off.

Pre-partitioning

  1. Boot the machine off the installation medium.
  2. halusky: leave the selector bar on ‘Graphical install’ and press <ENTER> (failure to do this will cause halusky to reboot or show only screen flicker).
  3. poprad: move the selector bar to ‘Install’ (not ‘Graphical install’), press ‘e’ to edit the GRUB configuration and change:
    --- quiet

    to:

    fb=false --- quiet

    and then press CTRL-X to boot (see here for an explanation).

  4. other: move the selector bar to ‘Install’ (not ‘Graphical install’) and press <ENTER>.
  5. Accept all defaults except as noted below.
  6. At the ‘Configure the keyboard’ window:
    1. delguine:, when prompted ‘Keymap to use:’, select ‘British English’.
  7. THIS DID NOT HAPPEN YET … ONCE ALL HOSTS INSTALLED WITH TRIXIE DELETE THIS: At the ‘Detect network hardware’ window:
    1. if prompted ‘Load missing firmware from removable media?’, select ‘No’.
  8. At the ‘Configure the network’ window:
    1. if prompted ‘Primary network inteface:’, select the primary network interface (probably the first one)
    2. if prompted ‘Hostname:’, enter the system’s hostname.
    3. if prompted ‘IP address:’, enter the system’s IP address, netmask, gateway and DNS server.
  9. At the ‘Set up users and passwords’ window:
    1. , when prompted ‘Root password:’, press <ESC> to get to the main menu and select ‘Configure the clock’ (i.e. skip the ‘Set up users and passwords’ step).
  10. At the ‘Partition disks’ window select ‘Manual’.

Partitioning

  1. At the ‘Partition disks’ window, select the right device to partition and, when prompted ‘Create a new partition table on this device?’, select ‘Yes’.
  2. Partition the disk according to the following table:
    hostpartitioning standardpartitioning scheme
    haluskymy partitioning standard (revision 1)legacy
    fiori, torchiomy partitioning standard (revision 1)virtualisation-raid0-lvm
    pici, zitimy partitioning standard (revision 1)virtualisation-raid0-lvm
    pestaroli, testarolimy partitioning standard (revision 1)standard
    all othersmy partitioning standard (revision 1)standard

    Post-partitioning

    1. At the ‘Software selection’ window:
      1. when prompted ‘Choose software to install:’, deselect everything.
    2. At the ‘Finish the installation’ window, when prompted ‘Installation complete’:
      1. press <ALT-F2>, activate the terminal by pressing <ENTER> and run:
        chroot /target
        passwd root           #  follow prompts to set password
        exit
        exit

        and then press <ALT-F1> to return to the installer.

    3. when installing trofie this was not needed as boot medium changed automatically!
      KVM VMs only
      : as the system reboots:

      1. power off
      2. change the boot order to boot from disk
      3. power on
    4. If necessary: If you modified then kernel command line above (e.g. with nomodeset) then do the same as the system boots up again

    Post-basic-OS-installation

    1. Log in as root.
    2. skip this section pending container/KVM dpkg-l comparison!!!
      To better align PMs/VMs with containers, run:

      apt-get autoremove --purge tasksel-data emacsen-common isc-dhcp-common \
                                 util-linux-locales
    3. If the “virtualisation-raid0-zfs” partitioning scheme was used then move the root filesystem to ZFS.
    4. warning: Note that since 18.01.2025, the page that led you here should specify that you should install and run PCMS; this page should not do it any more. It will take some time for all pages to be updated (most likely as each system gets replaced or upgraded), so the link remains here, but as a warning.
    5. KVM VMs only: on the VM server where the VM is running (e.g. pici or ziti) run:
      vm-uefi-sync

        See also