Translation(s): none

DebianOn is an effort to document how to install, configure and use Debian on some specific hardware. Therefore potential buyers would know if that hardware is supported and owners would know how get the best out of that hardware.

The purpose is not to duplicate the Debian Official Documentation, but to document how to install Debian on some specific hardware.

If you need help to get Debian running on your hardware, please have a look at our user support channels where you may find specific channels (mailing list, IRC channel) dedicated to certain types of hardware.

Models covered
Generic Single Board Computer

This page explains one possibility to install Debian on a Generic Single Board Computer for which no official Debian Installer exists, but that allows you to plug in an external storage medium such as an SD Card or an USB Storage Medium.

The idea is to use debootstrap and qemu-user on a regular computer such as an x86 laptop or desktop computer to prepare the medium and then just to plug the storage medium to the target computer.

The Raspberry Pi is a classical example, and in fact you will notice that this page was written while doing installation on a Raspberry Pi 4B.

Instructions

Prerequisites

You need:

Partition and Mount Medium

Use gparted, parted or any other partitioning tool to write the right kind of volume label (the kind your target system will boot from) to the medium and partition the medium as you want to have it (as long as the target system is fine with that). This can, for example, include specially labeled and formatted partitions that the target system might use for its firmware, boot manager and boot control files.

Choose whether you want a dedicated /boot or whether /boot should reside on your root file system.

Format the partitions with the required/intended file systems. Mount the (still empty) target root fs somewhere (for example /mnt/target), mount /boot and firmware partitions where they belong under your target root fs.

Debootstrap

install qemu-user qemu-user-binfmt debootstrap on the host system.

invoke (as root) debootstrap --arch=<arch> <suite> /path/to/target_root <your mirror>, for example: debootstrap --arch=arm64 trixie /mnt/target http://deb.debian.org/debian

This will implicitly run the architecture dependent parts of the bootstrap process under qemu. Don't worry if it's slow: Emulating another CPU is likely to be one order of magnitude slower than your target system will be.

chroot into your new system

(as root) chroot /mnt/target /bin/bash will give you a shell in the target system. dpkg --print-architecture will print the target architecture, and uname -a will claim to run Linux <hostname> x.y.z-<host_arch> but on your target architecture.

Then:

Next, unmount the file systems, pull the medium from the host, plug it into the target system, try booting.

You may plug the medium back into the host, remount the file systems and chroot into the target tree at any time to debug or fix things.

Credits


?CategoryEmbeddedComputer