Last updated:30.08.2024 for pici and ziti.
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
- Prepare DNS entries.
- Perform a full backup! Yes, really.
- Prepare Debian 12 amd64 Netinst ISO image (any point version ok) on USB stick.
- An internet connection is required.
- Review this table of image and partition sizes:
hardware profile image size (GB) root filesystem size (GB) local filesystem size (GB) other partitions unallocated notes pm server n/a 15 200 EFI, boot, 32GB swap variable virtualisation server pm desktop/laptop n/a 25 250 EFI, boot, 4GB swap variable local for homes & pub vm server 21 15 - EFI, boot, 4GB swap ~0.5GB not virtualisation server vm desktop/laptop 36 25 5 EFI, boot, 4GB swap ~0.5GB local for browser cache cn server 5 n/a n/a n/a n/a image not partitioned
BIOS configuration
This section is for physical machines only.
- torchio, fiori:
- disable secure boot
- disable quickboot/fastboot
- disable Intel Smart Response Technology (SRT)
- enable power-on after power-outage
- ragu, sugo:
- press ESC (‘Startmenü’) and F10 (‘BIOS Setup’)
- Set Datei–>Standard-Setup–>Werkstinst. als Standard speichern
- Set Datei–>Standard übernehmen und schließen
- Press ESC and F10.
- Set Sicherheit–>Systemsicherheit–>Virtualisierungstechnologie: Aktiviert
- Set Erweitert–>Systemstart-Optionen–>POST-Meldungen: Aktiviert
- Set Erweitert–>Systemstart-Optionen–>POST Verzögerung: 5
- pici, ziti:
- disable hyper-threading technology
- disable ‘ErP’ (in theory this should remove a block on WoL)
- set preferred operating mode to advanced
- set Windows 10 features to ‘other OS’
- halusky:
- does not support UEFI
Creating the perfect KVM-based VM
This section is for KVM-based VMs only.
Features of this “perfect” VM are:
- libvirt-managed volume or DRBD volume
- use of UEFI firmware
- a graphical console capable of running X11 (provided by the mouse, keyboard, Spice-based display and QXL video)
- 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)
- a serial console, which is adequate for a typical server (provided by the serial interface)
- a lot of unwanted hardware is stripped
- Addition of CD-ROM in order to install from ISO images
- support for nested KVM-based VMs
The VM is created using scripts.
- If not done already then download the virttools module:
mkdir -p ~/opt svn co https://svn.pasta.freemyip.com/main/virttools/trunk ~/opt/virttools
- 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.
- The page that led you here should have specified volume and VM creation commands; run them on one node of the virtualisation cluster now.
- Start the VM with:
virsh start <container-name>
- Connect to its console.
Creating the perfect VirtualBox-based VM
This section is for VirtualBox-based VMs only.
- Download the ISO image (see page that lead you here).
- Launch VirtualBox.
- Click “New” and then click “Expert Mode”.
- 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
- In the “Hardware” section of the window, enter:
- Base Memory: 4GB
- Processors: 1
- Enable EFI: yes
- In the “Hard Disk” section of the window, enter:
- Create a Virtual Hard Disk Now: 30GB
- Skip Unattended Installation: yes
- Click “Finish” and verify that the new VM is listed and marked Powered Off.
Pre-partitioning
- Boot the machine off the installation medium.
- 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).
- 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).
- not halusky: move the selector bar to ‘Install’ (not ‘Graphical install’) and press <ENTER>.
- Accept all defaults except as noted below.
- At the ‘Configure the keyboard’ window:
- delguine:, when prompted ‘Keymap to use:’, select ‘British English’.
- THIS DID NOT HAPPEN YET … ONCE ALL HOSTS INSTALLED DELETE THIS: At the ‘Detect network hardware’ window:
- if prompted ‘Load missing firmware from removable media?’, select ‘No’.
- At the ‘Configure the network’ window:
- if prompted ‘Primary network inteface:’, select the primary network interface (probably the first one)
- if prompted ‘Hostname:’, enter the system’s hostname.
- if prompted ‘IP address:’, enter the system’s IP address, netmask, gateway and DNS server.
- At the ‘Set up users and passwords’ window:
- , 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).
- At the ‘Partition disks’ window select ‘Manual’.
- Note that:
- partition sizes below are specified in bytes (see this article for an explanation)
- partitioning schemes described below are:
- halusky: “legacy”
- fiori, torchio: “virtualisation-raid0-lvm”
- pici, ziti: “virtualisation-raid0-lvm”
- pestaroli, testaroli: “standard”
- <all-others>: “standard”
- the choice of partitioning scheme is independent of whether the system is a VM or not.
Partitioning scheme “legacy”
- Create a primary partition of size ‘1073741824B’ (i.e. 1024MiB) at the beginning of the first disk to be used for ext4 filesystem mounted on /boot.
- Create LV root on vg0 of size ‘26843545600B’ (i.e. 25GiB).
- Select ‘Finish’ to return to the Manual partitioner.
- Use LV root for ext4 filesystem mounted on /.
- Save the changes and when warned about the absence of a swap partition continue anyway.
Partitioning scheme “virtualisation-raid0-lvm”
- Create a primary partition of size ‘576716800B’ (i.e. 550MiB;) at the beginning of the first disk to be used for EFI System Partition.
- Create a primary partition of the same size at the beginning of the second disk not to be used.
- Create a primary partition of size ‘1073741824B’ (i.e. 1024MiB) at the beginning of the first disk to be used for ext4 filesystem mounted on /boot.
- Create a primary partition of the same size at the beginning of the second disk not to be used.
- Create a primary partition using all remaining space on the first disk to be used for physical volume for RAID.
- Create a primary partition using all remaining space on the second disk to be used for physical volume for RAID.
- Select ‘Configure software RAID’, allow the partition manager to write the just-defined partitions to disk.
- When prompted ‘Software RAID configuration actions’, select ‘Create MD device’.
- When prompted ‘Software RAID device type:’, select ‘RAID0’.
- When prompted ‘Activate devices for the RAID0 array:’, select disks /dev/*da3 and /dev/*db3 and select ‘Continue’.
- When prompted ‘Write the changes to the storage devices and configure RAID?’, select ‘Yes’.
- When prompted ‘Software RAID configuration actions’, select ‘Finish’.
- Select the RAID0 device and use it for physical volume for LVM
- Select ‘Configure the Logical Volume Manager’, allow the partition manager to write the just-defined partitions to disk.
- Create VG vg0 on md0.
- Create LV root on vg0 of size ‘16106127360B” (i.e. 15GiB).
- Select ‘Finish’ to return to the Manual partitioner.
- Use LV root for ext4 filesystem mounted on /.
- Save the changes and when warned about the absence of a swap partition continue anyway.
Partitioning scheme “virtualisation-raid0-zfs”
- Create a primary partition of size ‘576716800B’ (i.e. 550MiB;) at the beginning of the first disk to be used for EFI System Partition.
- Create a primary partition of the same size at the beginning of the second disk not to be used.
- Create a primary partition of size ‘1073741824B’ (i.e. 1024MiB) at the beginning of the first disk to be used for ext4 filesystem mounted on /boot.
- Create a primary partition of the same size at the beginning of the second disk not to be used.
- Determine which is the larger: desired swap space or 4GB.
- Create a primary partition of size <desired-swap-in-bytes-or-4294967296>B at the beginning of the first disk to be used for ext4 filesystem mounted on / (this will be repurposed as swap later).
- Create a primary partition of the same size at the beginning of the second disk not to be used.
- Create a primary partition using all remaining space on the first disk not to be used (it will be repurposed for ZFS later but this can’t be specified at this point).
- Create a primary partition using all remaining space on the second disk not to be used (it will be repurposed for ZFS later but this can’t be specified at this point).
- Save the changes and when warned about the absence of a swap partition continue anyway.
Partitioning scheme “standard”
- Create a primary partition of size ‘576716800B’ (i.e. 550MiB;) at the beginning of the first disk to be used for EFI System Partition.
- Create a primary partition of size ‘1073741824B’ (i.e. 1024MiB) at the beginning of the first disk to be used for ext4 filesystem mounted on /boot.
- Create a primary partition using all remaining space on the first disk to be use for physical volume for LVM.
- Select ‘Configure the Logical Volume Manager’, allow the partition manager to write the just-defined partitions to disk.
- Create a volume group with name ‘vg0 on the third partition.
- On a server: create LV ‘root’ on vg0 of size ‘16106127360B’ (i.e. 15GiB).
- On a deskop or laptop: create LV ‘root’ on vg0 of size ‘26843545600B’ (i.e. 25GiB).
- Select ‘Finish’ to return to the Manual partitioner.
- Use LV root for ext4 filesystem mounted on /.
- Save the changes and when warned about the absence of a swap partition continue anyway.
Post-partitioning
- At the ‘Software selection’ window:
- when prompted ‘Choose software to install:’, deselect everything.
- At the ‘Finish the installation’ window:
- 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.
- press <ALT-F2>, activate the terminal by pressing <ENTER> and run:
- KVM VMs only: as the system reboots:
- power off
- change the boot order to boot from disk
- power on
- 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
- Log in as root.
- To better align PMs/VMs with containers, run:
apt-get autoremove --purge tasksel-data emacsen-common isc-dhcp-common \ util-linux-locales
- If the “virtualisation-raid0-zfs” partitioning scheme was used then move the root filesystem to ZFS.
- Install and run PCMS.
- KVM VMs only: on the VM server where the VM is running (e.g. fiori or torchio) run:
vm-uefi-sync