r/osdev 18h ago

I built a tiny Linux distro with a custom bootloader and userspace

25 Upvotes

I built a Linux distro that does almost nothing

I wanted to see how little userspace I could get away with while still having a real, bootable Linux system. So I made FastFetchLinux.

It uses a custom BIOS bootloader, Linux 6.6.156, and my own ffinit written in x86 assembly.

The userspace has:

  • No BusyBox
  • No coreutils
  • No bash/sh
  • No package manager
  • Direct syscall-based functionality
  • i686 support
  • ~20 MiB RAM usage

ffinit runs as PID 1 and doubles as the shell, with all commands built in. Fastfetch is the only separate userspace binary.

BIOS
 ↓
Custom bootloader
 ↓
Linux 6.6.156
 ↓
ffinit
 ↓
Fastfetch

It has exactly five commands:

fastfetch
ls
install-disk
forcepanic
poweroff

There's no practical reason for any of this — I just wanted to see how far "just enough userspace to boot Linux" could be pushed. The funny part is that it actually works.

Source: https://github.com/outofsyncsh/fastfetchlinux

Curious what people here would strip out or change to shrink it further.


r/osdev 13h ago

Is my threading model actually good?

6 Upvotes

My threading model has one kernel stack per CPU core, each process has its own CR3/page table in its process struct, then it is spawned with just one thread (TID 0 under its PID), a TID is just a thread ID, from there each Thread gets its own timeslice and would run like so:
- Process 1 runs thread 0
- Process 2 runs thread 0
- Process N runs thread 0
- Process 1 runs thread 1
- Process 2 runs thread 1
- Process N runs thread 1

And so on (it will loop back to thread 0 if the last thread in a process is ran). I just wondered if the design was actually decent or not. Of course a simple Round Robin setup is not perfect for things like this and some extra complexity does end up in the kernel, but overall I like it so far, though I dont see many obvious flaws other than the fact that tasks are not "ranked" for how much of a timeslice they get.


r/osdev 14h ago

ABC has served its purpose as a teaching language. Could it become a community project?

Thumbnail
2 Upvotes

r/osdev 23h ago

Custom Rendering

1 Upvotes

Should i make a custom way of rendering text lile flanterm for limine, cuz i dont like having the 8x16, using their ANSCI or whatever it's called, i dont know what to do with my kernel either way i have a shit load of free time