Made a video doing a deep dive on how inodes work under the hood

While I was implementing my defrag utility for the Tektronix 4404 I had to do a fair amount of reverse engineering of the file system and in particular the inodes underlying it.

Made a video doing a deep dive into how Inodes actually work..

4 Likes

What is the drive size on your system?

40MB

Originally a Micropolis 1304, now a beaglebone SCSI emu

Very nice explanation!

Back in 1982 I copied the inode idea for a 68000 development board I made but I wasn’t happy with the Unix way of formatting disks by selecting a fixed size for inodes. This means you can run out of inodes with file space remaining or run out of file space with many available inodes.

So I just put the inodes themselves into a file, which was known to start at block 0 and be represented by inode 0. That costs one more disk access than Unix when not many inodes are used (my case for floppy disks) and two extra accesses for many inodes.

inode 1 was the root directory, inode 2 was the bad blocks file and inode 3 was the free space file.

1 Like

Do you still have software? There are several low cost 68000 boards out there but they all seem to run
CP/M 68K.

No, it was just in pen on the back of old paper listings. It wasn’t proper C code since I had learned that language from old Bell Technical Journals and hadn’t yet read the Kernighan and Ritchie book. Since I didn’t have a C compiler or an assembler I would have had to hand translate this to hex. Unfortunately the lab was never able to buy the Intel chip they had forced me to use to interface to the DRAM, so the development board only had a working UART and ROM and was limited to programs that only used the processor registers.

An interesting feature of this system was that you could use a range in memory in place of a file, so “od myfile” would give you an octal dump of the contents of myfile while “od 0x3000@0x100” would dump 256 bytes starting at address 3000 hex. You can imagine how many ways you can shoot yourself in the foot with this, but that is what development systems are for.

3 Likes

Nice. I had to do this recently while trying to reverse engineer an old Coherent disk image to retrieve some files from it. I’d forgotten how the old Sys 7 (I think) file systems were laid out, so it was a nice trip down memory lane (where I was repeatedly mugged, as memory lane is wont to do).

2 Likes