2

I'm using guestmount to construct 500mb ext4 filesystem for an embedded built application. Subsequent to an unmount, I want to snapshot the sha256sum of the filesystem. But if I take a copy of the file system first and I calculate the sha256sum several times? I get different answers...Why?

. #untar stuff into file system . sync

guestunmount system.img

#take a copy before calculating the checksum
cp system.img bla
SHASUM=`/usr/bin/sha256sum -b bla | awk '{print $1}'`
echo "SHA SUM is ${SHASUM}"

I added the sync command for good measure, even before I ran it the first time. It STILL gives me the wrong answer. Am I using the guestunmount command incorrectly? Does FUSE have a user space sync command I should run?

I'm running guestmount 1.32.2, linux kernel 4.10.0-42-generic

1

Well? There is now a "-d (directory)" option added to mke2fs. I was planning on doing this work myself. Somebody beat me to the punch.

My recommendation if you're looking for a simple solution is to use mke2fs and stay away from guest mount.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.