Let's build an OS: WTF is /etc/gshadow

Every now and then on my OS journey I find weird things. Today is one of those days. When implementing my login system, I was looking at the standard login files - /etc/group, /etc/passwd, and /etc/shadow. Those are all well known and normal, right? Well imagine my surprise when a file I’ve never heard of popped up: /etc/gshadow. For the uninitiated, on Linux you have a set of groups that your user is a member....

March 23, 2024 · 2 min

Let's build an OS: crypt(3) is a bit weird

Let’s go on an adventure. I’ve learnt a lot more Rust over the last year, and I want to get back into writing properly, so my plan is to write a Linux Operating System. While writing it, I’ll be taking notes in my repo - https://github.com/sinkingpoint/qos/tree/main/notes . And every now and then formalising them into more structured blog posts over here, once I’ve learnt enough to make something interesting. Recently, I went about implementing a login system for our operating system....

March 23, 2024 · 9 min

Rabbithole: Shell Pipelines

In prepping for the next part of my OS journey (writing an init system!), I found a need to add pipelining to my shell. This entry is a quick jaunt into how that works. All the code we break down here can be found here. What actually is a pipe? Before we talk about a pipeline, it’s useful to know what a pipe is. Fundementally, a pipe is two File Descriptors (read: files, yes it’s a bit more complicated but bear with me), where what is written to one end of the pipe is readable in the other....

February 27, 2024 · 8 min

Let's build an OS: Mounting a disk

Let’s go on an adventure. I’ve learnt a lot more Rust over the last year, and I want to get back into writing properly, so my plan is to write a Linux Operating System. While writing it, I’ll be taking notes in my repo - https://github.com/sinkingpoint/qos/tree/main/notes . And every now and then formalising them into more structured blog posts over here, once I’ve learnt enough to make something interesting. I had intended this entry to be a simple one....

February 12, 2024 · 7 min

Let's build an OS: A basic shell

Let’s go on an adventure. I’ve learnt a lot more Rust over the last year, and I want to get back into writing properly, so my plan is to write a Linux Operating System. While writing it, I’ll be taking notes in my repo - https://github.com/sinkingpoint/qos/tree/main/notes . And every now and then formalising them into more structured blog posts over here, once I’ve learnt enough to make something interesting. I love a good shell....

January 22, 2024 · 26 min

Rabbithole: A weird CPIO discrepancy

We learnt previously that an initramfs in Linux is a “CPIO archive”, so I set out to write something that can read and write them, in order to learn more about the format. What I found was an interesting discrepancy between how GNU cpio and the Linux Kernel parse CPIO files. It seems pretty innocuous, but I thought I’d document it for posterity. The CPIO header CPIO is an exceedingly simple format....

December 28, 2023 · 3 min

Let's build an OS: Booting Something

Let’s go on an adventure. I’ve learnt a lot more Rust over the last year, and I want to get back into writing properly, so my plan is to write a Linux Operating System. While writing it, I’ll be taking notes in my repo - https://github.com/sinkingpoint/qos/tree/main/notes . And every now and then formalising them into more structured blog posts over here, once I’ve learnt enough to make something interesting. Welcome to the first of such formalisations: Getting something booting....

December 26, 2023 · 13 min

Runbooks and Dashboards: Scrapbooking for Engineers

It seems like every company these days has two things they turn to when first hitting an incident. a) Is there an Alert Reference / Runbook / Whatever (the actual term depends on who you talk to), and b) Is there a dashboard that can tell me exactly what’s wrong. In this post, I’m going to cover why these tools are not only unhelpful, but are actively harmful to your incident response....

July 18, 2022 · 7 min

Cheating at Wordle

Like many these days, I’ve been having my Twitter feed filled up with endless tweets of “Wordle”. I was reluctant to learn what Wordle was until recently (mainly due to some hipster based stubbornness of not wanting to go with trends probably). My main hangup with these simple games is, rather appropriately, simple: I don’t find them fun. What I do find fun however, is learning how they work so that I can cheat at them....

January 9, 2022 · 8 min

The Tragedy of the Platform Commons

In many modern system architectures, there exists some common building blocks between systems. We generally call these the “Platform” (See Facebooks “Platform Engineer” role), which makes a nice analogy as these components are supposed to form a solid base for you to build a system on top of. But how should we manage these common pieces? Therein lies an interesting question, that I here offer some thoughts on. Organisational Models There’s three main organisational models I have seen in the wild, each with their benefits and drawbacks....

November 30, 2020 · 3 min