Complete Phase 1 implementation of KubeSolo OS — an immutable, bootable Linux distribution built on Tiny Core Linux for running KubeSolo single-node Kubernetes. Build system: - Makefile with fetch, rootfs, initramfs, iso, disk-image targets - Dockerfile.builder for reproducible builds - Scripts to download Tiny Core, extract rootfs, inject KubeSolo, pack initramfs, and create bootable ISO/disk images Init system (10 POSIX sh stages): - Early mount (proc/sys/dev/cgroup2), cmdline parsing, persistent mount with bind-mounts, kernel module loading, sysctl, DHCP networking, hostname, clock sync, containerd prep, KubeSolo exec Shared libraries: - functions.sh (device wait, IP lookup, config helpers) - network.sh (static IP, config persistence, interface detection) - health.sh (containerd, API server, node readiness checks) - Emergency shell for boot failure debugging Testing: - QEMU boot test with serial log marker detection - K8s readiness test with kubectl verification - Persistence test (reboot + verify state survives) - Workload deployment test (nginx pod) - Local storage test (PVC + local-path provisioner) - Network policy test - Reusable run-vm.sh launcher Developer tools: - dev-vm.sh (interactive QEMU with port forwarding) - rebuild-initramfs.sh (fast iteration) - inject-ssh.sh (dropbear SSH for debugging) - extract-kernel-config.sh + kernel-audit.sh Documentation: - Full design document with architecture research - Boot flow documentation covering all 10 init stages - Cloud-init examples (DHCP, static IP, Portainer Edge, air-gapped) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
680 B
Bash
Executable File
29 lines
680 B
Bash
Executable File
#!/bin/sh
|
|
# 30-kernel-modules.sh — Load required kernel modules for K8s
|
|
|
|
MODULES_LIST="/usr/lib/kubesolo-os/modules.list"
|
|
|
|
if [ ! -f "$MODULES_LIST" ]; then
|
|
log_warn "No modules list found at $MODULES_LIST"
|
|
return 0
|
|
fi
|
|
|
|
LOADED=0
|
|
FAILED=0
|
|
|
|
while IFS= read -r mod; do
|
|
# Skip comments and blank lines
|
|
case "$mod" in
|
|
'#'*|'') continue ;;
|
|
esac
|
|
mod="$(echo "$mod" | tr -d '[:space:]')"
|
|
if modprobe "$mod" 2>/dev/null; then
|
|
LOADED=$((LOADED + 1))
|
|
else
|
|
log_warn "Failed to load module: $mod (may be built-in)"
|
|
FAILED=$((FAILED + 1))
|
|
fi
|
|
done < "$MODULES_LIST"
|
|
|
|
log_ok "Loaded $LOADED modules ($FAILED failed/built-in)"
|