System X Filesystem

Root Filesystem Organization

The System X root filesystem is implemented as a Windows file 'root.fs' located in the system-x/fs subdirectory of the %CMAJOR_ROOT% (e.g. C:\cmajor) directory. The root filesystem file consists of a sequence of 4K blocks of various kind:

block cardinality description
superblock 1 information about the root filesystem amounts
block number blocks N list of blocks containing free block numbers
inode blocks N list of blocks containing inodes (one inode per file)
directory blocks and file data blocks N list of data blocks that contain either directory entries or file data, in arbitrary order

If the Windows 'root.fs' file is removed or renamed, the kernel creates a new default one next time the sxx virtual machine is run. This is for the case the current 'root.fs' becomes corrupted for example.

File Paths

The directory separator character is '/' as in Unix.

Mounted Windows Directories

System X virtual machine kernel automatically creates mount points for the root directories of Windows hard drives, for the %CMAJOR_ROOT% directory and %CMAJOR_ROOT%\system-x directory:

Windows directory mount point
C:\ /mnt/c
D:\ /mnt/d
hard drive X:\ /mnt/x
value of environment variable %CMAJOR_ROOT% (for example having value C:\cmajor) /mnt/cmajor
%CMAJOR_ROOT%\system-x (for example C:\cmajor\system-x) /mnt/sx

User Accounts and File Access Permissions

The System X kernel creates two user accounts the first time the sxx virtual machine is run: the root account (UID 0), and a user account (UID 1) with the same name as the logged on Windows user. The current Windows user is by default member of the admin group (root, GID 0) and is added to the /etc/sudoers file. By default these accounts have no passwords, but a password can be set for an account using the passwd utility.

Each file and directory have permission bits for the current user, for the group of the current user and for others. The /bin and /etc directories are by default owned by the root account and given only read and execute permissions for the root group and other accounts. Write access can be obtained by executing a command with the sudo utility.

The System X access permission system is not designed for real security in mind. It protects the files and directories for removal or change by accident, not against fraud. To strengthen the security, Windows files e.g. 'root.fs' and directories, executables and Cmajor configuration files should be protected using the Windows security system.

User Home Directory

Each time the shell sh.x is run, for each user (other than root) a home directory /home/USER owned by the USER is created if it does not already exist.