Raspian (English)

Warning: This post is over 365 days old. The information may be out of date.

If you just bought a Raspberry PI, you have to ask yourself what system install on this machine.

For my personal usage, i have tested :

  • Raspian
  • ArchLinux ARM

Both are good distributions. Raspian is the “official distribution” of Raspberry, i will quickly introduce how to install it (headless mode) and make some optimizations.

Installation on Raspberry PI 3

I suppose you are using a Linux or BSD system. I personnaly choose the Raspian Stretch Lite version (Raspian download URL). At first, you need to copy the img file to your SD card :

dd bs=4M if=2017-09-07-raspbian-stretch.img of=/dev/sdX conv=fsync

Of course, choose the right /dev/sdX …

Warning: Since the last versions of Raspian, sshd is desactivated. You must mount the boot partition on your computer and create an empty file called ssh :

mount /dev/sdX1 /mnt/boot && touch /mnt/boot/ssh && umount /mnt/boot


This part is not mandatory but i will give you some optimizations that i made on my installations (most on them are in a ansible playbook).

  • Update the root password

  • Add some usefull programs :

    apt-get install fake-hwclock rng-tools watchdog apticron apt-listchanges postfix
  • Add a new user (with the sudo rights)

    useradd -m -G sudo pea
  • Delete the pi user

    userdel -r pi
  • Activate the watchdog

    • Change in /boot/config.txt the line : dtparam=watchdog=on

    • Configure the daemon ( /etc/watchdog.conf ) :

    max-load-1 = 30 watchdog-device = /dev/watchdog admin = xxx@xxx.xxx interval = 5 realtime = yes priority = 1 watchdog-timeout = 15 ```

  • NTP synchronization :

    • Configuration of timesyncd.conf : /etc/systemd/timesyncd.conf
    NTP=0.fr.pool.ntp.org 1.fr.pool.ntp.org
    FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
    • /usr/bin/timedatectl set-timezone Europe/Paris && /usr/bin/timedatectl set-ntp true
  • Add more entropy : /etc/default/rng-tools

RNGD_OPTS="-o /dev/random -r /dev/hwrng"
  • Desactivate wifi and bluetooth: /boot/config.txt

    • Add these lines :

    turn wifi and bluetooth off

    dtoverlay=pi3-disable-wifi dtoverlay=pi3-disable-bt ```

  • Activate services :

systemctl enable fake-hwclock rng-tools watchdog
  • Desactivate unnecessary services :
systemctl disable avahi-daemon triggerhappy
  • Upgrade your kernel with rpi-update :

As the time of writing, you can already try the kernel 4.14 by changing to the next BRANCH :

BRANCH=next rpi-update

Related Posts