Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Linux Kernel Filesystem Development
Rating: 4.5 out of 5(112 ratings)
1,536 students

Linux Kernel Filesystem Development

How to develop a Linux kernel disk-based filesystem from scratch
Created bySteve Pate
Last updated 3/2024
English

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.

Course content

24 sections24 lectures6h 42m total length
  • Introduction6:23

    Welcome to my course on implementing kernel-based filesystems for Linux.

    This introductory module will go over some basic information about the course such as programming requirements, required knowledge of the kernel and system requirements for loading and running the filesystem.

    We’ll cover what topics we’ll be going through and the major things that you’ll learn throughout the course.

    I’ll also go over some caveats about the filesystem that we’ll be using for the course. SPFS was developed specifically for this course and while very simple, is lacking in error checking and does has some bugs.

Requirements

  • Linux/UNIX development, basic kernel knowledge, good working level of C
  • No need for assembler language or the ability to build a Linux kernel. You'll just need to install Ubuntu and development tools and compile the filesystem and commands

Description

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.

Who this course is for:

  • Experienced developers who wish to explore Linux kernel development, specifically in the area of filesystems