Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Debootstrap Ubuntu 20.04 with Plasma, without LiveUSB or netboot image

Ubuntu 20.04 LTS with minimal KDE

Netboot images are deprecated (not available at all for 20.10+) so debootstrap utility is used instead. I will install minimal Plasma desktop and enable OEM mode. Then I can create my user account from within OEM session.

Security notice

It seems like Chromium DEB is no longer updated, which is a huge security risk (v87 in repos, v89 upstream). "Sources list from 18.04" section is now removed, it is recommended to use Flatpak instead.

Known issues

  • Ubiquity will crash if you pick system language other than English. You can change language later using either KDE System Settings (already installed) or gnome-language-selector utility (from language-selector-gnome package).
  • If you get squares instead of valid fonts when using Flatpak application, try to clear font cache
    • Command line: flatpak run --command=fc-cache <APPLICATION_ID> -f


Created with GParted

Partition Mount point Format Size Flags
/dev/sda1 /boot/efi VFAT 128MiB boot, esp
/dev/sda2 / EXT4 max (n/a)
/dev/sda3 (n/a) swap 8GiB swap

Required packages

apt install debootstrap

Mount points

mkdir /target
mount /dev/sda2 /target

mkdir -p /target/boot/efi
mount /dev/sda1 /target/boot/efi

swapon /dev/sda3

Operating system's barebones

debootstrap --variant=minbase --arch=amd64 focal /target

Mount points, again

for i in dev proc sys
mount --bind /$i /target/$i

Environment switch

chroot /target /bin/bash
export PS1="(chroot) $PS1"
export DEBIAN_FRONTEND=noninteractive

Sources list

cat << EOF > /etc/apt/sources.list
deb focal main restricted universe multiverse 
deb focal-security main restricted universe multiverse 
deb focal-updates main restricted universe multiverse

Optional but highly recommended: disabled packages

cat << EOF > /etc/apt/preferences.d/99-disabled
Package: snapd
Pin: release *
Pin-Priority: -1

Package: unattended-upgrades
Pin: release *
Pin-Priority: -1

Package: apport
Pin: release *
Pin-Priority: -1

Package updates

apt update
apt dist-upgrade

Filesystem table

Warning: these are example UUID values, make sure you're using the correct ones!

cat << EOF > /etc/fstab
UUID=11111111-1111-1111-1111-111111111111 / ext4 errors=remount-ro 0 1
UUID=0000-0000 /boot/efi vfat umask=0077 0 1
UUID=22222222-2222-2222-2222-222222222222 none swap sw 0 0

Kernel and bootloader

apt install linux-generic grub-efi-amd64
grub-install /dev/sda

Minimal Plasma desktop

Plasma and Xorg will be installed as a dependency

apt install sddm sddm-theme-breeze

Extra packages

Absolute minimum IMO:

apt install plasma-nm konsole

Nice to have:

apt install ark dolphin fonts-noto-color-emoji gwenview kde-spectacle kwrite okular

Useful GNOME stuff:

apt install baobab gnome-calculator gnome-clocks gnome-disk-utility


Flatpak version available in Ubuntu repositories is out of date (confirmed with Chromium). Use PPA for the latest version:

add-apt-repository ppa:alexlarsson/flatpak
apt install flatpak plasma-discover-backend-flatpak

Flathub is the most popular app repository for Flatpak:

flatpak remote-add --if-not-exists flathub

Installation example for Chromium:

flatpak install flathub org.chromium.Chromium

NetworkManager configuration

cat << EOF > /etc/NetworkManager/conf.d/10-globally-managed-devices.conf


echo "RESUME=UUID=22222222-2222-2222-2222-222222222222" > /etc/initramfs-tools/conf.d/resume
update-initramfs -u -k all

sed -i 's/quiet splash/resume=UUID=22222222-2222-2222-2222-222222222222 hibernate=nocompress/g' /etc/default/grub

Optional: increased inotify limit

Might be necessary if you have multiple IDEs opened at the same time

echo "fs.inotify.max_user_watches=131072" >> /etc/sysctl.d/99-sysctl.conf

OEM mode

Ignore The unit files have no installation config errors

apt install oem-config-kde


umount /target/{proc,sys,dev,boot/efi,}


And follow the on-screen instructions :)


This comment has been minimized.

Copy link

@dyejon dyejon commented Apr 12, 2021

thanks- like the arch install guide but for debootstrap =)
this was just what i was looking for, for disk layouts the installer doesn't support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment