HelloFS - The Hello World File System for Linux

Overview

HelloFS is a demonstration of a simple file system implemented in Linux. This in-memory file system contains one file "hello.txt" whose contents is "Hello World!".

Prerequisites

To install, you'll need the source code for an appropriate Linux kernel. This software has been tested on Linux 2.4.21 and should work with few changes on any 2.4.x kernel. This has not been tested on Linux 2.6 kernels. You'll also need to have some famililarity with compiling and installing kernels.

Downloading

Kernel patch for Linux 2.4.21

Compiling/Installing

$ cd linux-2.4.21
$ patch -p1 < patch-2.4.21-hellofs-0.1.txt
$ make modules
$ make modules_install

Running

$ modprobe hellofs
$ mount -t hellofs /dev/zero /mnt
$ ls -la /mnt
$ cat /mnt/hello.txt

FAQ

Q. What is this useful for?

A. The software is designed and intended for use in on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility. Of course, I'm not serious.

Q. Does the code read from disk?

A. No. The hello.txt file is generated and remain in memory. This keeps the software simple, which is the main goal for most "Hello World!" programs.

Q. Can I write to the file?

A. You can try, but it won't really work.

Q. Is there a version for Windows?

A. I'd be interested if anyone can provide one. I'd also be interested if someone can tell me how to recompile my Windows kernel.