[TUHS] retro-fuse project

Jay Logue jay-tuhs9915 at toaster.com
Tue Feb 23 02:41:17 AEST 2021


Lately, I've been playing around in v6 unix and mini-unix with a goal of 
better understanding how things work and maybe doing a little hacking.  
As my fooling around progressed, it became clear that moving files into 
and out of the v6 unix world was a bit tedious.  So it occurred to me 
that having a way to mount a v6 filesystem under linux or another modern 
unix would be kind of ideal.  At the same time it also occurred to me 
that writing such a tool would be a great way to sink my teeth into the 
details of old Unix code.

I am aware of Amit Singh's ancientfs tool for osxfuse, which implements 
a user-space v6 filesystem (among other things) for MacOS.  However, 
being read-only, it's not particularly useful for my problem.  So I set 
out to create my own FUSE-based filesystem capable of both reading and 
writing v6 disk images.  The result is a project I call retro-fuse, 
which is now up on github for anyone to enjoy 
(https://github.com/jaylogue/retro-fuse).

A novel (or perhaps just peculiar) feature of retro-fuse is that, rather 
than being a wholesale re-implementation of the v6 filesystem, it 
incorporates the actual v6 kernel code itself, "lightly" modernized to 
work with current compilers, and reconfigured to run as a Unix process.  
Most of file-handling code of the kernel is there, down to a trivial 
block device driver that reflects I/O into the host OS.  There's also a 
filesystem initialization feature that incorporates code from the 
original mkfs tool.

Currently, retro-fuse only works on linux. But once I get access to my 
mac again in a couple weeks, I'll port it to MacOS as well.  I also hope 
to expand it to support other filesystems as well, such as v7 or the 
early BSDs, but we'll see when that happens.

As I expected, this was a fun and very educational project to work on.  
It forced me to really understand what was going in the kernel (and to 
really pay attention to what Lions was saying).  It also gave me a 
little view into what it was like to work on Unix back in the day.  
Hopefully someone else will find my little self-education project useful 
as well.

--Jay



More information about the TUHS mailing list