A simple fat16 implementation for the linux kernel.
Are you feeling lucky?
Change the makefile, or pass $KDIR=/lib/modules/$(uname-r)/build
to point to your kernel headers:
make
# SPDX-License-Identifier: GPL-2.0
KDIR ?= /lib/modules/`uname -r`/build
default:
$(MAKE) LLVM=1 -j$(nproc) -C $(KDIR) M=$$PWD
and then run:
make
sudo insmod fat16.ko
# May god have mercy on your soul
Run the provided linux vm demo with qemu locally:
qemu-system-x86_64 \
-kernel assets/vmlinux \
-append "console=ttyS0,115200 root=/dev/ram0 loglevel=3" \
-initrd assets/initramfs.img \
-nographic \
-machine q35 \
-enable-kvm \
-device intel-iommu \
-cpu host \
-m 1G \
-nic user,model=rtl8139,hostfwd=tcp::5555-:23,hostfwd=tcp::5556-:8080
Just run the provided linux vm demo with Docker:
docker run --device=/dev/kvm -it tomcat0x42/fat16
After the module has been loaded, you can test it with the provided test script:
./test.sh
or mount the image and test it manually:
mount -o loop fat16_1sectorpercluster.img ./1sectorpercluster
mount -o loop fat16_4sectorspercluster.img ./4sectorspercluster