frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Boot Naked Linux

https://nick.zoic.org/art/boot-naked-linux/
43•abnercoimbre•3h ago

Comments

megous•1h ago
You may also want to build and run busybox for your tiny userspace.

Other things you may want to experiment with is gen_init_cpio.c from linux kernel tree. It makes creating initramfs file structure easier from scripts.

And finally if sys/isolinux is also fun to use for minimal boot images.

M95D•1h ago
I... fail to see the point of running just one process.

If it's just a PoC, then:

1) I remember seeing a linux firewall/gateway set up to run with just the kernel, without any userspace at all. Completely unhackable.

2) To print some text or run a simple program, I belive DOS without a memory manager would be even faster.

3) It takes 1s to boot linux, but an ordinary PC takes 10s to get to that linux. Even U-boot on ARM takes some seconds to load a kernel.

BTW, if anyone knows any current platform that can XiP a linux kernel, please share.

kube-system•1h ago
Wouldn't this be useful for embedded types of applications where you have a very specific task you want to do and you want to do it now.... like that firewall example?
M95D•1h ago
Yeah, but there's a problem.

Do do something actually useful, the program would have to access some data: network, disk, some sensors, etc. Network alone means scanning PCIe for the network card and configuring it, disk access needs controller also on PCIe, then scanning the ports for the drive, reading partition table, mounting the partition, etc.

All that takes a lot more than 1s. The speedup might not even be significant compared to a kernel optimized for that system (all modules built-in, nothing redundant), but full-featured, plus busybox or sysvinit alone.

hylaride•1h ago
Embedded devices or other SoC situations, certain limited scope situations where docker is undesirable/unnecessary, etc.
yjftsjthsd-h•1h ago
> I remember seeing a linux firewall/gateway set up to run with just the kernel, without any userspace at all. Completely unhackable.

Do you remember any details that would let me search for it? Because that does sound cool, and even maybe useful; the thought has certainly crossed my mind that a router or VPN box doesn't really get a lot of use out of userspace... Although maybe it's worth keeping for control/configuration/debugging.

> To print some text or run a simple program, I belive DOS without a memory manager would be even faster.

Or just make your code boot directly. It's not hard to make a .efi, or use https://github.com/jart/cosmopolitan to make a binary that runs in many places including bare metal.

M95D•1h ago
IIRC, it ran a script as init process that set up the network cards, set up iptables, etc. and then just exited. Kernel would panic (the "init was killed" panic), but the network would still be functional. Automatic reboot on panic was disabled.

To reconfigure, the admin would simply reset it and start the system with "init=/something/else" as kernel parameter that booted to a normal userspace.

yjftsjthsd-h•56m ago
Oh, clever; I didn't know you could make Linux panic but keep running.
mschuster91•42m ago
> I... fail to see the point of running just one process.

It makes sense if you got some legacy piece of hardware that has extremely limited resources, both in terms of RAM and storage. Write your code in Go and you don't even need libc any more.

SpaceNoodled•15m ago
At that point, it would seem that an RTOS would be even more efficient - and if multithreading is not necessary, then just run it on bare metal.
helterskelter•1h ago
It's be cool to dual boot with a Linux that has a ~1s boot time, drops you into neovim and lets you save text files to a shared partition.
megous•29m ago
It's possible to do a similar thing with any old smartphone. :)

https://xnux.eu/p-boot/

yjftsjthsd-h•1h ago
I do like this as an exploration.

It's possible to boot a VM noticeably faster still, though I'm unclear on whether any of that applies to hardware:

https://jvns.ca/blog/2021/01/23/firecracker--start-a-vm-in-l...

nottorp•1h ago
> I found “Building a tiny Linux from scratch” which does most of what I do here but in Rust and a year ago

Linux from scratch seems to still be doing fine at: https://www.linuxfromscratch.org. It's going on 27 years now.

> yeah, I know, proper C code needs to be scattered with return value checks and sensible reports of errno. I’ve left these out for clarity.

Somewhere, a LLM is trained on this code as we speak :)

But anyway, it's great that people are still interested in learning this stuff for fun.

testycool•59m ago
"Butt Naked Linux" is how I read it.

I know it's off topic. I accept my downvotes.

Andrex•34m ago
I could end up stealing that for my own tinkering distro that never ends up releasing because it's awful.
simonreiff•34m ago
Cool article! I'm working on a tangentially related issue requiring microVMs inside isolated infrastructure environments. Latency isn't really my main priority, but I am always tempted by any option to minimize attack surface. I wonder what it would take to replace the host block mount in this configuration with `vsock` for all communications between the host and guest microVM? Then you could avoid any files being mounted on the host at all while still enabling, e.g., one-way egress to a pre-signed S3 URL via a private VPC endpoint. Very cool article!
quesomaster9000•8m ago
Amazon Nitro Enclave does pretty much this, the guest has one method of communication, via vsock, and it's up to you to build the pipes on either side.

