C-Ext2-Filesystem / README.md
README.md
Raw

Hey! I'm Filing Here

One line description of this code. Code that creates a file system image, with root dir, lost+found dir, hello-world, and a symlink to hello-world

Building

Explain briefly how to build your program. To build the program, run make This will build/recompile the executable, along withn associated binary files.

Running

Show how to compile, mount, and example output of ls -ain your mounted filesystem. In order to run the program properly, follow these steps build the program based on Building

  1. make create the image file
  2. ./ext2-create make a mnt dir
  3. mkdir ./mnt mount the directory in current directory to the image
  4. sudo mount -0 loop cs111-base.img mnt cd into the mnt
  5. cd ./mnt perform any tasks within the mounted drive, eg ls
  6. ls -ain

example output: total 7 2 drwxr-xr-x 3 0 0 1024 Dec 2 01:04 . 1091380 drwxr-xr-x 4 1000 1000 4096 Dec 2 01:04 .. 13 lrw-r--r-- 1 1000 1000 11 Dec 2 01:04 hello -> hello-world 12 -rw-r--r-- 1 1000 1000 12 Dec 2 01:04 hello-world 11 drwxr-xr-x 2 0 0 1024 Dec 2 01:04 lost+found

Debugging steps include:

dumpe2fs cs111-base.img dumps filesystem info to stdout fsck.ext2 cs111-base.img checks correctness of filesystem and reports any errors encountered

Cleaning up

Explain briefly how to unmount the filesystem, remove the mount directory, and clean up all binary files. To clean additional files created when running, do the following: (optional) exit out of mnt directory if currently in it, eg cd ..

  1. sudo umount mnt
  2. rmdir mnt
  3. make clean This will remove the mnt directory by unmounting it, then using rmdir to delete it make clean will clean up all additional files created in build