Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hypersolid-os/hypersolid
deploy an os like an app - embedded debian builder with merged squasfhs+tmpfs+overlayfs
https://github.com/hypersolid-os/hypersolid
debian debian-linux embedded embedded-linux linux-distribution overlayfs raspberry-pi-zero squashfs tmpfs
Last synced: 2 months ago
JSON representation
deploy an os like an app - embedded debian builder with merged squasfhs+tmpfs+overlayfs
- Host: GitHub
- URL: https://github.com/hypersolid-os/hypersolid
- Owner: hypersolid-os
- License: gpl-2.0
- Created: 2018-10-07T15:41:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-29T09:46:45.000Z (6 months ago)
- Last Synced: 2024-09-29T02:40:54.347Z (3 months ago)
- Topics: debian, debian-linux, embedded, embedded-linux, linux-distribution, overlayfs, raspberry-pi-zero, squashfs, tmpfs
- Language: Shell
- Homepage: http://hypersolid.org
- Size: 2.45 MB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.txt
Awesome Lists containing this project
README
hypersolid
=====================================================**build a custom debian image with multistrap into a single squasfs-file with tmpfs overlay**
> **NOTE:** this buildsystem is targeted to advanced/professional users with a several years of experience with linux/debian/docker only!
>
> **DO NOT USE THIS SYSTEM/IMAGES AS BEGINNER**Features
--------------------* **3 File - full featured - Debian Linux**
* Build a full customized debian image from scratch
* Multistrap based bootstrapping
* rootfs wrapped into single squashfs file
* [Immutable filesystem](docs/filesystem.md) (squashfs base with tmpfs overlay via overlayfs)
* [Persistent storage](docs/filesystem.md#persistent-storage) option (additional overlayfs base)
* Build environment is isolated within a `systemd-nspawn` container
* Minimal system including systemd and networking
* Multiple build hooks to run custom scripts during build process
* Hooks for setup/signing/deployment tasks
* Initramfs creation
* CLI mode (no GUI)Devices / Use Cases
--------------------Create highly customizable and fully immutable images for:
* Bare metal servers
* Cloud servers
* Workstations
* Fat-clients / thin-clients
* IoT devices
* Firewall/Networkworking equipment
* Embedded SystemsTarget platforms
--------------------* Generic baremetal systems - multiarch
* Generic virtualized maschines (kvm/quemu) - multiarch**embedded**
* [Raspberry PI Zero W](docs/raspberry-pi.md)
* [Raspberry PI 3+4](docs/raspberry-pi.md)Build System Requirements
--------------------* Debian Linux based Host System
* Host System with enabled `binfmt-support` (for qemu armel emulation)
* Active Internet connection to fetch the packages or local package server
* Recommended: apt-cacher-ng within your network or hostsystem
* `sudo` to run `systemd-nspawn` as user
* `~450MB` disk space for the build system
* `~5GB` disk space for the target system### Build System Dependencies ###
```bash
apt-get install sudo systemd-container multistrap binfmt-support qemu-user-static
```### sudo for systemd-nspawn ###
```bash
# create group with sudo access to systemd-nspawn
groupadd nspawn# assign group to your build user
usermod -a -G nspawn myBuildUser
```**File** `/etc/sudoers.d/nspawn`
```
%nspawn ALL=(root) NOPASSWD:/usr/bin/systemd-nspawn
```Usage
--------------------Run `hypersolid.sh build `
**Build**
```bash
$ ./hypersolid build targets/raspberrypi-zero-w/
```How it works
--------------------1. An isolated debian environment it created in `/tmp/hypersolid-env` via [multistrap](https://wiki.debian.org/Multistrap)
2. The build content (rootfs, scripts, multistrap config) is copied into `/tmp/hypersolid-env/build/*`
3. **STAGE-1** multistrap is invoked within the build-env to build the base system in `/build/target` | systemd-nspawn in ``
4. **STAGE-2** package configuration `dpkg --configure` is executed within the target environment | systemd-nspawn in `/build/target`
5. **STAGE-3** squashfs/cpio images are created and kernel+initramfs are copied into `/build/dist` | systemd-nspawn in ``### Directories ###
* `/tmp/hypersolid-env` - the isolated build system
* `/build/rootfs` - merged rootfs (hypersolid generic + target)
* `/build/target` - the multistrap chroot containing the final system
* `/build/dist` - output directory including the kernel+initramfs+system image and optional fileLicense
-------**hypersolid** is OpenSource and licensed under the Terms of [GNU General Public Licence v2](LICENSE.txt). You're welcome to [contribute](CONTRIBUTE.md)!