2

So I have file system ext2 formatted image files. I like to view Inode, super block, filenames, etc. in the images for formatted file systsem . I like to know is there any tool for this. I need to view these structures like inode, superblock, file, related info like names of files, deleted inodes etc. In terminal, posssible some tool with available code in Linux. So can be editted the tool. Would be best if tool is coded in just C languange. Can anyone please do tell me this, Thanks again. Just opensource tool

user786
  • 3,902
  • 4
  • 40
  • 72

1 Answers1

1

I'm not certain I understood your question, but I think you probably just want to "loopback mount" your filesystem in a file. See here.

Failing that, I think you can use e2tools to access the contents. See here.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • I need to compile this source of e2tools do u know how this can be done and then install and reinstall https://github.com/e2tools/e2tools – user786 May 03 '22 at 09:09
  • I've never done that, but I think this is the approach... https://github.com/e2tools/e2tools/blob/master/INSTALL.from-git – Mark Setchell May 03 '22 at 09:49
  • Ok its working now. Can u also please give little bit info on the layouts of structures in EXT2 formated image files, I believe super block starts at offset 0. So if I cast like `char *..=(struct ext2_sb_info *)ext2_image_file_data` will give me superblock and there is only one superblock in a filesystem for ext2 file system. Is this correct. I also need to read inodes and file infos. can u please tell me this? – user786 May 03 '22 at 10:27
  • Sorry, I am no expert on filesystem layouts. – Mark Setchell May 03 '22 at 10:38