Originally Posted by marozsas
Did you know "debugfs" ? I think is a good starting point. It is part of e2fsprogs package.
Actualy I want to parse ext2 file system manually.
I have made ext2 filesystem image by mke2fs command. shown as below,
# dd if=/dev/zero of=init-ramdisk.img bs=1k count=8k
# mke2fs -i 1024 -b 1024 -m 3 -F -v init-ramdisk.img
# mkdir temp
# mount -o loop init-ramdisk.img temp
# cd temp
# (Do what you need to do.)
# cd ..
# umount temp
# gzip -9 init-ramdisk.img
Now as you have mentioned debugfs
gives me required information, but I dont want to use that utility I want to parse it on my own.
So, is there any thing like header in that ext2 file system image? From which I can parse various information of file system.
I tried to search for header but not able to understand.