A super simple /sbin/init for Linux which allows running one and only one program

Related tags

Command-line init
Overview

Summary

High-performance /sbin/init program for Linux

This is designed to do literally nothing but accept binaries over the network and run them as a child of init.

If you pipe a file to <server ip>:1234 it will run it and pipe the stderr and stdout back to you

If you connect to <server ip>:1235 init will send SIGKILL to all processes on the system but itself. This is a measure to allow resetting the system if a binary was uploaded that had issues. This port neither sends or recieves anything, it simply kills upon getting a TCP connection.

For a simple headless Linux machine running a basic kernel, you'll want flags like this:

console=ttyS1,115200 rw root=/dev/sda ip=dhcp

This enables a console on ttyS1 (in my case that's COM2, the Serial-over-LAN port for IPMI), rw specifies that the root mount should be read-writable (required since we drop a file), root specifies the root filesystem device (in our case we used an unpartioned flash drive with vfat), and ip=dhcp is the coolest part, this allows the kernel to get a DHCP lease on any active NICs. This is mandatory because we use networking in init without any configuration of the network.

TL;DR: Build a kernel that can read from your drive and do networking, put this on it at /sbin/init, boot the kernel and it will run this program.

You might also like...
Shell Escape for Typst typesetting system. Linux Only.

Shell Escape for Typst This is a simple shell escape for Typst. It allows you to run shell commands directly from Typst compiler. That said, it does n

A simple program for C program IO testing. Written in Rust

A simple program for C program IO testing. Written in Rust, using concurrency to speed up valgrind testing. Make sure to update settings at your first run of the program!

💫 This program allows you to do requests in Rust without reqwest !

Zapros 💫 This program allows you to do requests in Rust without reqwest ! Usage : Get use crate::http_client::HttpClient; use crate::http_client::Htt

A super simple prompt for Fish shell, just shows git info and Vi mode.
A super simple prompt for Fish shell, just shows git info and Vi mode.

vifi is a portmandeau of 'Vi' and 'Fish', because it's a prompt for Fish shell, primarily focused around showing proper indicators when using Vi key bindings.

A minimal browser with a super simple rendering engine for HTML and CSS, using Rust.

minimal-browser A minimal browser with a super simple rendering engine for HTML and CSS, using Rust. Credit: https://github.com/mbrubeck and https://l

Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past

Jumpy Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past. It is heavily inspired by Zoxide but is more lig

A crate that allows you to mostly-safely cast one type into another type.

A crate that allows you to mostly-safely cast one type into another type. This is mostly useful for generic functions, e.g. pub fn fooS(s: S) {

A super simple but lightweight logging library that tries to capture the most important (status) information.

Hackerlog A super simple but lightweight logging library that tries to capture the most important (status) information. The following is supported: Lo

That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.
That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.

📌 This program is designed to translate text into the correct layout when typing is incorrect. 📌 Example ghbdtn - привет Just (by default) pressing

Comments
  • Documentation Incorrect

    Documentation Incorrect

    Documentation claims "If you connect to :1235 init will send SIGKILL to all processes on the system but itself. This is a measure to allow resetting the system if a binary was uploaded that had issues. This port neither sends or recieves anything, it simply kills upon getting a TCP connection."

    Connection to port 1235 actually responds with "Kill command received, sent SIGKILL to all processes\n" if it can.

    opened by mmitton 1
Owner
null
TMM is a Linux native game modding tool. it allows to install and depoly mods for Linux native and wine games.

Tux Mod Manager TMM is a Linux native mod manager made with the Tauri toolkit. It can install, load, remove and deploy mods for both Linux native and

Mathiew May 119 Dec 27, 2022
A lightweight and super fast cli todo program written in rust under 200 sloc

todo A lightweight and super fast cli todo program written in rust under 200 sloc installation AUR package: todo-bin use cargo build --release to comp

sioodmy 243 Dec 24, 2022
A little tool to create region-free openingTitle.arc files for New Super Mario Bros. Wii, or to convert them from one region to another

smallworld ...though the mountains divide and the oceans are wide... smallworld is a little tool that can create region-free openingTitle.arc files fo

NSMBW Community 7 Feb 6, 2023
verilot (verifiable lottery) is a command line tool for running and verifying one-time lotteries.

verilot verilot (verifiable lottery) is a command line tool for running and verifying one-time lotteries. Install Install Rust and Cargo with Rustup.

Shelby Doolittle 9 Oct 10, 2022
A library that allows for the arbitrary inspection and manipulation of the memory and code of a process on a Linux system.

raminspect raminspect is a crate that allows for the inspection and manipulation of the memory and code of a running process on a Linux system. It pro

Liam Germain 24 Sep 26, 2023
A lightweight, zero-dependency struct diffing library which allows changed fields to be collected and applied

structdiff A lightweight, zero-dependency struct diffing library which allows changed fields to be collected and applied. Derive Difference on a struc

null 7 Dec 25, 2022
Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)

is-wsl Check if the process is running inside Windows Subsystem for Linux (Bash on Windows) Inspired by sindresorhus/is-wsl and made for Rust lang. Ca

Sean Larkin 6 Jan 31, 2023
An implementation of a Windows Event Collector server running on GNU/Linux.

OpenWEC OpenWEC is a free and open source (GPLv3) implementation of a Windows Event Collector server running on GNU/Linux and written in Rust. OpenWEC

CEA IT Security 15 Jun 15, 2023
Check the reproducibility status of your Arch Linux packages (read-only mirror)

arch-repro-status A CLI tool for querying the reproducibility status of the Arch Linux packages using data from a rebuilderd instance such as reproduc

Arch Linux 12 Nov 16, 2022
Boxxy puts bad Linux applications in a box with only their files.

boxxy is a tool for boxing up misbehaving Linux applications and forcing them to put their files and directories in the right place, without symlinks!

amy null 910 Feb 22, 2023