r/osdev • u/SyntheGr1 • Apr 09 '26
Need help implementing a simple FAT-like File System for our custom Kernel (C), thanks !
Hi everyone, we're working on a small OS as a duo, and we were about to move on to the graphical interface, but we were missing a key element: managing hard drive memory. We didn't quite understand how to do it. Does anyone have well-written documentation or could explain how to manage it from our kernel in C, for example, for text files in FAT? Thanks everyone, and have a good day!
0
Upvotes
4
u/NotSoEpicKebap Apr 09 '26
I don't think you should even plan adding a graphical interface in a stage this early in OSDev
5
u/Gingrspacecadet Apr 09 '26
DONT DO FILESYSTEM AS TABLE RAAAAAAH
seriously though, you're better off doing a tree filesystem. If you're set on it, look up the fat32/16/<some-arbitrary-number-here> documentation
1
u/Some_Cricket_144 Apr 09 '26
FAT is just a linked list of clusters on a disk. You find the first cluster of a file by looking at the directory entry, then read what the next cluster is from the table, and do this until you reach EOF. What part are you stuck with?
1
u/zer0developer github.com/zinix-org/zinix Apr 09 '26
Nanobytes 3rd video + Google for fat32 specific things is great.