therealromster / cryptsetup

Automatically exported from code.google.com/p/cryptsetup
GNU General Public License v2.0
0 stars 0 forks source link

the bug or question of the dm-verity #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Dear professor:
I'm using veritysetup the U disk to encounter the mount of map-dev is failed, 
the process of operating as following:

./veritysetup --data-block-size=4096 --data-blocks=131072 
--hash-block-size=4096 --hash-offset=536870912 format /dev/sdc2 /dev/sdc2VERITY 
header information for /dev/sdc2
UUID:             6e69dc0a-ca16-4947-8e02-dacbbdd55363
Hash type:        1
Data blocks:      131072
Data block size:  4096
Hash block size:  4096
Hash algorithm:   sha256
Salt:             
7b52f0faf119a0ea94b089d2aa8afcd41d298745b403b1931aa19cb08c629de7
Root hash:       
2c36a2013b6d3aa82d3f820ad9ed689a60a15d613fbc78bd29dea3df913253f6

root@wuj:/home/wuj/share/cryptsetup-1.6.2/src# ./veritysetup 
--data-block-size=4096 --data-blocks=131072 --hash-block-size=4096 
--hash-offset=536870912 verify /dev/sdc2 /dev/sdc2 
2c36a2013b6d3aa82d3f820ad9ed689a60a15d613fbc78bd29dea3df913253f6 

root@wuj:/home/wuj/share/cryptsetup-1.6.2/src# ./veritysetup 
--data-block-size=4096 --data-blocks=131072 --hash-block-size=4096 
--hash-offset=536870912 create dev_f2 /dev/sdc2 /dev/sdc2 
2c36a2013b6d3aa82d3f820ad9ed689a60a15d613fbc78bd29dea3df913253f6 

root@wuj:/home/wuj/share/cryptsetup-1.6.2/src# mount /dev/mapper/dev_f2 mnt/ 
mount: Block /devmapper/dev_f2 write protection, has read-only mount equipment 
mount: wrong fs type, bad option, bad superblock on /dev/mapper/dev_f2,
       missing codepage or helper program, or other error

Thanks
WuJian

Original issue reported on code.google.com by askxia...@gmail.com on 22 Nov 2013 at 9:47

GoogleCodeExporter commented 9 years ago
Maybe if you create filesystem with proper block size and device size first... 
in your case e.g.

mkfs.ext4 -b 4096 /dev/sdc2 131072

Verity setup will noe create filesystem, it will just calculate blocks 
checksums.

Please use mailing list for questions, issues area is just for bug reporting.

Original comment by gmazyl...@gmail.com on 26 Nov 2013 at 12:17