How to calculate the checksum of a ext4 (eg. superblock or inode)
1
vote
1
answer
49
views
I have an image-file of an ext4 file system (filesystem.img). I am extracting sections sections of the filsystem. Is there a way to manually calculate the the checksum of the sections just with a given byte dump of the section. Given the the superblock according to the documentation the checksum is calculated by using the algorithm CRC32C over the superblock ignoring the checksum field. I have tried to do it in python with the function
checksum = crc32c.crc32c(superblock)
but with no success yet.
Has anybody managed to do this or know what I have to do there?
Any help would be appreciated.
Thanks
Asked by user722585
(11 rep)
Mar 18, 2025, 01:32 PM
Last activity: Mar 19, 2025, 04:08 AM
Last activity: Mar 19, 2025, 04:08 AM