# if [ $signing_result != 0 ]; then exit 2; fi
############################################################################
- /sbin/dmsetup create $NAME -r --table "0 $dmsetup_sectors verity 1 $ROOTFS $ROOTFS 4096 4096 \
- $dmsetup_blocks $dmsetup_hash_offset sha256 $root_hash $salt 1 ignore_zero_blocks"
+ # replace dmsetup to veritysetup
+ # veritysetup reads super block to retrieve parameters:
+ # data block size, hash block size, number of data block, hashing algorithm, salt
+ /sbin/veritysetup --hash-offset=$hash_offset --ignore-zero-blocks open $ROOTFS $NAME $ROOTFS $root_hash
- mount /dev/mapper/$NAME /sysroot
+ mount /dev/mapper/$NAME "$MOUNT_POINT"
exit 1
elif [ "$enable" = b0b0b0b0 ]
then