All Projects → niklasf → build-raspbian-image

niklasf / build-raspbian-image

Licence: MIT license
Builds a minimal Raspbian Stretch image

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to build-raspbian-image

Spocon
SpoCon - A Spotify Connect Client for Debian , Ubuntu and Raspberry Pi based on librespot-java
Stars: ✭ 51 (+27.5%)
Mutual labels:  debian, raspbian
Nginx Ee
Automated Nginx compilation from sources with additional modules support. Compatible with WordOps, EasyEngine & Plesk
Stars: ✭ 132 (+230%)
Mutual labels:  debian, raspbian
Hardware
The devices I have, what runs on them, their configurations, issues, solutions, and associated projects
Stars: ✭ 67 (+67.5%)
Mutual labels:  debian, raspbian
Tensorflow Bin
Prebuilt binary with Tensorflow Lite enabled (native build). For RaspberryPi / Jetson Nano. And, solved Tensorflow issues #15062,#21574,#21855,#23082,#25120,#25748,#29617,#29704,#30359. Support for custom operations in MediaPipe.
Stars: ✭ 349 (+772.5%)
Mutual labels:  debian, raspbian
raspbian10-buster
Raspbian 10 (Buster) Lite Setup: with Wireguard, Pi-hole, Unbound
Stars: ✭ 54 (+35%)
Mutual labels:  debian, raspbian
Buildswiftonarm
All you need to build Swift on a RaspberryPi or other ARM boards, updated to Swift 5.1.5
Stars: ✭ 448 (+1020%)
Mutual labels:  debian, raspbian
Pihole Panel
Python/GTK3 based Pi-hole (network-level adblocker) dashboard for stats and more
Stars: ✭ 125 (+212.5%)
Mutual labels:  debian, raspbian
anon-hotspot
On demand Debian Linux (Tor) Hotspot setup tool
Stars: ✭ 34 (-15%)
Mutual labels:  debian, raspbian
Raspberrypi Ua Netinst
RaspberryPi (minimal) unattended netinstaller
Stars: ✭ 179 (+347.5%)
Mutual labels:  debian, raspbian
Tmoe Linux
🍭Without any basic knowledge of linux shell,you can easily install and configure a GNU/Linux graphical desktop environment on 📱Android termux and 💻WSL .🍰You can also run VSCode on your android phone.🍹Graphical qemu manager,🐋support running docker on Android.配置WSL和安卓手机的linux容器,桌面环境,主题美化,远程桌面,音频服务,镜像源,uefi开机启动项,webdav(nginx),fcitx输入法以及qemu-system虚拟机...
Stars: ✭ 149 (+272.5%)
Mutual labels:  debian, raspbian
Slickstack
SlickStack is a free LEMP stack automation script written in Bash designed to enhance and simplify WordPress provisioning, performance, and security.
Stars: ✭ 311 (+677.5%)
Mutual labels:  debian, raspbian
TensorFlow-Raspberry-Pi
TensorFlow installation wheels for Raspberry Pi 32-bit OS
Stars: ✭ 18 (-55%)
Mutual labels:  debian, raspbian
airgeddon deb packages
Useful related to airgeddon packages for Debian based Linux distributions
Stars: ✭ 22 (-45%)
Mutual labels:  debian, raspbian
Atomic Toolkit
AtoMiC Toolkit simplifies HTPC / Home Server setup and management on Ubuntu and Debian variants including Raspbian. It currently supports: Couchpotato, Deluged, Emby, FFmpeg, Headphones, Htpcmanager, Jackett, Kodi, Lazylibrarian, Madsonic, Mono, Mylar, Nzbget, Nzbhydra, NzbToMedia, Ombi, Plex, Plexpy, Pyload, qBittorrent, Radarr, Sabnzbd+, Sickgear, Sickrage, Sonarr, Subsonic, Transmission, Unrar, Watcher, and Webmin.
Stars: ✭ 747 (+1767.5%)
Mutual labels:  debian, raspbian
dist-detect
Try to determine what Linux/Unix distribution is running on a remote host and get a hint if security updates are applied.
Stars: ✭ 14 (-65%)
Mutual labels:  debian, raspbian
Dockstarter
DockSTARTer helps you get started with home server apps running in Docker.
Stars: ✭ 1,265 (+3062.5%)
Mutual labels:  debian, raspbian
DSAC
DockSTARTer App Config helps you configure some of your Docker apps!
Stars: ✭ 20 (-50%)
Mutual labels:  debian, raspbian
edi-raspbian
edi configuration for emulated raspbian and raspbian cross compilation.
Stars: ✭ 16 (-60%)
Mutual labels:  debian, raspbian
Pieman
Script for creating custom OS images for single-board computers
Stars: ✭ 149 (+272.5%)
Mutual labels:  debian, raspbian
Bazel bin
Bazel's pre-built binaries for armv7l / aarch64 / x86_64.
Stars: ✭ 23 (-42.5%)
Mutual labels:  debian, raspbian

