{"id":24087133,"url":"https://github.com/0rax/berryos","last_synced_at":"2025-05-05T17:58:37.663Z","repository":{"id":37079739,"uuid":"496440741","full_name":"0rax/BerryOS","owner":"0rax","description":"Lightweight distribution of Raspberry Pi OS configurable headlessly using cloud-init.","archived":false,"fork":false,"pushed_at":"2025-04-22T07:48:43.000Z","size":191,"stargazers_count":14,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-04T23:14:18.321Z","etag":null,"topics":["arm64","armhf","cloud-init","debian","linux","operating-system","raspberry-pi","raspberrypi"],"latest_commit_sha":null,"homepage":"https://berryos.wiki","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0rax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-26T01:19:34.000Z","updated_at":"2025-04-29T18:12:29.000Z","dependencies_parsed_at":"2024-07-21T22:10:06.153Z","dependency_job_id":"b5eceb69-70a5-4f03-817f-87572a69a551","html_url":"https://github.com/0rax/BerryOS","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rax%2FBerryOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rax%2FBerryOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rax%2FBerryOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0rax%2FBerryOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0rax","download_url":"https://codeload.github.com/0rax/BerryOS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252548226,"owners_count":21766130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm64","armhf","cloud-init","debian","linux","operating-system","raspberry-pi","raspberrypi"],"created_at":"2025-01-10T03:02:25.655Z","updated_at":"2025-05-05T17:58:37.644Z","avatar_url":"https://github.com/0rax.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![BerryOS](docs/assets/berryos-banner.png)\n\n## What is BerryOS ?\n\nBerryOS is a lightweight distribution of Raspberry Pi OS, meant to be used as a clean base when configuring a new Raspberry Pi. It focuses on providing a lighter operating system than can be configured headlessly at first boot.\n\nIt was born out of the frustration of not being able to configure Raspberry Pi OS Lite using [`cloud-init`](https://cloud-init.io/) easily and the fact that alternatives such as Ubuntu includes way too many pieces of software by default (such as `snapd` or `unattended-upgrades` which can chew RAM and CPU cycles).\n\n## Overview\n\n### Compatible hardware\n\nBerryOS is available in two variant, a 32-bit version called `BerryOS/armhf` and a 64-bit version called `BerryOS/arm64`. Each image should have the same compatibility as their Raspberry Pi OS counterpart meaning:\n\n- `BerryOS/armhf` should be compatible with ALL Raspberry Pi models\n- `BerryOS/arm64` should be compatible with:\n  - Raspberry Pi 3 B\n  - Raspberry Pi 3 B+\n  - Raspberry Pi 4\n  - Raspberry Pi 400\n  - Raspberry Compute Module 3\n  - Raspberry Compute Module 3 +\n  - Raspberry Compute Module 4\n  - Raspberry Pi Zero 2 W\n  - Raspberry Pi 5\n\nEach release is tested on the following hardware:\n\n- Raspberry Pi 2 B (`armhf`)\n- Raspberry Pi 3 B (`armhf` \u0026 `arm64`)\n- Raspberry Pi 3 B+ (`armhf` \u0026 `arm64`)\n\nDue to its nature, it should also provide the same level of compatibility with 3rd party software and hardware as Raspberry Pi OS.\n\n### Similarities and differences with Raspberry Pi OS Lite\n\nThe goal of the images provided by BerryOS is to provide a similar user experience to Raspberry Pi OS Lite while including as little pre-installed packages as possible and making unattended provisioning possible.\n\nTo do so, BerryOS is bootstrapped from the same base as Raspberry Pi OS Lite with a reduced list of package installed by default and the following changes to the default configuration:\n\n- Addition of [`cloud-init`](https://cloud-init.io/) to handle unattended provisioning at first boot\n- Addition of [`netplan`](https://netplan.io/) to handle Wi-Fi configuration using `cloud-init`\n- `openssh` enabled by default\n- Serial console disabled by default\n- Bluetooth support not configured by default\n- No swapfile configured by default\n- `wpa_supplicant` installed and configured but disabled by default\n- Support for `/boot/config.toml` removed in favor of `cloud-init` (see [#5](https://github.com/0rax/BerryOS/pull/5) and [#15](https://github.com/0rax/BerryOS/pull/15))\n\nOn the other hand, some services have been kept as is from Raspberry Pi such as:\n\n- `fake-hwclock` to emulate a hardware clock by committing current date to disk periodically\n- `rngd` to enable random number generation offloading to the hardware (provided by `rng-tools5`)\n- `systemd-timesyncd` to handle network time synchronization (configurable via `cloud-init`)\n\nIn the end, BerryOS is just a stripped down version of [Raspberry Pi OS Lite (Stage 2)](https://github.com/RPi-Distro/pi-gen/blob/master/README.md#stage-anatomy) with the addition of `cloud-init` \u0026 `netplan`, making it the perfect base to self-host any application your Raspberry Pi.\n\n### Default environment\n\nIf not configured using `/boot/firmware/user-data`, BerryOS will be provisioned using its default configuration, this default environment will include the default user accessible via:\n\n- Username: `pi`\n- Password: `raspberry`\n\nTo follow [the decision made by the Raspberry Pi OS team in April 2022](https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/), access to this default user via SSH will be DISABLED by default. In order to access your system headlessly and configure SSH access, follow the [\"Getting started\" guide](#getting-started) down below.\n\nThis default environment will also try to:\n\n- Enable and configure `eth0` using DHCP\n- Synchronize time with the default NTP pool (`debian.pool.ntp.org`)\n\n## Getting Started\n\n- Download the latest version of BerryOS for your targeted architecture from the [latest release](https://github.com/0rax/BerryOS/releases/latest) and flash it on your SD card using your tool of choice\n- Unplug and re-plug your SD card from your computer to discover newly created partition\n- Open the `user-data` file from the `boot` partition of your SD card with your favorite editor\n- Uncomment `Configure default user access` section and update it to your need\n- We suggest reading through the whole file to see all the possible configuration available before continuing\n- Unmount your SD card, insert it in your Raspberry Pi, plug your Ethernet cable and provide it with power\n- Congratulation, you are now running BerryOS !\n\nA more detailed explanation of most of what can be configured using `cloud-init` is available in [this project documentation](https://berryos.wiki/docs/config/). A set of [example `user-data` file](https://berryos.wiki/docs/examples/) is also available.\n\n## Benchmark\n\nBenchmarked on a Raspberry Pi 3 B+ connected to internet via Ethernet using DHCP running the following commands after first-boot:\n\n- RAM usage: `free -th | mawk '/^Total:/{print $3}'`\n- Running processes: `pstree -Ta` (removing the current user session, i.e: `login -p` \u0026 `systemctl --user` processes)\n- Disk usage: `findmnt -no USED /`\n- Pre-installed packages: `dpkg --get-selections | wc -l`\n\nDownload and image sizes have been calculated using `ls -l --block-size=M`.\n\n### `BerryOS/armhf`\n\n| Stat                   | BerryOS Bookworm (2024.07.21) | RaspiOS Lite Bookworm (2024-07-04) |\n| ---------------------- | ----------------------------- | ---------------------------------- |\n| RAM usage              | 99M                           | 110M                               |\n| Running processes      | 10                            | 16                                 |\n| Disk usage             | 880M                          | 1.7G                               |\n| Pre-installed packages | 333                           | 603                                |\n| Download size          | 361M                          | 500M                               |\n| Image size             | 1344M                         | 2512M                              |\n\n### `BerryOS/arm64`\n\n| Stat                   | BerryOS Bookworm (2024.07.21) | RaspiOS Lite Bookworm (2024-07-04) |\n| ---------------------- | ----------------------------- | ---------------------------------- |\n| RAM usage              | 116M                          | 131M                               |\n| Running processes      | 10                            | 16                                 |\n| Disk usage             | 856M                          | 1.8G                               |\n| Pre-installed packages | 310                           | 590                                |\n| Download size          | 288M                          | 432M                               |\n| Image size             | 1296M                         | 2704M                              |\n\n## Acknowledgements\n\nThis project has been heavily inspired by the work previously done by the team at [Hypriot](https://github.com/hypriot) for their HypriotOS. It was the starting point of this project and this project wouldn't exist without it.\n\nThe [RPi-Distro/pi-gen](https://github.com/RPi-Distro/pi-gen), [RPi-Distro/raspi-config](https://github.com/RPi-Distro/raspi-config) \u0026 [RPi-Distro/raspberrypi-sys-mods](https://github.com/RPi-Distro/raspberrypi-sys-mods/) projects have also been very helpful when tackling some hardware specific issues and optimizing image creation.\n\nTo the team responsible for those great pieces of software, thank you !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0rax%2Fberryos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0rax%2Fberryos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0rax%2Fberryos/lists"}