<?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 Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1657481#M206541</link>
    <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/1941"&gt;@Yuri&lt;/a&gt; and &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/159054"&gt;@marouene_boubakri&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Could you confirm if the document in the&lt;A href="https://community.nxp.com/docs/DOC-342300" target="_blank" rel="noopener"&gt;"Root filesystem encryption using DM-Crypt"&lt;/A&gt; is the same as &lt;A href="https://www.nxp.com/docs/en/application-note/AN12714.pdf" target="_blank" rel="noopener"&gt;https://www.nxp.com/docs/en/application-note/AN12714.pdf&lt;/A&gt; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 May 2023 08:36:57 GMT</pubDate>
    <dc:creator>khang_letruong</dc:creator>
    <dc:date>2023-05-25T08:36:57Z</dc:date>
    <item>
      <title>How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/794818#M123086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been&amp;nbsp;trying&amp;nbsp;to do full disk encryption on iMX6 Quad eMMC (the version I use is EmbeddedArtists &lt;A href="https://www.embeddedartists.com/products/imx6-quad-com/?gclid=Cj0KCQiA597fBRCzARIsAHWby0HeXN2ZAaWmSDp2zzv59oYhuYqHmWUAzih0X81uig7bZT-v53wZSTsaAkT1EALw_wcB"&gt;imx6qea C&lt;/A&gt;OM on their carrier board)&lt;/P&gt;&lt;P&gt;What I have done is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Rebuilding&amp;nbsp;fsl-image-mfgtool-initramfs to support disk encryption in the kernel and cryptsetup in the image itself.&lt;/LI&gt;&lt;LI&gt;Attaching initial RAM file system image (initramfs) to the imx6q kernel by adding this to my local.conf and rebuilding core-image-minimal&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;INITRAMFS_IMAGE = "core-image-minimal"&lt;/P&gt;&lt;P&gt;INITRAMFS_IMAGE_BUNDLE = "1"&lt;BR /&gt;IMAGE_FSTYPES = "cpio.gz tar.bz2"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;Using mfgtools to flash the newly created&amp;nbsp;&lt;SPAN&gt;core-image-minimal and encrypting&amp;nbsp;the rootfs part using these commands:&lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;!-- the passphrase is in the file : "mfgtools_imx6q_4.9.123\Profiles\Linux\OS Firmware\firmware\keyfile" --&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;CMD state="Updater" type="push" body="send" file="firmware/keyfile" &amp;gt;Sending key file&amp;lt;/CMD&amp;gt;&lt;BR /&gt; &amp;lt;CMD state="Updater" type="push" body="$ cat $FILE | cryptsetup luksFormat /dev/mmcblk%mmc%p2 -"&amp;gt;Encrypting and Formatting rootfs partition&amp;lt;/CMD&amp;gt;&lt;BR /&gt; &amp;lt;CMD state="Updater" type="push" body="$ cryptsetup luksOpen --key-file=$FILE /dev/mmcblk%mmc%p2 mmcblk%mmc%p2"&amp;gt;Encrypting and Formatting rootfs partition&amp;lt;/CMD&amp;gt;&lt;BR /&gt; &amp;lt;CMD state="Updater" type="push" body="$ mkfs.ext3 -E nodiscard /dev/mapper/mmcblk%mmc%p2"&amp;gt;Encrypting and Formatting rootfs partition&amp;lt;/CMD&amp;gt;&lt;BR /&gt; &amp;lt;CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk%mmc%p2"/&amp;gt;&lt;BR /&gt; &amp;lt;CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mapper/mmcblk%mmc%p2 /mnt/mmcblk%mmc%p2"/&amp;gt;&lt;BR /&gt; &amp;lt;CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk%mmc%p2" file="files/%rootfs%-%board%.rootfs.tar.bz2"&amp;gt;Sending and writting rootfs&amp;lt;/CMD&amp;gt;&lt;BR /&gt; &amp;lt;CMD state="Updater" type="push" body="frf"&amp;gt;Finishing rootfs write&amp;lt;/CMD&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Booting into the kernel and its attached initramfs was successful.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;By doing the above steps, I was able to encrypt&amp;nbsp;the rootfs using cryptsetup. After the boot into initramfs, I successfully&amp;nbsp;decrypted and mounted the rootfs partition with passphrase I provided using mfgtools&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$ cryptsetup --debug -v luksOpen /dev/mmcblk3p2 rootfs&lt;BR /&gt;$ mkdir /mnt/rootfs &amp;amp;&amp;amp; mount -t ext3 /dev/mapper/rootfs /mnt/rootfs&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I was not able to do is to auto mount the encrypted rootfs instead of the kernel's attached initramfs rootfs .&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;First, the crypttab infrastructure and its scripts cryptdisks, cryptdisks_start, cryptdisks_stop, etc. used to auto mount encrypted&amp;nbsp;partitions are completely&amp;nbsp;missing&amp;nbsp;from yocto project. When you install&amp;nbsp;cryptsetup&amp;nbsp;on a normal linux distro you get these scripts automatically but not on yocto.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Another way is using&amp;nbsp;mkinitcpio scripts but it's also not a part of yocto.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Finally, I think I will also need to update the initramfs after configuring it to mount another root partition (the luks encrypted one) which is is done using the command update-initramfs which generates a new initramfs image with new conflagrations&amp;nbsp;.. Unfortunately, I was not able to find anything related to updating&amp;nbsp;initramfs&amp;nbsp;after bitbaking or maybe we have to setup everything upfront in yocto so the initramfs should be configured to auto mount the encrypted rootfs and then bitbake.&lt;/SPAN&gt;&lt;SPAN&gt;I am not sure if the above steps are the correct way to do full disk encryption on yocto or there is another way of doing it?&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2018 15:01:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/794818#M123086</guid>
      <dc:creator>f_alghamdi</dc:creator>
      <dc:date>2018-11-23T15:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/794819#M123087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; Please create request to get more information about disk encryption, &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;using CAAM-accelerated dm-crypt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;A class="link-titled" href="https://www.nxp.com/support/support:SUPPORTHOME?tid=sbmenu" title="https://www.nxp.com/support/support:SUPPORTHOME?tid=sbmenu"&gt;Support|NXP&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Have a great day,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Yuri&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Note: If this post answers your question, please click the Correct Answer &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;button. Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 06:45:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/794819#M123087</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2018-12-12T06:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/794820#M123088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Dear&lt;/SPAN&gt; &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/f.alghamdi@ntis.com.sa"&gt;f.alghamdi@ntis.com.sa&lt;/A&gt;‌,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;A _jive_internal="true" class="" data-containerid="2004" data-containertype="14" data-content-finding="Community" data-objectid="342300" data-objecttype="102" href="https://community.nxp.com/docs/DOC-342300" style="color: #2989c5; background-color: transparent; border: 0px; font-weight: inherit; padding: 1px 0px 1px calc(12px + 0.35ex);"&gt;The document "Root filesystem encryption using DM-Crypt"&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;provides detailed steps to make a transperently encrypted Root filesystem using DM-Crypt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;The target is ARM64 you&amp;nbsp;can adapt for your need (Install ARM32 toolchain and compile for ARM target instead).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;If this is exactlly what you are looking for, please mark the reply as "Correct Answer" to help other users to quickly identify and access it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;Maro&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 10:11:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/794820#M123088</guid>
      <dc:creator>marouene_boubakri</dc:creator>
      <dc:date>2019-01-09T10:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1227908#M169137</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/159054"&gt;@marouene_boubakri&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not able to access the document -&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://community.nxp.com/docs/DOC-342300" target="_blank" rel="noopener"&gt;The document "Root filesystem encryption using DM-Crypt"&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 11:05:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1227908#M169137</guid>
      <dc:creator>vinothkumars</dc:creator>
      <dc:date>2021-02-08T11:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1320960#M178135</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/159054"&gt;@marouene_boubakri&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;how can I get access to the document&amp;nbsp;"Root filesystem encryption using DM-Crypt"?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 09:13:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1320960#M178135</guid>
      <dc:creator>10sec</dc:creator>
      <dc:date>2021-08-10T09:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1323827#M178496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189659"&gt;@10sec&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Kindly refer to the Application Note&amp;nbsp;&lt;STRONG&gt;AN12714 i.MX Encrypted Storage Using CAAM Secure Keys&amp;nbsp;&lt;/STRONG&gt;Downloadable from nxp.com portale and can be found in the documentation tab of the chip/board's home page.&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Maro&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 09:08:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1323827#M178496</guid>
      <dc:creator>marouene_boubakri</dc:creator>
      <dc:date>2021-08-16T09:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1657481#M206541</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/1941"&gt;@Yuri&lt;/a&gt; and &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/159054"&gt;@marouene_boubakri&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Could you confirm if the document in the&lt;A href="https://community.nxp.com/docs/DOC-342300" target="_blank" rel="noopener"&gt;"Root filesystem encryption using DM-Crypt"&lt;/A&gt; is the same as &lt;A href="https://www.nxp.com/docs/en/application-note/AN12714.pdf" target="_blank" rel="noopener"&gt;https://www.nxp.com/docs/en/application-note/AN12714.pdf&lt;/A&gt; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 08:36:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1657481#M206541</guid>
      <dc:creator>khang_letruong</dc:creator>
      <dc:date>2023-05-25T08:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to boot into a luks encrypted rootfs partition from initramfs on imx6 quad?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1936698#M227491</link>
      <description>Can you send me this document? "Root filesystem encryption using Dm-Crypt"?</description>
      <pubDate>Tue, 20 Aug 2024 19:44:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-boot-into-a-luks-encrypted-rootfs-partition-from/m-p/1936698#M227491</guid>
      <dc:creator>pb3</dc:creator>
      <dc:date>2024-08-20T19:44:04Z</dc:date>
    </item>
  </channel>
</rss>

