From 1e19963a8d6814e6c94b2dafa0d5b7e9e9d29dd5 Mon Sep 17 00:00:00 2001 From: boreddevnl Date: Wed, 18 Mar 2026 18:14:56 +0100 Subject: [PATCH] DOC: Adjust filesystem documentation --- docs/architecture/filesystem.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/architecture/filesystem.md b/docs/architecture/filesystem.md index e755d8d..b4ee1e4 100644 --- a/docs/architecture/filesystem.md +++ b/docs/architecture/filesystem.md @@ -19,16 +19,19 @@ Key VFS functionalities include: ## 💾 FAT32 Implementation -The primary filesystem logic in `fat32.c` is currently built as a RAM-based filesystem simulation. +The primary filesystem logic in `fat32.c` handles both in-memory RAM-based filesystem simulation and physical ATA block devices. -### 💿 Booting and the RAMFS -Since BoredOS boots from a CD-ROM ISO image generated by `xorriso`, it does not read directly off the CD to execute applications. +### 💿 Storage Support -1. **ISO Booting**: During boot, Limine loads necessary files (such as userland `.elf` binaries, fonts, and wallpapers) into memory as standard boot modules. -2. **RAM Simulation**: The FAT32 filesystem code parses these loaded memory modules and automatically constructs a synthetic FAT32 directory tree inside RAM. -3. **Root Filesystem**: All active execution of built-in GUI and CLI apps occurs off this read-only, in-memory FAT32 simulation. +BoredOS supports two main types of storage for its FAT32 implementation: + +1. **RAMFS (Boot Modules)**: During boot, Limine loads necessary files (such as userland `.elf` binaries, fonts, and wallpapers) into memory as standard boot modules. The FAT32 code parses these loaded memory modules and automatically constructs a synthetic FAT32 directory tree inside RAM (mounted as `A:`). +2. **ATA Drives**: The kernel includes a basic PIO-based ATA driver that can detect and read/write to physical IDE/PATA hard disks. + - **GPT is NOT supported**: Currently, only **MBR (Master Boot Record)** partition tables or **raw (partitionless)** disks are supported. + - **Filesystem**: The partition must be formatted as **FAT32**. + +### 🔍 Auto-detection +The `Disk Manager` automatically probes primary and secondary IDE channels during initialization. If a valid FAT32 partition is found (either directly at sector 0 or via an MBR partition table), the disk is assigned a drive letter (starting from `B:`) and becomes accessible to the VFS. -> [!WARNING] -> **Limitations:** The current `fat32.c` implementation in BoredOS is strictly a RAM-based filesystem simulation. It **does not support** reading from actual block devices (real disks). Consequently, external disk images are not recognized, and any operations requiring persistent storage are unsupported. ---