The root file system is the file system that is directly mounted by the kernel during the boot phase and that holds the system initialization scripts and the most essential system programs. More specifically, the root file system includes the root directory together with a minimal set of subdirectories and files including ‘/boot’, ‘/dev’, ‘/etc’, ‘/bin’, ‘/sbin’ and sometimes ‘/tmp’.
Mounting the root file system is a crucial part of system initialization. The Linux kernel allows the root file system to be stored in many different places [4], such as a hard disk partition, a floppy disk, a ramdisk or a remote file system shared via NFS. In any case, the root file system can be specified as a device file in the ‘/dev’ directory either when compiling the kernel or by passing a suitable ‘root=’ option to the initial bootstrap loader. The root file system is mounted in a two-stage procedure:
The root file system of a domU guest can be stored on a disk image in dom0, on a physical disk partition or in a directory hierarchy on dom0 or on a remote system which can be exported to the client via NFS. In this section we follow the last approach. More specifically, the root file system for the domU guest will be located on an exported directory hierarchy stored in a NFS server. This server could be dom0 guest, a remote machine or even another domU guest. Our goal is the domU client to mount this exported directory hierarchy as its root file system via NFS.
- The kernel mounts the special ‘rootfs’ file system, which provides an empty directory.
- The kernel mounts the real root file system over this empty directory.
The root file system of a domU guest can be stored on a disk image in dom0, on a physical disk partition or in a directory hierarchy on dom0 or on a remote system which can be exported to the client via NFS. In this section we follow the last approach. More specifically, the root file system for the domU guest will be located on an exported directory hierarchy stored in a NFS server. This server could be dom0 guest, a remote machine or even another domU guest. Our goal is the domU client to mount this exported directory hierarchy as its root file system via NFS.