Forest OS

A free and open source operating system, written from scratch. A Bluethefox project, hosted by Enclica.

← Back to Wiki

Choosing a Filesystem

Pick the filesystem before you partition. Forest OS mounts many formats, but only a few are writable — putting your home directory or root on a read-only type means nothing you save survives. Rule of thumb: FAT32 for shared/writable data, ext2 for an installed root, ISO 9660/UDF for install media, tmpfs for scratch. Details: Filesystems, tools: Disk Tools.

Install series: Overview · Requirements · Quick-Start · Choosing a Filesystem · BIOS · UEFI · First Boot · Post-Install

Supported Filesystems

What the kernel can probe and mount today (fern/src/*.c, gated by ENABLE_VFS=yes in fern/build/features/filesystems.mk):

Filesystem Source File Read Write Status
FAT12/16/32 fat.c Yes Yes Production
exFAT exfat.c Yes No Read-only
ISO 9660 iso9660.c Yes No Read-only
UDF udf.c Yes No Read-only
JFFS2 jffs2.c Yes No Read-only
YAFFS yaffs.c Yes No Read-only
LEAN lean.c Yes No Read-only
Amiga FFS ffs_amiga.c Yes No Read-only
z/OS Datasets zdsfs.c Yes No Read-only
initrd (ustar) vfs.c / ustar.c Yes No Production
tmpfs fs.c Yes Yes Production
procfs procfs.c Yes Partial Partial
sysfs sysfs.c Yes Partial Partial
devfs devfs.c Yes N/A Production
ext2/3/4 ext2.c Yes No Read-only
symlinks symlink.c Yes N/A Production

Individual drivers have independent toggles (ENABLE_FAT32, ENABLE_EXFAT, ENABLE_ISO9660, ENABLE_UDF, ENABLE_EXT2, etc.). mkfs creates fat32 and ext2 only.

What the Write column means in daily use

  • Yes — daily writable: FAT12/16/32 and tmpfs. Create, edit, and delete files normally. Put work you need to save here.
  • Partial — selected knobs only: procfs / sysfs. You can read everything, but only specific control files accept writes; regular files cannot be created there.
  • N/A — not files: devfs / symlinks. There is nothing to write in the normal sense — device nodes are accessed via drivers, symlinks just redirect to another path.
  • No — read-only: everything else (exFAT, ISO 9660, UDF, ext2/3/4, JFFS2, YAFFS, LEAN, Amiga FFS, z/OS datasets, ustar). Open and copy work, but write returns 0. To edit a file from a read-only filesystem, copy it to a writable FAT mount first:
mount -t vfat /dev/sdX2 /data && cp /mnt/ro/file /data/file

Practical consequences: a home directory on FAT32 persists and is editable from Forest OS, Linux, Windows, and macOS. A home directory on exFAT, ISO 9660, UDF, or ext2 mounts fine but you cannot save into it from Forest OS — use it as a source to copy from, not a place to work. tmpfs is fully writable but RAM-only: everything in it vanishes on reboot, so never put the only copy of anything there.

Which one should I choose?

Use caseChooseWhy
Shared data, USB persistence store, ESP-adjacent exchangeFAT32Only production read/write disk filesystem; portable everywhere
Installed root via the installerext2What mkfs / forinstall create for root; verify ENABLE_EXT2 is on for your build
Install / live mediaISO 9660 / UDFRead-only by design; boot from it, install to something writable
Scratch, /tmp, build temptmpfsFast and writable, no persistence needed
Rescue / forensics, reading foreign diskswhatever matches the diskexFAT, ext2/3/4, LEAN, JFFS2, YAFFS, FFS, ZDS all mount read-only — copy what you need to FAT

Do not use exFAT for a persistence partition yet: it probes and mounts but has no write path, so saves silently fail. Reformat that partition FAT32 instead.

mkfs examples

mkfs supports fat32/vfat and ext2 (see Disk Tools). Triple-check the device with lsblk / fdisk -l first — wrong target destroys data.

lsblk
fdisk -l /dev/sdX

mkfs -t fat32 -L FOREST-DATA /dev/sdX2      # writable data / persistent home
mkfs -t fat32 -v /dev/sdX2                  # verbose variant
mkfs -t ext2 -L FOREST-ROOT /dev/sdX1       # install root
mkfs -t ext2 -b 4096 -i 32768 /dev/sda1     # custom block size / inode count

blkid /dev/sdX1                             # confirm TYPE/LABEL/UUID
fsck -n /dev/sdX1                           # read-only check before mounting
fsck -a /dev/sdX1                           # auto-fix safe errors

mount examples

mkdir -p /data /home /mnt/usb /mnt/cdrom

mount -t vfat /dev/sdX2 /data               # FAT32 data partition
mount -t ext2 /dev/sda1 /mnt/usb            # ext2 volume elsewhere
mount -t iso9660 /dev/cdrom /mnt/cdrom      # install disc (read-only)
mount -t udf /dev/cdrom /mnt/udf            # UDF optical (read-only)
mount -t exfat /dev/sdb1 /mnt/exfat         # exFAT source (read-only: copy from it)
mount -o loop forest.img /mnt/img           # image file via /dev/loop*
mount -a                                    # mount everything in fstab
mount                                       # list mounted filesystems
df -hT                                      # confirm types and free space

fstab examples

mount -a reads /etc/fstab as device mountpoint fstype options dump pass. Adjust device names to your disk (prefer labels/UUIDs where supported).

# <device>    <mount>  <type>  <options>        <dump> <pass>
# Full install on USB stick (root on ext2, no swap on flash)
/dev/sdb1     /       ext2    defaults,noatime   0      1
proc          /proc   proc    defaults           0      0
sysfs         /sys    sysfs   defaults           0      0
tmpfs         /tmp    tmpfs   defaults           0      0

# Persistent live: system is read-only ISO, home + data on FAT32
/dev/sdb2     /home   vfat    defaults           0      2
/dev/sdb2     /data   vfat    defaults,noatime   0      2

# Internal install with separate home + swap (spinning disk/SSD example)
/dev/sda1     /       ext2    defaults           0      1
/dev/sda2     none    swap    sw                 0      0
/dev/sda3     /home   ext2    defaults           0      2
mount -a        # mounts all fstab entries not marked noauto
df -hT          # confirm /home is vfat/ext2 on the right device
du -sh /home    # how much store is used

Further reading

← Back to Wiki