Application features - vcastilla/Shardine GitHub Wiki

Overview of features

Shardine is a graphical application designed to help students understand filesystem design and implementation. Shardine displays the content of the logical structures that comprise a filesystem, allowing you to visualize bitmaps, access inodes, explore the content of data/metadata blocks, etc. Moreover, you can edit any of these elements, which means you can alter existing structures and manually create files and directories.

Filesystem creation

Shardine can create raw disk images that contain a filesystem layout (usually files with a .img extension) and display their contents. This is achieved by using Linux loop devices. Currently, only MINIX V3 filesystems are supported.

Filesystem creation dialogue. A small file size, like 10 MiB, is usually enough.

View mode

Once a file is open, the filesystem segments (e.g., superblock, bitmaps, inodes) are shown at the top. When a segment is selected, its raw content will be shown in hexadecimal and ASCII on the right-hand side, with its meaning broken down in a table on its left. Each field has a custom textual representation (so, for instance, dates and attributes are displayed correctly). There is also an operation history, which keeps track of changes and allows the user to undo and redo any operation.

Edit mode

By clicking Edit, you enter edit mode, where you can overwrite the contents of a structure in both hexadecimal and ASCII. Once done, you can click Confirm operation to confirm the change and add it to the operation history. To save the changes, click Save or press Ctrl+S.

There is also a button labelled Check errors, which checks the consistency of the current filesystem state and displays any errors if found. Internally, this uses the fsck command family.

Mounting the filesystem

Shardine has a button to mount the file at a directory, as if it were a regular block device. If the file contents are modified externally (e.g. by the command line or a file explorer), Shardine will prompt you to reload the changes, displaying which structures have changed in the operation history. This means you can go back in time and compare the previous and current content of any structure, regardless of whether the changes were performed inside Shardine.

If there are unsaved changes within Shardine, saving them will make changes visible to file explorers. Note that sometimes this may require remounting the file.