It's a huge PITA in practice because whatever you want to run inside some enclave usually ends up being a 'normal program' that needs to talk TCP/IP over sockets... so your vsock I/O becomes a weird mix between a TUN proxy or a SOCKS5 local listener inside the VM that tunnels through vsock.

For example, I have the Windows NT 3.50 kernel compiling from scratch with virtio-net drivers, it's fairly straightforward for me to add a bus driver that runs over vsock inside Nitro Enclave that exposes itself (o,o) as a NIC then handle the tunneling logic in a usermode process in the host - but I don't uderstand the point of why you would do that when you already have sufficient attestation methods that don't require you to do vsock isolation.

Iroh 1.0

https://www.iroh.computer/blog/v1
637•chadfowler•4h ago•209 comments

TinyWind: A pixel pirate sailing game with real wind physics (380k+ kms sailed)

https://tinywind.io
304•tinywind•3h ago•56 comments

Typst 0.15.0

https://typst.app/docs/changelog/0.15.0/
117•schu•2h ago•20 comments

Ask HN: Has anyone replaced Claude/GPT with a local model for daily coding?

267•cloudking•4h ago•175 comments

My Homelab AI Dev Platform

https://rsgm.dev/post/ai-dev-platform/
134•rsgm•4h ago•32 comments

How TimescaleDB compresses time-series data

https://roszigit.com/en/blog/timescaledb-compression-hypercore
56•lkanwoqwp•2h ago•6 comments

Game Engine White Papers Commander Keen

https://forgottenbytes.net/commander_keen.html
43•mfiguiere•1h ago•7 comments

Factoring "short-sleeve" RSA keys with polynomials

https://blog.trailofbits.com/2026/06/12/factoring-short-sleeve-rsa-keys-with-polynomials/
17•ledoge•3d ago•0 comments

Hetzner Price Adjustment

https://docs.hetzner.com/general/infrastructure-and-availability/price-adjustment/#cloud-servers
174•tuhtah•6h ago•281 comments

Making glass-to-metal seals for home­made vacuum tubes

https://maurycyz.com/projects/glass/1/
90•zdw•1d ago•26 comments

Show HN: Fata – Spaced repetition to fight skill rot from AI coding

https://fata.dev
33•djoume•4d ago•15 comments

Fox to buy Roku

https://www.wsj.com/business/deals/fox-roku-deal-f6e564f9
190•thm•6h ago•261 comments

Launch HN: Drafted (YC P26) – Models for residential architecture

27•PrimalNick•2h ago•25 comments

Boot Naked Linux

https://nick.zoic.org/art/boot-naked-linux/
43•abnercoimbre•3h ago•19 comments

Copper transport drug restores memory and clears toxic Alzheimer's proteins

https://www.monash.edu/news/articles/copper-drug-restores-memory-and-clears-toxic-alzheimers-prot...
171•bookofjoe•4h ago•66 comments

Claude Corps

https://www.anthropic.com/news/claude-corps
26•Mustan•1h ago•15 comments

Your ePub Is fine

https://andreklein.net/your-epub-is-fine-kobo-disagrees-blame-adobe/
846•sohkamyung•20h ago•286 comments

Apple Foundation Models

https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/apple-foundation-models
424•MehrdadKhnzd•14h ago•199 comments

CrankGPT

https://crankgpt.com
488•rishikeshs•6h ago•197 comments

Around 200 Stanford students walk out as Google CEO takes stage

https://www.sfgate.com/tech/article/sundar-pichai-stanford-commencement-22304888.php
42•pera•57m ago•2 comments

Show HN: machine0 – Persistent NixOS VMs You Control from the CLI

https://machine0.io
47•bwm•3h ago•16 comments

Can Europe train a frontier AI model on the compute it owns?

https://github.com/sammysltd/euromesh
76•smashini•6h ago•88 comments

The Alaska Server

https://serialport.org/blog/the-alaska-server/
7•speckx•54m ago•1 comments

Openrouter Fusion API

https://openrouter.ai/openrouter/fusion
178•tdchaitanya•12h ago•69 comments

Teenagers Stayed Overnight at Their School and Found Hidden Ancient Roman Ruins

https://www.smithsonianmag.com/smart-news/these-italian-teenagers-stayed-overnight-at-their-schoo...
149•thunderbong•4d ago•74 comments

Even more batteries included with Emacs

https://karthinks.com/software/even-more-batteries-included-with-emacs/
330•signa11•17h ago•119 comments

Show HN: Exploiting Slack's video embeds to achieve E2EE communication

https://v1c.rocks/log/exploiting-slack-video/
20•victorio•3h ago•2 comments

Improvement in advanced Alzheimer’s disease following high-dose psilocybin

https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2026.1813281/full
168•cl3misch•12h ago•121 comments

Dalus (YC W25) Is Hiring a Senior Software Engineer in Germany

https://www.ycombinator.com/companies/dalus/jobs/5IDmKJt-senior-software-frontend-engineer-german...
1•sebastianvoelkl•12h ago

Ported my C game to WASM, here's every bug that I hit

http://ernesernesto.github.io/writes/portingmatchmorphosistowasm/
90•birdculture•3d ago•75 comments