build-raspbian-image

Builds a minimal Raspbian Stretch image.

Login: root
Password: raspberry

Only a basic Debian with standard networking utilities.

Careful: As an exception openssh-server is pre-installed and will allow root login with the default password. Host keys are generated on first boot.

Downloads

Latest download (Raspbian Stretch): raspbian-20150729.img.zip (263MB)
SHA1: 481a39566af76d942f7a24fc48cb9d5361e0d524
SHA256: 425452d0edaae4f4e21177295bae01d1300b530d00b7278d2b7a947fb27bb1ab
GPG Signature: raspbian-20150729.img.zip.asc

Raspbian Jessie: raspbian-20150214.img.zip (214MB)
SHA1: ad16b80dd8b59eb64d069dda2fdfeb01175e2c74
SHA256: 3067de2bcd29536aaa72a1925febab62490fc973d982f936a3d0b82365658fa5
GPG Signature: raspbian-20150214.img.zip.asc

Dependencies

  • apt-get install vmdebootstrap (at least 0.11 required)
  • apt-get install binfmt-support qemu-user-static
  • apt-get install ca-certificates curl binutils git-core kmod (required by the rpi-update script)
  • apt-get install apt-cacher-ng (or change mirror URLs in bootstrap.sh and customize.sh)

Usage

Run sudo ./bootstrap.sh (root required for loopback device management) to create a fresh raspbian-yyyy-mm-dd.img in the current directory.

Forbid root login

If you boot your Raspberry Pi in a non-trusted environment, you may want to disable login with the default (raspberry) password. To disable passworded root login, add a file named authorized_keys in the config/ folder, which will be copied to /root/.ssh/, and will disable root's password.

Writing the image to an SD card

dd if=raspbian-yyyy-mm-dd.img of=/dev/mmcblk0 bs=1M && sync

Recommended packages

  • Install console-common to select a keyboard layout.

  • Install ntp to automatically synchronize the clock over the network. Without a synchronized clock there may be problems when checking validity and expiration dates of SSL certificates. Also dpkg-reconfigure tzdata to select a time zone.

  • Install locales. Also dpkg-reconfigure locales and select at least one UTF-8 locale to generate.

  • Install iptables for firewall configuration. Sample /etc/network/iptables:

    *filter
    :INPUT DROP [23:2584]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [1161:105847]
    -A INPUT -i lo -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
    -A INPUT -p udp -m udp --dport 5353 -j ACCEPT
    -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    COMMIT
    

    Append pre-up iptables-restore < /etc/network/iptables to /etc/network/interfaces.

  • fail2ban to ban IPs trying too many wrong SSH passwords for some time. Works without any configuration.

  • needrestart, telling you which services to restart after package upgrades.

  • Install cron-apt to automatically look for package updates. Regularly updates the package lists (but does not install anything) if installed without any reconfiguration.

  • Install avahi-daemon to broadcast the device address to the local network using Zeroconf / Bonjour.

Resize the root partition to the SD card

The default image is effectly about 200MB but actually comes with a 2GB root parition. Its likely the the SD card is much bigger.

  1. Boot. Login. fdisk /dev/mmcblk0p1. Delete the partition. Create a new primary ext4 parition.

  2. Reboot.

  3. Login. resize2fs /dev/mmcblk0p1.

Optimize for heavy RAM usage

Add a swapfile

  1. Allocate a continuous file:

    dd if=/dev/zero of=/var/swapfile bs=1M count=512

  2. Create a swap file in there: mkswap /var/swapfile

  3. Append the following line to /etc/fstab to activate it on future boots:

    /var/swapfile none swap sw 0 0

  4. swapon /var/swapfile to activate it right now. swapon -s to show statistics.

Relinquish ramdisks

Remove tmpfs /tmp tmpfs defaults,size=100M 0 0 from /etc/fstab. It makes no sense to have a ramdisk only to swap it to disk anyway.

Optimize for SD card life

Make sure you limit writes to your SD card. /tmp is already mounted as tmpfs (see /etc/fstab). If you do not need logs across reboots you could also mount /var/log as tmpfs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].