From d101fff92ecd3cc90f6a36135905153a3d7d1f61 Mon Sep 17 00:00:00 2001 From: blazblue547-afk Date: Sun, 14 Jun 2026 08:15:37 -0400 Subject: [PATCH] Rootfs: busybox-static 1.37.0, init system, shell configs --- .gitignore | 5 +++++ rootfs/etc/init.d/rcS | 0 rootfs/init | 37 ++++++++++++++++++++++--------------- 3 files changed, 27 insertions(+), 15 deletions(-) mode change 100644 => 100755 rootfs/etc/init.d/rcS diff --git a/.gitignore b/.gitignore index d88e5e8..5f72659 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ build/ *.img *.tar.xz *.tar.bz2 +rootfs/bin/ +rootfs/sbin/ +rootfs/lib/ +rootfs/dev/ +!rootfs/bin/.gitkeep diff --git a/rootfs/etc/init.d/rcS b/rootfs/etc/init.d/rcS old mode 100644 new mode 100755 diff --git a/rootfs/init b/rootfs/init index e51142f..605bbe2 100755 --- a/rootfs/init +++ b/rootfs/init @@ -1,9 +1,11 @@ -#!/bin/busybox sh +#!/bin/sh # # Nova OS - init -# Linux 7.0.12-nova-os +# 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 ║" @@ -13,29 +15,34 @@ echo " ╚═══════════════════════ echo "" # Mount essential filesystems -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 +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 -echo ":: Mounting root filesystem..." -mount -o remount,rw / - -echo ":: Setting up loopback..." +# Bring up loopback ifconfig lo 127.0.0.1 up -echo ":: Starting syslogd..." -syslogd -t +# Start logging +syslogd echo ":: Nova OS ready." echo "" -# Spawn shell on tty1 -setsid cttyhack /bin/sh +# Run the configured inittab if it exists +if [ -f /etc/inittab ]; then + exec init +fi + +# Fallback: spawn a shell +exec cttyhack sh