diff --git a/.gitignore b/.gitignore index 5f72659..3b495cf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,105 @@ build/ *.img *.tar.xz *.tar.bz2 -rootfs/bin/ -rootfs/sbin/ -rootfs/lib/ +rootfs-busybox/ + +# Debian rootfs — only track our custom configs, not binaries +# usrmerge symlinks (files, not dirs — no trailing slash) +rootfs/bin +rootfs/sbin +rootfs/lib +rootfs/lib64 +# Directory ignores +rootfs/usr/ +rootfs/var/ rootfs/dev/ -!rootfs/bin/.gitkeep +rootfs/proc/ +rootfs/sys/ +rootfs/tmp/ +rootfs/run/ +rootfs/root/ +rootfs/etc/alternatives/ +rootfs/etc/apparmor.d/ +rootfs/etc/apt/ +rootfs/etc/cron.d/ +rootfs/etc/cron.daily/ +rootfs/etc/default/ +rootfs/etc/dhcp/ +rootfs/etc/dpkg/ +rootfs/etc/init.d/ +rootfs/etc/iproute2/ +rootfs/etc/ld.so.conf.d/ +rootfs/etc/logrotate.d/ +rootfs/etc/modules-load.d/ +rootfs/etc/network/ +rootfs/etc/pam.d/ +rootfs/etc/profile.d/ +rootfs/etc/rc*.d/ +rootfs/etc/rcS.d/ +rootfs/etc/security/ +rootfs/etc/selinux/ +rootfs/etc/skel/ +rootfs/etc/ssl/ +rootfs/etc/sudoers.d/ +rootfs/etc/sysctl.d/ +rootfs/etc/systemd/system/getty.target.wants/ +rootfs/etc/systemd/system/multi-user.target.wants/ +rootfs/etc/terminfo/ +rootfs/etc/udev/ +rootfs/etc/update-motd.d/ +rootfs/etc/xdg/ +rootfs/etc/*.conf +rootfs/etc/*.bak +rootfs/etc/adduser.conf +rootfs/etc/bindresvport.blacklist +rootfs/etc/ca-certificates.conf +rootfs/etc/debconf.conf +rootfs/etc/debian_version +rootfs/etc/deluser.conf +rootfs/etc/environment +rootfs/etc/ethertypes +rootfs/etc/gai.conf +rootfs/etc/group +rootfs/etc/group- +rootfs/etc/gshadow +rootfs/etc/gshadow- +rootfs/etc/host.conf +rootfs/etc/hosts +rootfs/etc/issue.net +rootfs/etc/ld.so.cache +rootfs/etc/ld.so.conf +rootfs/etc/libaudit.conf +rootfs/etc/login.defs +rootfs/etc/machine-id +rootfs/etc/mke2fs.conf +rootfs/etc/modules +rootfs/etc/mtab +rootfs/etc/netconfig +rootfs/etc/networks +rootfs/etc/nsswitch.conf +rootfs/etc/pam.conf +rootfs/etc/passwd +rootfs/etc/passwd- +rootfs/etc/profile +rootfs/etc/protocols +rootfs/etc/rmt +rootfs/etc/rpc +rootfs/etc/services +rootfs/etc/shadow +rootfs/etc/shadow- +rootfs/etc/shells +rootfs/etc/subgid +rootfs/etc/subuid +rootfs/etc/sudo.conf +rootfs/etc/sudo_logsrvd.conf +rootfs/etc/sudoers +rootfs/etc/sysctl.conf +rootfs/etc/timezone +rootfs/etc/wgetrc +rootfs/etc/xattr.conf +rootfs/etc/.pwd.lock +rootfs/etc/bash.bashrc +rootfs/etc/bash_completion +rootfs/etc/e2scrub.conf +rootfs/etc/issue + diff --git a/Makefile b/Makefile index d706001..8c3d70d 100644 --- a/Makefile +++ b/Makefile @@ -2,21 +2,20 @@ # Produces a bootable image for Raspberry Pi 5 NOVA_ROOT := $(dir $(lastword $(MAKEFILE_LIST))) -BUILD_DIR := $(NOVA_ROOT)build -ROOTFS := $(NOVA_ROOT)rootfs -BOOT := $(NOVA_ROOT)boot -IMAGE := $(NOVA_ROOT)nova-os-1.0-starlight.img -SIZE_MB := 1024 +BUILD_DIR := $(NOVA_ROOT)build +ROOTFS := $(NOVA_ROOT)rootfs +BOOT := $(NOVA_ROOT)boot +IMAGE := $(NOVA_ROOT)nova-os-2.0-systemd.img KERNEL_DIR := $(BUILD_DIR)/linux-7.0.12 -BUSYBOX_DIR := $(BUILD_DIR)/busybox-1.36.1 -ARCH := arm64 -CROSS := aarch64-linux-gnu- +ARCH := arm64 +CROSS := aarch64-linux-gnu- -.PHONY: all kernel busybox rootfs image clean +.PHONY: all kernel rootfs image clean -all: kernel busybox rootfs image - @echo "Nova OS build complete: $(IMAGE)" +all: kernel image + @echo "✦ Nova OS build complete: $(IMAGE)" + @echo "Flash: sudo dd if=$(IMAGE) of=/dev/mmcblk0 bs=4M status=progress" kernel: cd $(KERNEL_DIR) && \ @@ -25,27 +24,13 @@ kernel: ARCH=$(ARCH) CROSS_COMPILE=$(CROSS) make olddefconfig && \ ARCH=$(ARCH) CROSS_COMPILE=$(CROSS) make -j4 Image modules dtbs -busybox: - cd $(BUSYBOX_DIR) && \ - make defconfig && \ - sed -i 's/^# CONFIG_STATIC is not set/CONFIG_STATIC=y/' .config && \ - make -j4 && \ - make CONFIG_PREFIX=$(ROOTFS) install - rootfs: - cp $(NOVA_ROOT)init $(ROOTFS)/init - chmod +x $(ROOTFS)/init - chmod +x $(ROOTFS)/etc/init.d/rcS - mkdir -p $(ROOTFS)/proc $(ROOTFS)/sys $(ROOTFS)/dev $(ROOTFS)/tmp $(ROOTFS)/run + @echo "Rootfs is built via debootstrap. See README.md for instructions." + @echo "Pre-built rootfs at $(ROOTFS)/" image: - dd if=/dev/zero of=$(IMAGE) bs=1M count=$(SIZE_MB) - parted -s $(IMAGE) mklabel msdos - parted -s $(IMAGE) mkpart primary fat32 1MiB 257MiB - parted -s $(IMAGE) mkpart primary ext4 257MiB 100% - @echo "Image created. Flash to SD: dd if=$(IMAGE) of=/dev/mmcblkX bs=4M" + bash $(NOVA_ROOT)mkimage.sh clean: rm -f $(IMAGE) cd $(KERNEL_DIR) && make clean - cd $(BUSYBOX_DIR) && make clean diff --git a/README.md b/README.md index 6db403f..4777ab6 100644 --- a/README.md +++ b/README.md @@ -2,41 +2,59 @@ **Burn bright, run light.** -A minimalist Linux distribution built from the latest mainline kernel and busybox userspace. Designed for the Raspberry Pi 5, Nova OS strips away everything unnecessary — no systemd, no package manager, no bloat. Just the kernel, a shell, and you. +A lightweight Linux distribution built from the latest mainline kernel and a minimal Debian userspace. Designed for the Raspberry Pi 5, Nova OS pairs a custom-compiled kernel with systemd for modern init and service management — keeping things small but capable. ``` - ╔══════════════════════════════════════╗ - ║ N O V A O S ║ - ║ kernel 7.0.12-nova-os ║ - ║ "Burn bright, run light." ║ - ╚══════════════════════════════════════╝ + ╔══════════════════════════════════════════╗ + ║ N O V A O S ║ + ║ kernel 7.0.12-nova-os ║ + ║ "Burn bright, run light." ║ + ╚══════════════════════════════════════════╝ ``` ## Specifications -| Component | Version | -|-------------|--------------------| -| Kernel | Linux 7.0.12-nova-os | -| Userspace | BusyBox 1.36.1 | -| Shell | ash (busybox) | -| Init | Custom (busybox init)| -| Architecture | aarch64 (ARM64) | -| Target | Raspberry Pi 5 | -| Image size | ~1 GB | +| Component | Version | +|-------------|----------------------| +| Kernel | Linux 7.0.12-nova-os | +| Userspace | Debian Bookworm (minbase) | +| Init | systemd 252 | +| Shell | bash | +| Architecture | aarch64 (ARM64) | +| Target | Raspberry Pi 5 (BCM2712) | +| Image size | ~1.5 GB | + +## v2.0 — What Changed + +- **systemd replaces BusyBox init** — proper service management, cgroups, socket activation +- **Debian minbase userspace** — apt-ready, 344MB rootfs +- **systemd-networkd** — DHCP networking out of the box +- **systemd-resolved** — DNS resolution +- **Nova splash service** — boot banner on tty1 +- **Root password:** `nova` (change on first login) ## Build from Source ```bash -make all # Build kernel + busybox + rootfs + image -make kernel # Build only the kernel -make busybox # Build only busybox -make image # Package into bootable .img +make kernel # Build the kernel (45 min on Pi 5) +make image # Package into bootable .img (requires sudo) +make all # Kernel + image +``` + +The rootfs is pre-built via debootstrap. To rebuild it: + +```bash +sudo apt-get install debootstrap +sudo debootstrap --arch=arm64 --variant=minbase \ + --include=systemd,systemd-sysv,udev,dbus,apt,kmod,netbase \ + bookworm rootfs http://deb.debian.org/debian +# Then customize: hostname, os-release, splash service, networking ``` ## Flash to SD Card ```bash -sudo dd if=nova-os-1.0-starlight.img of=/dev/mmcblk0 bs=4M status=progress +sudo dd if=nova-os-2.0-systemd.img of=/dev/mmcblk0 bs=4M status=progress ``` ## Directory Layout @@ -47,19 +65,19 @@ nova-os/ ├── boot/ # Boot partition files │ ├── config.txt # Pi bootloader config │ └── cmdline.txt # Kernel command line -├── rootfs/ # Root filesystem -│ ├── init # Init script -│ └── etc/ # Config files -│ ├── issue # Pre-login banner -│ ├── motd # Post-login banner -│ ├── hostname # "nova-os" -│ ├── os-release # OS identity -│ ├── fstab # Mount table -│ ├── inittab # Init table -│ └── profile # Shell config +├── rootfs/ # Debian minbase + systemd rootfs +│ ├── bin/ # Essential binaries +│ ├── sbin/ # System binaries +│ │ └── init → /lib/systemd/systemd +│ ├── etc/ +│ │ ├── systemd/ # systemd config + services +│ │ ├── hostname # "nova-os" +│ │ ├── os-release # OS identity +│ │ ├── motd # Login banner +│ │ └── fstab # Mount table +│ └── lib/systemd/ # systemd itself └── build/ # Build artifacts - ├── linux-7.0.12/ - └── busybox-1.36.1/ + └── linux-7.0.12/ # Kernel source + build ``` ## License diff --git a/mkimage.sh b/mkimage.sh index afc83e6..7769c7a 100755 --- a/mkimage.sh +++ b/mkimage.sh @@ -5,7 +5,7 @@ set -e NOVA_ROOT="/home/joe/nova-os" -IMAGE="$NOVA_ROOT/nova-os-1.0-starlight.img" +IMAGE="$NOVA_ROOT/nova-os-2.0-systemd.img" SIZE_MB=1536 # 1.5 GB TMP_MNT="/tmp/nova-os-mnt" @@ -75,8 +75,7 @@ echo "✓ Boot partition ready" # Copy rootfs echo "==> Copying root filesystem..." sudo cp -a "$NOVA_ROOT/rootfs/"* "$TMP_MNT/root/" -sudo chmod 755 "$TMP_MNT/root/init" -echo "✓ Root filesystem ready" +echo "✓ Root filesystem ready (systemd $(sudo chroot "$TMP_MNT/root" systemd --version 2>/dev/null | head -1 | awk '{print $2}'))" # Unmount echo "==> Unmounting..." diff --git a/rootfs/etc/fstab b/rootfs/etc/fstab index 8cfeb0a..4f23f5a 100644 --- a/rootfs/etc/fstab +++ b/rootfs/etc/fstab @@ -1,5 +1,4 @@ -Nova OS /dev/mmcblk0p2 / ext4 defaults,noatime 0 1 -proc /proc proc defaults 0 0 -sysfs /sys sysfs defaults 0 0 -devtmpfs /dev devtmpfs defaults 0 0 -tmpfs /tmp tmpfs defaults 0 0 +# Nova OS fstab +/dev/mmcblk0p2 / ext4 defaults,noatime 0 1 +/dev/mmcblk0p1 /boot vfat defaults,noatime 0 2 +tmpfs /tmp tmpfs defaults,noatime 0 0 diff --git a/rootfs/etc/hostname b/rootfs/etc/hostname index 4a4c015..a6c2440 100644 --- a/rootfs/etc/hostname +++ b/rootfs/etc/hostname @@ -1 +1 @@ -Nova OS +nova-os diff --git a/rootfs/etc/init.d/rcS b/rootfs/etc/init.d/rcS deleted file mode 100755 index c10c23f..0000000 --- a/rootfs/etc/init.d/rcS +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# Nova OS rcS — early boot - -echo "Nova OS booting..." - -mount -t proc proc /proc -mount -t sysfs sysfs /sys -mount -t devtmpfs devtmpfs /dev -mount -t tmpfs tmpfs /tmp -mount -t tmpfs tmpfs /run - -mdev -s -hostname nova-os diff --git a/rootfs/etc/inittab b/rootfs/etc/inittab deleted file mode 100644 index b567dcc..0000000 --- a/rootfs/etc/inittab +++ /dev/null @@ -1,7 +0,0 @@ -# Nova OS inittab -::sysinit:/etc/init.d/rcS -::sysinit:/bin/hostname -F /etc/hostname -::respawn:/sbin/getty 38400 tty1 -::respawn:/sbin/getty 38400 ttyAMA0 -::ctrlaltdel:/sbin/reboot -::shutdown:/bin/umount -a -r diff --git a/rootfs/etc/issue b/rootfs/etc/issue index d9474f1..d0506b2 100644 --- a/rootfs/etc/issue +++ b/rootfs/etc/issue @@ -1,4 +1,2 @@ -Nova OS 1.0 "Starlight" — Linux 7.0.12-nova-os -Burn bright, run light. +Debian GNU/Linux 12 \n \l -https://github.com/blazblue547-afk/nova-os diff --git a/rootfs/etc/localtime b/rootfs/etc/localtime new file mode 120000 index 0000000..9db6c38 --- /dev/null +++ b/rootfs/etc/localtime @@ -0,0 +1 @@ +/usr/share/zoneinfo/America/New_York \ No newline at end of file diff --git a/rootfs/etc/motd b/rootfs/etc/motd index ec06b1a..35ad07b 100644 --- a/rootfs/etc/motd +++ b/rootfs/etc/motd @@ -1,17 +1,10 @@ - ╔══════════════════════════════════════╗ - ║ N O V A O S ║ - ║ kernel 7.0.12-nova-os ║ - ║ \"Burn bright, run light.\" ║ - ╚══════════════════════════════════════╝ + ╔══════════════════════════════════════════╗ + ║ N O V A O S ║ + ║ kernel 7.0.12-nova-os ║ + ║ "Burn bright, run light." ║ + ╚══════════════════════════════════════════╝ + + Powered by systemd · Debian Bookworm + GitHub: https://github.com/blazblue547-afk/nova-os -Welcome to Nova OS — a lightweight, blazing fast Linux distribution -built from the latest mainline kernel and busybox userspace. - - • Kernel: Linux 7.0.12-nova-os - • Arch: aarch64 (ARM64) - • Shell: busybox ash - • Init: custom (minimal) - • Target: Raspberry Pi 5 - -Type 'help' for available commands. diff --git a/rootfs/etc/nova-splash.sh b/rootfs/etc/nova-splash.sh new file mode 100755 index 0000000..c409d83 --- /dev/null +++ b/rootfs/etc/nova-splash.sh @@ -0,0 +1,9 @@ +#!/bin/bash +echo "" +echo " ╔══════════════════════════════════════════╗" +echo " ║ N O V A O S ║" +echo " ║ kernel $(uname -r) ║" +echo " ║ "Burn bright, run light." ║" +echo " ║ systemd $(systemctl --version | head -1 | awk '{print $2}') ║" +echo " ╚══════════════════════════════════════════╝" +echo "" diff --git a/rootfs/etc/os-release b/rootfs/etc/os-release deleted file mode 100644 index 0b234d8..0000000 --- a/rootfs/etc/os-release +++ /dev/null @@ -1,7 +0,0 @@ -NAME="Nova OS" -VERSION="1.0 (Starlight)" -ID=nova-os -VERSION_ID=1.0 -PRETTY_NAME="Nova OS 1.0 Starlight" -HOME_URL="https://github.com/blazblue547-afk/nova-os" -KERNEL="Linux 7.0.12-nova-os" diff --git a/rootfs/etc/os-release b/rootfs/etc/os-release new file mode 120000 index 0000000..c4c75b4 --- /dev/null +++ b/rootfs/etc/os-release @@ -0,0 +1 @@ +../usr/lib/os-release \ No newline at end of file diff --git a/rootfs/etc/profile b/rootfs/etc/profile index e2d88f8..de64c87 100644 --- a/rootfs/etc/profile +++ b/rootfs/etc/profile @@ -1,15 +1,34 @@ -# -# Nova OS shell profile -# +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). -# Set prompt -export PS1='\e[1;36mnova-os\e[0m:\e[1;35m\w\e[0m# ' +if [ "$(id -u)" -eq 0 ]; then + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +else + PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" +fi +export PATH -# Aliases -alias ls='ls --color=auto' -alias ll='ls -la' -alias nova='cat /etc/motd' +if [ "${PS1-}" ]; then + if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then + # The file bash.bashrc already sets the default PS1. + # PS1='\h:\w\$ ' + if [ -f /etc/bash.bashrc ]; then + . /etc/bash.bashrc + fi + else + if [ "$(id -u)" -eq 0 ]; then + PS1='# ' + else + PS1='$ ' + fi + fi +fi -# Welcome -cat /etc/issue -echo "" +if [ -d /etc/profile.d ]; then + for i in /etc/profile.d/*.sh; do + if [ -r $i ]; then + . $i + fi + done + unset i +fi diff --git a/rootfs/etc/resolv.conf b/rootfs/etc/resolv.conf new file mode 120000 index 0000000..3639662 --- /dev/null +++ b/rootfs/etc/resolv.conf @@ -0,0 +1 @@ +/run/systemd/resolve/stub-resolv.conf \ No newline at end of file diff --git a/rootfs/etc/systemd/journald.conf b/rootfs/etc/systemd/journald.conf new file mode 100644 index 0000000..a690681 --- /dev/null +++ b/rootfs/etc/systemd/journald.conf @@ -0,0 +1,47 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the journald.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# Use 'systemd-analyze cat-config systemd/journald.conf' to display the full config. +# +# See journald.conf(5) for details. + +[Journal] +#Storage=auto +#Compress=yes +#Seal=yes +#SplitMode=uid +#SyncIntervalSec=5m +#RateLimitIntervalSec=30s +#RateLimitBurst=10000 +#SystemMaxUse= +#SystemKeepFree= +#SystemMaxFileSize= +#SystemMaxFiles=100 +#RuntimeMaxUse= +#RuntimeKeepFree= +#RuntimeMaxFileSize= +#RuntimeMaxFiles=100 +#MaxRetentionSec= +#MaxFileSec=1month +#ForwardToSyslog=yes +#ForwardToKMsg=no +#ForwardToConsole=no +#ForwardToWall=yes +#TTYPath=/dev/console +#MaxLevelStore=debug +#MaxLevelSyslog=debug +#MaxLevelKMsg=notice +#MaxLevelConsole=info +#MaxLevelWall=emerg +#LineMax=48K +#ReadKMsg=yes +#Audit=no diff --git a/rootfs/etc/systemd/logind.conf b/rootfs/etc/systemd/logind.conf new file mode 100644 index 0000000..a4e8125 --- /dev/null +++ b/rootfs/etc/systemd/logind.conf @@ -0,0 +1,49 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the logind.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config. +# +# See logind.conf(5) for details. + +[Login] +#NAutoVTs=6 +#ReserveVT=6 +#KillUserProcesses=no +#KillOnlyUsers= +#KillExcludeUsers=root +#InhibitDelayMaxSec=5 +#UserStopDelaySec=10 +#HandlePowerKey=poweroff +#HandlePowerKeyLongPress=ignore +#HandleRebootKey=reboot +#HandleRebootKeyLongPress=poweroff +#HandleSuspendKey=suspend +#HandleSuspendKeyLongPress=hibernate +#HandleHibernateKey=hibernate +#HandleHibernateKeyLongPress=ignore +#HandleLidSwitch=suspend +#HandleLidSwitchExternalPower=suspend +#HandleLidSwitchDocked=ignore +#PowerKeyIgnoreInhibited=no +#SuspendKeyIgnoreInhibited=no +#HibernateKeyIgnoreInhibited=no +#LidSwitchIgnoreInhibited=yes +#RebootKeyIgnoreInhibited=no +#HoldoffTimeoutSec=30s +#IdleAction=ignore +#IdleActionSec=30min +#RuntimeDirectorySize=10% +#RuntimeDirectoryInodesMax= +#RemoveIPC=yes +#InhibitorsMax=8192 +#SessionsMax=8192 +#StopIdleSessionSec=infinity diff --git a/rootfs/etc/systemd/network/20-wired.network b/rootfs/etc/systemd/network/20-wired.network new file mode 100644 index 0000000..e871c69 --- /dev/null +++ b/rootfs/etc/systemd/network/20-wired.network @@ -0,0 +1,5 @@ +[Match] +Name=eth0 + +[Network] +DHCP=yes diff --git a/rootfs/etc/systemd/networkd.conf b/rootfs/etc/systemd/networkd.conf new file mode 100644 index 0000000..38dc9f1 --- /dev/null +++ b/rootfs/etc/systemd/networkd.conf @@ -0,0 +1,28 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the networkd.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# See networkd.conf(5) for details. + +[Network] +#SpeedMeter=no +#SpeedMeterIntervalSec=10sec +#ManageForeignRoutingPolicyRules=yes +#ManageForeignRoutes=yes +#RouteTable= + +[DHCPv4] +#DUIDType=vendor +#DUIDRawData= + +[DHCPv6] +#DUIDType=vendor +#DUIDRawData= diff --git a/rootfs/etc/systemd/pstore.conf b/rootfs/etc/systemd/pstore.conf new file mode 100644 index 0000000..68fb04a --- /dev/null +++ b/rootfs/etc/systemd/pstore.conf @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the pstore.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# See pstore.conf(5) for details. + +[PStore] +#Storage=external +#Unlink=yes diff --git a/rootfs/etc/systemd/resolved.conf b/rootfs/etc/systemd/resolved.conf new file mode 100644 index 0000000..2c52f2a --- /dev/null +++ b/rootfs/etc/systemd/resolved.conf @@ -0,0 +1,34 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the resolved.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config. +# +# See resolved.conf(5) for details. + +[Resolve] +# Some examples of DNS servers which may be used for DNS= and FallbackDNS=: +# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com +# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google +# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net +#DNS= +#FallbackDNS= +#Domains= +#DNSSEC=no +#DNSOverTLS=no +#MulticastDNS=yes +#LLMNR=yes +#Cache=yes +#CacheFromLocalhost=no +#DNSStubListener=yes +#DNSStubListenerExtra= +#ReadEtcHosts=yes +#ResolveUnicastSingleLabel=no diff --git a/rootfs/etc/systemd/sleep.conf b/rootfs/etc/systemd/sleep.conf new file mode 100644 index 0000000..4c8e8b9 --- /dev/null +++ b/rootfs/etc/systemd/sleep.conf @@ -0,0 +1,27 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the sleep.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# See systemd-sleep.conf(5) for details. + +[Sleep] +#AllowSuspend=yes +#AllowHibernation=yes +#AllowSuspendThenHibernate=yes +#AllowHybridSleep=yes +#SuspendMode= +#SuspendState=mem standby freeze +#HibernateMode=platform shutdown +#HibernateState=disk +#HybridSleepMode=suspend platform shutdown +#HybridSleepState=disk +#HibernateDelaySec= +#SuspendEstimationSec=60min diff --git a/rootfs/etc/systemd/system.conf b/rootfs/etc/systemd/system.conf new file mode 100644 index 0000000..acace23 --- /dev/null +++ b/rootfs/etc/systemd/system.conf @@ -0,0 +1,77 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# Use 'systemd-analyze cat-config systemd/system.conf' to display the full config. +# +# See systemd-system.conf(5) for details. + +[Manager] +#LogLevel=info +#LogTarget=journal-or-kmsg +#LogColor=yes +#LogLocation=no +#LogTime=no +#DumpCore=yes +#ShowStatus=yes +#CrashChangeVT=no +#CrashShell=no +#CrashReboot=no +#CtrlAltDelBurstAction=reboot-force +#CPUAffinity= +#NUMAPolicy=default +#NUMAMask= +#RuntimeWatchdogSec=off +#RuntimeWatchdogPreSec=off +#RuntimeWatchdogPreGovernor= +#RebootWatchdogSec=10min +#KExecWatchdogSec=off +#WatchdogDevice= +#CapabilityBoundingSet= +#NoNewPrivileges=no +#SystemCallArchitectures= +#TimerSlackNSec= +#StatusUnitFormat=combined +#DefaultTimerAccuracySec=1min +#DefaultStandardOutput=journal +#DefaultStandardError=inherit +#DefaultTimeoutStartSec=90s +#DefaultTimeoutStopSec=90s +#DefaultTimeoutAbortSec= +#DefaultDeviceTimeoutSec=90s +#DefaultRestartSec=100ms +#DefaultStartLimitIntervalSec=10s +#DefaultStartLimitBurst=5 +#DefaultEnvironment= +#DefaultCPUAccounting=yes +#DefaultIOAccounting=no +#DefaultIPAccounting=no +#DefaultMemoryAccounting=yes +#DefaultTasksAccounting=yes +#DefaultTasksMax=15% +#DefaultLimitCPU= +#DefaultLimitFSIZE= +#DefaultLimitDATA= +#DefaultLimitSTACK= +#DefaultLimitCORE= +#DefaultLimitRSS= +#DefaultLimitNOFILE=1024:524288 +#DefaultLimitAS= +#DefaultLimitNPROC= +#DefaultLimitMEMLOCK=8M +#DefaultLimitLOCKS= +#DefaultLimitSIGPENDING= +#DefaultLimitMSGQUEUE= +#DefaultLimitNICE= +#DefaultLimitRTPRIO= +#DefaultLimitRTTIME= +#DefaultOOMPolicy=stop +#DefaultSmackProcessLabel= diff --git a/rootfs/etc/systemd/system/dbus-org.freedesktop.network1.service b/rootfs/etc/systemd/system/dbus-org.freedesktop.network1.service new file mode 120000 index 0000000..3c55b24 --- /dev/null +++ b/rootfs/etc/systemd/system/dbus-org.freedesktop.network1.service @@ -0,0 +1 @@ +/lib/systemd/system/systemd-networkd.service \ No newline at end of file diff --git a/rootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service b/rootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service new file mode 120000 index 0000000..8f3f496 --- /dev/null +++ b/rootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service @@ -0,0 +1 @@ +/lib/systemd/system/systemd-resolved.service \ No newline at end of file diff --git a/rootfs/etc/systemd/system/network-online.target.wants/networking.service b/rootfs/etc/systemd/system/network-online.target.wants/networking.service new file mode 120000 index 0000000..e58a34f --- /dev/null +++ b/rootfs/etc/systemd/system/network-online.target.wants/networking.service @@ -0,0 +1 @@ +/lib/systemd/system/networking.service \ No newline at end of file diff --git a/rootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service b/rootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service new file mode 120000 index 0000000..3b627c5 --- /dev/null +++ b/rootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service @@ -0,0 +1 @@ +/lib/systemd/system/systemd-networkd-wait-online.service \ No newline at end of file diff --git a/rootfs/etc/systemd/system/nova-splash.service b/rootfs/etc/systemd/system/nova-splash.service new file mode 100644 index 0000000..0964cd0 --- /dev/null +++ b/rootfs/etc/systemd/system/nova-splash.service @@ -0,0 +1,13 @@ +[Unit] +Description=Nova OS Boot Splash +After=systemd-remount-fs.service +Before=getty.target + +[Service] +Type=oneshot +ExecStart=/etc/nova-splash.sh +StandardOutput=journal+console +TTYPath=/dev/tty1 + +[Install] +WantedBy=multi-user.target diff --git a/rootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket b/rootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket new file mode 120000 index 0000000..bcfcdba --- /dev/null +++ b/rootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket @@ -0,0 +1 @@ +/lib/systemd/system/systemd-networkd.socket \ No newline at end of file diff --git a/rootfs/etc/systemd/system/sysinit.target.wants/systemd-network-generator.service b/rootfs/etc/systemd/system/sysinit.target.wants/systemd-network-generator.service new file mode 120000 index 0000000..5b25db3 --- /dev/null +++ b/rootfs/etc/systemd/system/sysinit.target.wants/systemd-network-generator.service @@ -0,0 +1 @@ +/lib/systemd/system/systemd-network-generator.service \ No newline at end of file diff --git a/rootfs/etc/systemd/system/sysinit.target.wants/systemd-pstore.service b/rootfs/etc/systemd/system/sysinit.target.wants/systemd-pstore.service new file mode 120000 index 0000000..06e55a6 --- /dev/null +++ b/rootfs/etc/systemd/system/sysinit.target.wants/systemd-pstore.service @@ -0,0 +1 @@ +/lib/systemd/system/systemd-pstore.service \ No newline at end of file diff --git a/rootfs/etc/systemd/system/sysinit.target.wants/systemd-resolved.service b/rootfs/etc/systemd/system/sysinit.target.wants/systemd-resolved.service new file mode 120000 index 0000000..8f3f496 --- /dev/null +++ b/rootfs/etc/systemd/system/sysinit.target.wants/systemd-resolved.service @@ -0,0 +1 @@ +/lib/systemd/system/systemd-resolved.service \ No newline at end of file diff --git a/rootfs/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer b/rootfs/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer new file mode 120000 index 0000000..ae3ad57 --- /dev/null +++ b/rootfs/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer @@ -0,0 +1 @@ +/lib/systemd/system/apt-daily-upgrade.timer \ No newline at end of file diff --git a/rootfs/etc/systemd/system/timers.target.wants/apt-daily.timer b/rootfs/etc/systemd/system/timers.target.wants/apt-daily.timer new file mode 120000 index 0000000..0612ca7 --- /dev/null +++ b/rootfs/etc/systemd/system/timers.target.wants/apt-daily.timer @@ -0,0 +1 @@ +/lib/systemd/system/apt-daily.timer \ No newline at end of file diff --git a/rootfs/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer b/rootfs/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer new file mode 120000 index 0000000..12072e6 --- /dev/null +++ b/rootfs/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer @@ -0,0 +1 @@ +/lib/systemd/system/dpkg-db-backup.timer \ No newline at end of file diff --git a/rootfs/etc/systemd/system/timers.target.wants/e2scrub_all.timer b/rootfs/etc/systemd/system/timers.target.wants/e2scrub_all.timer new file mode 120000 index 0000000..a62818c --- /dev/null +++ b/rootfs/etc/systemd/system/timers.target.wants/e2scrub_all.timer @@ -0,0 +1 @@ +/lib/systemd/system/e2scrub_all.timer \ No newline at end of file diff --git a/rootfs/etc/systemd/system/timers.target.wants/fstrim.timer b/rootfs/etc/systemd/system/timers.target.wants/fstrim.timer new file mode 120000 index 0000000..2ed9fe6 --- /dev/null +++ b/rootfs/etc/systemd/system/timers.target.wants/fstrim.timer @@ -0,0 +1 @@ +/lib/systemd/system/fstrim.timer \ No newline at end of file diff --git a/rootfs/etc/systemd/user.conf b/rootfs/etc/systemd/user.conf new file mode 100644 index 0000000..2e2b373 --- /dev/null +++ b/rootfs/etc/systemd/user.conf @@ -0,0 +1,50 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the user.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# See systemd-user.conf(5) for details. + +[Manager] +#LogLevel=info +#LogTarget=auto +#LogColor=yes +#LogLocation=no +#LogTime=no +#SystemCallArchitectures= +#TimerSlackNSec= +#StatusUnitFormat=combined +#DefaultTimerAccuracySec=1min +#DefaultStandardOutput=inherit +#DefaultStandardError=inherit +#DefaultTimeoutStartSec=90s +#DefaultTimeoutStopSec=90s +#DefaultTimeoutAbortSec= +#DefaultRestartSec=100ms +#DefaultStartLimitIntervalSec=10s +#DefaultStartLimitBurst=5 +#DefaultEnvironment= +#DefaultLimitCPU= +#DefaultLimitFSIZE= +#DefaultLimitDATA= +#DefaultLimitSTACK= +#DefaultLimitCORE= +#DefaultLimitRSS= +#DefaultLimitNOFILE= +#DefaultLimitAS= +#DefaultLimitNPROC= +#DefaultLimitMEMLOCK= +#DefaultLimitLOCKS= +#DefaultLimitSIGPENDING= +#DefaultLimitMSGQUEUE= +#DefaultLimitNICE= +#DefaultLimitRTPRIO= +#DefaultLimitRTTIME= +#DefaultSmackProcessLabel= diff --git a/rootfs/init b/rootfs/init deleted file mode 100755 index 605bbe2..0000000 --- a/rootfs/init +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# Nova OS - init -# Linux 7.0.12-nova-os — "Burn bright, run light." -# - -export PATH=/bin:/sbin:/usr/bin:/usr/sbin - -echo "" -echo " ╔══════════════════════════════════════╗" -echo " ║ N O V A O S ║" -echo " ║ kernel 7.0.12-nova-os ║" -echo " ║ \"Burn bright, run light.\" ║" -echo " ╚══════════════════════════════════════╝" -echo "" - -# Mount essential filesystems -mount -t proc none /proc -mount -t sysfs none /sys -mount -t devtmpfs none /dev -mount -t tmpfs none /tmp -mount -t tmpfs none /run - -# Populate /dev -mdev -s - -# Mount root writable -mount -o remount,rw / - -# Set hostname -hostname nova-os - -# Bring up loopback -ifconfig lo 127.0.0.1 up - -# Start logging -syslogd - -echo ":: Nova OS ready." -echo "" - -# Run the configured inittab if it exists -if [ -f /etc/inittab ]; then - exec init -fi - -# Fallback: spawn a shell -exec cttyhack sh