What you'll learn:
- Understand the flow from Linux user processes through to the kernel VFS layer and the interaction between the kernel and the filesystem.
- Learn how to build a loadable kernel module and supporting commands (mkfs & fsdb) and how to create additional files on disk during mkfs time.
- Developing a disk-based filesystem from scratch by understanding the process to follow and the order in which operations should be implemented
- You will cover how to mount/umount a filesystem as well as all file and directory operations on directories, reglar files, hard links and symlinks.
- Understanding kernel debugging techniques from simple use of printk calls to source level debugging with gdb/KGDB.
This course will teach you how to develop a Linux kernel filesystem from scratch.
You will learn everything from building the commands and kernel module, loading the module, mounting a filesystem, unmounting and removing the module. All basic file / filesystem operations are supported with a module for each operation. We’ll cover everything from file, directory, symlink and hard link creation to reading and writing files to details about filesystem / kernel interactions. There is also a chapter covering how to undelete a file which also highlights potential security issues. With the kernel module, mkfs and fsdb commands, the SPFS filesystem is only 2300 lines of code. The source code is accessible on-line and will be updated every year for new versions of Ubuntu Linux.
You will learn the strategy to follow when building a new filesystem. What operations need to come first and which ones can wait until later.
You will also learn how to debug the filesystem using a number of techniques from simple use of printk to source-level debugging using gdb/KGDB.
The filesystem is very simple and contains intentional errors which help with understanding why the order of operations is very important during filesystem design.
The course is supported by a free 450-page online Linux kernel filesystem book.