This guide is a best-effort to configure a system with just debootstrap.
It has been updated so as not to be actively incorrect as of June 2022, when I realized it was still being used, but it was first written in 2015 and I can't guarantee that it's not missing essential parts of the process.
If it breaks, you get to keep both pieces
- Download a Debian live standard CD: https://cdimage.debian.org/cdimage/release/current-live/amd64/bt-hybrid/
- Login with
user:live(if needed, it will probably automatically login) - Check that you have internet with
ip a. If you're using ethernet it should already be connected, otherwise you'll need to configureinterfaces(5)and probablywpa_supplicant(8) - Setup and mount disks at
/mnt. Arch Linux has a good guide to this: https://wiki.archlinux.org/index.php/Partitioning - Install and run debootstrap
sudo apt-get updatesudo apt-get install debootstrap- Replace RELEASE below with the name of the release you want to install, like
bullseyeorfocal - Debian:
sudo debootstrap RELEASE /mnt http://deb.debian.org/debian - (If Ubuntu)
sudo apt-get install ubuntu-archive-keyring - Note that ubuntu-keyring is missing from bullseye: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929165
- Temporarily, you can add
deb http://deb.debian.org/debian/ buster mainto/etc/apt/sources.list - Then do
apt-get update && apt-get install ubuntu-archive-keyring
- (If Ubuntu)
- Ubuntu:
sudo debootstrap RELEASE /mnt http://archive.ubuntu.com/ubuntu - You may be able to get away with installing more recent versions of Ubuntu by creating new symlinks, but you may just as likely run into errors
- E.g. jammy won't install with bullseye's debootstrap due to using unsupported zstd compression
- Check to see what current debootstrap uses and then copy it: https://salsa.debian.org/installer-team/debootstrap/-/tree/master/scripts
cd /usr/share/debootstrap/scripts && ln -sf gutsy jammy
- Ubuntu:
- Copy your networking configuration to the new install
sudo cp /etc/network/interfaces /mnt/etc/network/interfaces- Also copy over your
wpa_supplicant.confif you made one - If you're installing Ubuntu, you'll need to instead configure
netplan: https://netplan.io/examples
- Edit
/mnt/etc/fstab: https://wiki.archlinux.org/index.php/Fstab - Alternatively you can generate an fstab file with
genfstab sudo apt-get install arch-install-scriptsgenfstab /mnt > /mnt/etc/fstab
- Alternatively you can generate an fstab file with
- Edit
- Mount filesystems and chroot into your new system:
- Alternatively you can use
arch-chroot sudo apt-get install arch-install-scriptssudo arch-chroot /mnt
- Alternatively you can use
sudo mount --bind /dev /mnt/devsudo mount -t proc none /mnt/procsudo mount -t sysfs sys /mnt/syssudo chroot /mnt /bin/bash
- Set root password with
passwd - Set hostname with:
echo HOSTNAME > /etc/hostname - Set timezone with
dpkg-reconfigure tzdata - Generate Locales
apt-get install localesdpkg-reconfigure locales
- Install a Linux kernel
- Locate the appropriate one with:
apt-cache search linux-image - Install it with
apt-get install KERNELNAME - You probably want something to the effect of
linux-image-ARCHe.g.linux-image-amd64(orlinux-image-genericfor Ubuntu) - Ubuntu will pull in grub as part of this step and prompt for grub installation, allowing you to skip the next three steps
- Locate the appropriate one with:
- Install Grub
- BIOS:
apt-get install grub-pc - UEFI:
apt-get install grub-efi
- BIOS:
- Install Bootloader with
grub-install /dev/DEVICENAME - Configure Grub with
update-grub - Exit Chroot with:
exit - Umount everthing with
sudo umount -R /mnt - Reboot with
sudo shutdown -r now - Remove installation media
- Enjoy!
You're missing useradd or adduser