1

I'm hoping to write some tools to help in processing the file system UFS on a disk given access to the raw data. I've learned a bunch about UFS already and know that most Unix/Linux file systems have some commonality. I will read in the FS structures and then hopefully be able to traverse things like a file system driver would. The difficulty now lies in documentation on how UFS does its thing. I've read lots of higher level stuff but I would like to see something like this which is for ext2 - http://homepage.smc.edu/morgan_david/cs40/analyze-ext2.htm .

That page is great in that it shows the full definition of the superblock, inode, directory entry etc. I've also learned how inodes work in other research. I've made a FreeBSD installation and am analyzing it to compare and it is similar. However I know there are differences. Also I'm not sure how some things are done such as finding the inode for a file. That link for ext2 says to do this-

  1. visiting the inode for the root directory (inode 2) to get the location of the data for the root directory
  2. visiting the data for the root directory to find the directory entry for alpha1
  3. visiting the entry for alpha1 to get the location of the inode for alpha1
  4. visiting the inode for alpha1 to get the location of the data for alpha1
  5. visiting the data of alpha1 (the alphabet)

I can't figure out step 3. Ok I see the inode number in the directory entry for a file. How does that give you the inode location? How do I find the inode?

Better references would be fantastic. I haven't found any books out there that might help but I'm definitely willing to buy a book.

Thanks for any help!

Michael K
  • 1,031
  • 2
  • 14
  • 27

0 Answers0