daniel-fahey / debian-installer

Opinionated Debian Installer - alternative debian installer for laptops and desktop PCs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Opinionated Debian Installer

This tool can be used to create a modern installation of Debian. Our opinions of what a modern installation of Debian should look like in 2023 are as follows:

  • Backports and non-free enabled
  • Firmware installed
  • Installed on btrfs subvolumes
  • Full disk encryption, unlocked by TPM
  • Fast installation using an image
  • Browser-based installer

Limitations

  • The installer will take over your whole disk
  • Debian 12 (Bookworm) only
  • Amd64 with EFI only
  • The installer is in english only

Downloads

Desktop environment Download SHA-256 Checksum
KDE Plasma opinionated-debian-installer-bookworm-kde-plasma-20230820a.img (4.2GB) dc34c690 410e84a3 d356dad2 fa409d68 f6c79dc1 dcc5d3ae bd2dab9d eb6d4338
Gnome opinionated-debian-installer-bookworm-gnome-20230826a.img (3.3GB) 9889375e deea4095 e629521c 897697f7 4788048f fdcf5758 2e790d7c ec158f52

Instructions

  1. Download one of the live image files from the table above
  2. Write the image file to a USB flash drive. Do not use ventoy or similar "clever" tools - they are not compatible with these images. If you need a GUI, use etcher or win32DiskImager or just use dd - dd if=opinionated-debian-installer*.img of=/dev/sdX bs=8MB status=progress conv=sync where sdX is your USB flash drive
  3. Boot from the USB flash drive
  4. Start the installer icon from the desktop/dash, fill in the form in the browser and press the big Install button
  5. Reboot and enjoy

Screencast & Screenshot

Video of installation of Debian with KDE Plasma:

Watch the video

Screenshot of the full installer GUI:

gui screenshot

Details

  • GPT disk partitions are created on the designated disk drive:
    • UEFI ESP partition
    • Optional swap partition - LUKS encrypted
    • Root partition - LUKS encrypted (rest of the drive)
  • GPT root partition is auto-discoverable
  • Btrfs subvolumes will be called @ for / (marked as default) and @home for /home (compatible with timeshift); the top-level subvolume will be mounted to /root/btrfs1
  • The system is installed using an image from the live iso. This will speed up the installation significantly and allow off-line installation.
  • Dracut is used instead of initramfs-tools
  • Systemd-boot is used instead of grub
  • Network-manager is used for networking
  • Systemd-cryptenroll is used to unlock the disk, using TPM (if available)
  • Sudo is installed and configured for the created user

Testing

If you are testing in a virtual machine, attaching the downloaded image file as a virtual disk, you need to extend it first. The image file that you downloaded is shrunk, there is no free space left in the filesystems. Use truncate -s +500M opinionated*.img to add 500MB to the virtual disk before you attach it to a virtual machine. The installer will expand the partitions and filesystem to fill the device.

Libvirt

To test with libvirt, make sure to create the VM with UEFI:

  1. Select the Customize configuration before install option at the end of the new VM dialog
  2. In the VM configuration window, Overview tab, Hypervisor Details section, select Firmware: UEFI

virt-manager uefi screenshot

To add a TPM module, you need to install the swtpm-tools package.

Attach the downloaded installer image file as Device type: Disk device, not CDROM device.

Hyper-V

To test with the MS hyper-v virtualization, make sure to create your VM with Generation 2. This will enable UEFI. TPM can be enabled and Secure Boot disabled in the Security tab of the Hyper-V settings.

You will also need to convert the installer image to VHDx format and make the file not sparse. You can use qemu-img (windows download) and fsutil like this:

qemu-img convert -f raw -O vhdx opinionated-debian-installer-bookworm-kde-plasma-20230319a.img odin.vhdx
fsutil sparse setflag odin.vhdx 0

Attach the generated VHDx file as a disk, not as a CD.

Hacking

Alternatively to running the whole browser based GUI, you can run the installer.sh script manually from a root shell. The end result will be exactly the same. Just don't forget to edit the configuration options (especially the DISK variable) before running it.

Creating Your Own Installer Image

  1. Insert a blank storage device
  2. Edit the DISK variable at the top of files make_image_*.sh
  3. Execute the make_image_*.sh files as root

In the first stage of image generation, you will get a tasksel prompt where you can select a different set of packages for your image.

Installer Image Structure

There are 3 GPT partitions on the installer image:

  1. EFI boot partition
  2. Base Image - Btrfs partition with maximum zstd compression. When the live system is running, this is used as a read-only lower device for overlayfs. When installing the target system, the installer will copy this to the target system, mount it read-write, resize to expand to the whole partition and continue with the system installation.
  3. Top Overlay - upper and work device for the overlayfs for the live system. The changes you make while the live system is running are persisted here.

Building the Front-End

The front-end is a vue application. You need npm to build it. Run the following commands to build it:

cd frontend
npm run build

Comparison

The following table contains comparison of features between our opinionated debian installer and official debian installers.

Feature ODIN Netinstall Calamares
Installer internationalization N Y Y
Mirror selection, HTTP proxy support N Y N
Manual disk partitioning, LVM, filesystem selection N[4] Y Y
Btrfs subvolumes Y[2] Y[3] Y[2]
Full drive encryption Y Y[1] Y
Passwordless unlock (TPM) Y N N
Image-based installation Y N N
Non-free and backports Y N N
Browser-based installer Y N N

[1] /boot needs a separate unencrypted partition

[2] @ and @home (timeshift compatible)

[3] @rootfs

[4] Fixed partitioning (see Details above), LUKS is automatic, BTRFS is used as filesystem

About

Opinionated Debian Installer - alternative debian installer for laptops and desktop PCs

License:GNU General Public License v3.0


Languages

Language:Shell 60.7%Language:Vue 25.4%Language:Python 8.5%Language:CSS 3.9%Language:JavaScript 1.0%Language:HTML 0.6%