mirror of
https://github.com/johndoe6345789/SparkOS.git
synced 2026-04-24 13:34:56 +00:00
3.8 KiB
3.8 KiB
BusyBox Verification in SparkOS
This document demonstrates how SparkOS verifies that BusyBox is being used.
Docker Container Verification
When you run the SparkOS Docker container, it automatically verifies BusyBox installation and functionality:
docker run --rm ghcr.io/johndoe6345789/sparkos:latest
Expected Output
The container startup will display comprehensive BusyBox verification:
SparkOS Docker Test Environment
================================
Verifying BusyBox...
-------------------
✓ BusyBox is installed
BusyBox version:
BusyBox v1.36.1 (Alpine Linux) multi-call binary.
BusyBox location:
/bin/busybox
-rwxr-xr-x 1 root root 1.2M Dec 29 19:00 /bin/busybox
Shell (/bin/sh) is BusyBox:
lrwxrwxrwx 1 root root 12 Dec 29 19:00 /bin/sh -> /bin/busybox
→ /bin/sh is a symlink to: /bin/busybox
Available BusyBox applets (sample):
[
[[
acpid
addgroup
adduser
adjtimex
ar
arch
arp
arping
ash
awk
... and 300+ total applets
Networking applets (required for SparkOS):
✓ udhcpc
✓ ip
✓ ifconfig
✓ ping
✓ wget
Verifying SparkOS init binary...
--------------------------------
✓ Init binary exists
-rwxr-xr-x 1 root root 18.2K Dec 29 19:00 /sparkos/rootfs/sbin/init
File type:
/sparkos/rootfs/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked
Dependencies:
Static binary (no dependencies)
Root filesystem structure:
--------------------------
total 28
drwxr-xr-x 7 root root 4096 Dec 29 19:00 .
drwxr-xr-x 1 root root 4096 Dec 29 19:00 ..
drwxr-xr-x 2 root root 4096 Dec 29 19:00 bin
drwxr-xr-x 2 root root 4096 Dec 29 19:00 etc
drwxr-xr-x 3 root root 4096 Dec 29 19:00 home
drwxr-xr-x 2 root root 4096 Dec 29 19:00 sbin
drwxr-xr-x 2 root root 4096 Dec 29 19:00 usr
================================
✓ SparkOS is ready for testing!
================================
Summary:
- BusyBox: BusyBox v1.36.1 (Alpine Linux) multi-call binary.
- Init: Custom SparkOS init system
- Shell: BusyBox sh (/bin/sh)
- Networking: BusyBox udhcpc, ip, ping, wget
To test the init system:
docker run --rm <image> /sparkos/rootfs/sbin/init --help
What This Proves
The verification output demonstrates:
- BusyBox is installed: Shows version and location
- Shell is BusyBox:
/bin/shis a symlink to/bin/busybox - Multiple utilities available: 300+ BusyBox applets (commands)
- Networking support: All required networking tools are present (udhcpc, ip, ifconfig, ping, wget)
- Custom init system: SparkOS init binary is statically compiled and ready
Key BusyBox Features Used by SparkOS
- Shell:
sh(BusyBox ash shell) - Networking:
udhcpc- DHCP client for automatic IP configurationip/ifconfig- Network interface configurationping- Network connectivity testingwget- File downloading
- Core utilities:
ls,cat,mkdir,rm,cp,mount, etc. - System utilities: Over 300 common Linux commands in a single binary
Alpine Linux and BusyBox
SparkOS uses Alpine Linux as its Docker base image, which includes BusyBox by default. This provides:
- Minimal footprint: Entire system in ~5MB
- Security: Minimal attack surface with fewer packages
- Performance: Fast startup and low memory usage
- Completeness: All essential utilities in one binary
Verification in Code
The verification is performed by /sparkos/test.sh which:
- Checks if
busyboxcommand is available - Displays version information
- Lists all available applets
- Verifies critical networking applets
- Confirms init binary is present and correct
This ensures that anyone running the SparkOS Docker container can immediately see proof that BusyBox is being used as advertised.