Search code examples
operating-systemfilesystemsminix

Where are Minix directory entries?


I am trying to understand the Minix file system structure. I understand that the first block is the boot block, and the second is the superblock; and after the bitmaps the inodes come, followed by data blocks.

But where are the directory entries and file names; and how can I traverse them? I am super confused.


Solution

  • I had already received the Tumbleweed batch but thanks for the effort anyway, people.

    If anybody ever stumbles upon this, I found the directory and file entries in the data blocks. First, read the root inode (which is inode #1), then traverse its zones to find directory entries (each of which are 64 bytes in Minix3 fs, so each block can contain 1024/64 = 16 entries). Each directory entry contains the 4-byte inode index of the directory, so you recursively proceed.