Debian sur raspberry pi (non rasbian)

Configuration debian pour raspberry pi:

Création partition:

64M en fat16 pour la partition firmware
Le reste pour le system

mount /dev/{device}p2 /mnt

debootstrap –arch=armhf –include=sudo,ntp,flash-kernel,openssh-server,bind9-host,resolvconf,network-manager,locales,isc-dhcp-server,init,vim,man-db,wget,u-boot-rpi,u-boot-tools buster /mnt

mkdir /mnt/boot/firmware

mount /dev/{device}p1 /mnt

mount –bind /dev /mnt/dev && mount –bind /proc /mnt/proc && mount –bind /sys /mnt/sys

chroot /mnt

Configuration flash-kernel selon rapsberry pi:
echo “Raspberry Pi 1 Model A” > /etc/flash-kernel/machine
echo “Raspberry Pi 1 Model A+” > /etc/flash-kernel/machine
echo “Raspberry Pi 1 Model B” > /etc/flash-kernel/machine
echo “Raspberry Pi 1 Model B+” > /etc/flash-kernel/machine
echo “Raspberry Pi 1 Model B Rev2” > /etc/flash-kernel/machine
echo “Raspberry Pi 1 Compute Module” > /etc/flash-kernel/machine
echo “Raspberry Pi Model B V2” > /etc/flash-kernel/machine
echo “Raspberry Pi Model Zero” > /etc/flash-kernel/machine
echo “Raspberry Pi Model Zero W” > /etc/flash-kernel/machine
echo “Raspberry Pi 2 Model B” > /etc/flash-kernel/machine
echo “Raspberry Pi 3 Model B” > /etc/flash-kernel/machine
echo “Raspberry Pi 3 Model B+” > /etc/flash-kernel/machine

Modification de fichier:
cat << EOF > /etc/fstab
# /etc/fstab: static file system information.
# Use ‘blkid’ to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# # / was on /dev/mmcblk0p2 during installation
UUID=<p2 UUID> / ext4 errors=remount-ro 0 1
# /boot/uboot was on /dev/mmcblk0p1 during installation
UUID=<p1 UUID> /boot/firmware vfat utf8 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0

echo “raspberrypi” > /etc/hostname

cat << EOF > /etc/hosts localhost raspberrypi

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

cat << EOF > /etc/network/interface
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
iface eth0 inet6 dhcp

cat << EOF > /etc/default/locale
# File generated by update-locale

cat << EOF > /etc/apt/sources.list
deb buster main contrib non-free
deb-src buster main contrib non-free

deb buster/updates main contrib non-free
deb-src buster/updates main contrib non-free

# stretch-updates, previously known as ‘volatile’
deb buster-updates main contrib non-free
deb-src buster-updates main contrib non-free

deb buster-backports main contrib non-free
deb-src buster-backports main contrib non-free

cat << EOF >/etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# # program, run by the persistent-net-generator.rules rules file.
# #
# # You can modify it, as long as you keep each rule on a single
# # line, and change only the value of the NAME= key.

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==””, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

adduser <user>
usermod -G sudo -a <user>

Instalation selon rapsberry pi:

apt update; apt install linux-image-<version>-<type> raspi-firmware

editer le fichier suivant:

/etc/default/raspi-firmware pour avoir ces valeurs pour un démarrage direct sur le kernel:


CONSOLES=”tty0 ttyAMA0,115200″


update-initramfs -u


Pour démarrer sur u-boot, modifier aussi cette ligne:


Faire la copie de uboot selon rapsberry pi:
cp /usr/lib/u-boot/rpi/u-boot.bin /boot/firmware
cp /usr/lib/u-boot/rpi_2/u-boot.bin /boot/firmware
cp /usr/lib/u-boot/rpi_3_32b/u-boot.bin /boot/firmware
cp /usr/lib/u-boot/rpi_3/u-boot.bin /boot/firmware


update-initramfs -u


Vous pouvez aussi ajouter des options dans le fichier /etc/default/raspi-firmware:

Exemple pour une raspberry pi 2, modification des fréquences par defaut:


Exemple pour une raspberry pi 3,ajout 64 bits (pi3 non tester):


Leave a Comment