<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AN12714 can't re-mount encrypted drive in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/AN12714-can-t-re-mount-encrypted-drive/m-p/1485545#M192249</link>
    <description>&lt;P&gt;I'm following AN12714 and the creation of the encrypted image and mounting to /mnt/encrypted goes fine.&lt;/P&gt;&lt;P&gt;When I reboot and try to run dmsetup again I see this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx:~# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/loop0) crypt capi:tk(cbc(aes))-plain :36:logon:logkey: 0 /dev/loop0 0 1 sector_size:512"
device-mapper: reload ioctl on encrypted failed: Required key not available Command failed.&lt;/LI-CODE&gt;&lt;P&gt;If I load the original key it's fine&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx:~# cat /data/caam/randomkey | keyctl padd logon logkey: @s
308049694
root@imx:~# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/loop0) crypt capi:tk(cbc(aes))-plain :36:logon:logkey: 0 /dev/loop0 0 1 sector_size:512"
Name:              encrypted
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      252, 0
Number of targets: 1
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I now can't mount&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx:~# mount /dev/mapper/encrypted /mnt/encrypted/
mount: /mnt/encrypted: wrong fs type, bad option, bad superblock on /dev/mapper/encrypted, missing codepage or helper program, or other error.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the first question is I guess why doesn't importKey work? But, if I could just get the mount to work I'd be happy.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 16:19:48 GMT</pubDate>
    <dc:creator>richc128</dc:creator>
    <dc:date>2022-07-06T16:19:48Z</dc:date>
    <item>
      <title>AN12714 can't re-mount encrypted drive</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/AN12714-can-t-re-mount-encrypted-drive/m-p/1485545#M192249</link>
      <description>&lt;P&gt;I'm following AN12714 and the creation of the encrypted image and mounting to /mnt/encrypted goes fine.&lt;/P&gt;&lt;P&gt;When I reboot and try to run dmsetup again I see this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx:~# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/loop0) crypt capi:tk(cbc(aes))-plain :36:logon:logkey: 0 /dev/loop0 0 1 sector_size:512"
device-mapper: reload ioctl on encrypted failed: Required key not available Command failed.&lt;/LI-CODE&gt;&lt;P&gt;If I load the original key it's fine&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx:~# cat /data/caam/randomkey | keyctl padd logon logkey: @s
308049694
root@imx:~# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/loop0) crypt capi:tk(cbc(aes))-plain :36:logon:logkey: 0 /dev/loop0 0 1 sector_size:512"
Name:              encrypted
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      252, 0
Number of targets: 1
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I now can't mount&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx:~# mount /dev/mapper/encrypted /mnt/encrypted/
mount: /mnt/encrypted: wrong fs type, bad option, bad superblock on /dev/mapper/encrypted, missing codepage or helper program, or other error.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the first question is I guess why doesn't importKey work? But, if I could just get the mount to work I'd be happy.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 16:19:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/AN12714-can-t-re-mount-encrypted-drive/m-p/1485545#M192249</guid>
      <dc:creator>richc128</dc:creator>
      <dc:date>2022-07-06T16:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: AN12714 can't re-mount encrypted drive</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/AN12714-can-t-re-mount-encrypted-drive/m-p/1490714#M192631</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/53582"&gt;@richc128&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-&amp;gt; reload ioctl on encrypted failed&lt;/P&gt;
&lt;P&gt;Please check if you have successfully add black key to key retention service, you can perform "keyctl list&amp;nbsp;@s".&amp;nbsp; Or you need to check if successfully import black key from blob and add it to key retention service&lt;/P&gt;
&lt;P&gt;-&amp;gt; can't mount&lt;/P&gt;
&lt;P&gt;Please check if you set up the ext4 file system for the respective devices or you have imported the correct key.&lt;/P&gt;
&lt;P&gt;By the way, Suppose that you have built the bsp with version 5.4.47 as the AN. I try it without problem. If you didn't perform it with the same, please check the kernel configuration as&amp;nbsp;5 Appendix A. Configuration of the AN.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Harvey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 04:26:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/AN12714-can-t-re-mount-encrypted-drive/m-p/1490714#M192631</guid>
      <dc:creator>Harvey021</dc:creator>
      <dc:date>2022-07-18T04:26:45Z</dc:date>
    </item>
  </channel>
</rss>

