Hello, I am trying to use a combination of DM-Verity and DM-Crypt (plain Mode) in Linux. This is an embedded system on the IMX6. When my system boots up, in the init script, the DM-Verity check is carried out first , and if successful the DM-Crypt check is carried out. So the script looks somewhat like what I have pasted below my mail. I have removed the error handling below to make is readable. The calls “veritysetup create ..” and “cryptsetup open” succeed. So the DM-Verity and DM-Crypt devices are created. However, the mounting of DM-Crypt device (/dev/mapper/plainMap) on the path /newroot fails with the following error. mount: mounting /dev/mapper/plainMap on /newroot/ failed: Invalid argument But I don’t see what argument is invalid in : mount -t ext4 -o ro /dev/mapper/plainMap /newroot/ Does anybody have any pointers on why this error might be coming. I have seen this error before while working with just DM-Verity but it went away on its own and I could not figure out why it came or why it went away. Presently DM-Verity works independently and so does DM-Crypt on this very setup. But the combination has this problem. However, even this combination has worked at some point before on a different setup. But I would like to figure out the root cause of this error if I can. Regards, Vidyesh root=/dev/mmcblk0p13 verity=/dev/mmcblk0p14 ROOT_HASH=`cat /root-hash-crypt` echo -e "calling veritysetup create vroot with root = $root, verity = $verity\n" veritysetup create vroot $root $verity $ROOT_HASH --debug echo "Calling cryptsetup open with /dev/mapper/vroot and plainMap \n" cryptsetup --type=plain open /dev/mapper/vroot plainMap --debug < /keyfile mkdir /newroot echo "Mounting dm-crypt block device in read-only mode in newroot" mount -t ext4 -o ro /dev/mapper/plainMap /newroot/ |
_______________________________________________ dm-crypt mailing list dm-crypt@xxxxxxxx https://www.saout.de/mailman/listinfo/dm-crypt