The principles contained in this section are specific to the filesystems used by Linux, such as EXT4.
Unix filesystem
Root and inodes
In Linux and macOS, each file and directory is represented by an inode, which is a special data structure that stores all the information about the file except its name and its actual data.
Inode 0 is used for a null value, which means that there is no inode. Inode 1 is used to record any bad block on the disk. The root of the hierarchical structure of the filesystem uses inode 2. It is represented by /.
From the latest Linux kernel source, we can see how the first inodes are reserved. This is shown as follows:
#define EXT4_BAD_INO 1 /* Bad blocks inode */
#define EXT4_ROOT_INO 2 /* Root...