0

I have a requirement. I have two virtual image files running light weight linux distribution (eg : slitaz),whose disk sizes are different. I want to check the integrity of the kernel running of these image files at a given point in time at block/sector level.

I have already accomplished the integrity check at file system level,by mounting the image to loop device and then accessing the required kernel files (vmlinuz and initrd) and hashing them and then comparing that hash with the genuine hash for these files.

Now I want to perform case to check integrity at block level,Here is what I did :

But is there a way to check the integrity in this case?

As we know that the contents at the block/sector level match for the part which belongs to the kernel in the two image files since they are running same linux distro.

I am unable to get block level information of the kernel resides to check for its integrity.Assuming my kernel files reside more than one block,how do i get info? Any tool or any guidance in this is greatly appreciated.

SRK
  • 49
  • 8

1 Answers1

0

If I understand correctly, does your question not simply become:

I need to know on which disk blocks exactly (within these file systems) the kernel files are located.

If that is the case (depending on the file system involved) you could probably use debugfs like described in this post.

Community
  • 1
  • 1
ChristopheD
  • 112,638
  • 29
  • 165
  • 179
  • I followed this link. http://stackoverflow.com/questions/3444844/finding-what-hard-drive-sectors-occupy-a-file The problem is my file occupies more than one extents. How do I proceed? Can you please provide me with steps? – SRK Apr 09 '14 at 22:52