Reputation: 1
How do you construct a file system disk image and then look at its disk layout in bitmap files? How do you add directories to it?
I've used mkfs.ext2 on a file that I made using dd, but I'm not sure if it’s done correctly.
I need to be able to see the inodes and inode table and see how they relate to the blocks.
Upvotes: 0
Views: 2651
Reputation: 6784
Use dd
, mkfs.ext{2,3,4}
, and losetup
to create a disk image, a file system and mount the device.
Next, you may want to explore and learn using debugfs - ext2/ext3/ext4 file system debugger. This has a lot of commands, bmap
, dump
, dump_extents
and many more.
Additionally, if you want to read the file system meta data and debug, it would be good idea to explore the tune2fs
, and e2image
commands which would require a good understanding of file system internals.
Upvotes: 0