<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=6603&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] Network based disk encryption using clevis & tang fails]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=6603</link>
		<description><![CDATA[The most recent posts in [SOLVED] Network based disk encryption using clevis & tang fails.]]></description>
		<lastBuildDate>Fri, 17 May 2024 14:37:28 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Network based disk encryption using clevis & tang fails]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=49963#p49963</link>
			<description><![CDATA[<p>Solved. </p><p>Solution documented: <a href="https://github.com/JarlMorgennebel/homelab/tree/main/devuan" rel="nofollow">https://github.com/JarlMorgennebel/home … ain/devuan</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Morgennebel)]]></author>
			<pubDate>Fri, 17 May 2024 14:37:28 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=49963#p49963</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Network based disk encryption using clevis & tang fails]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=49909#p49909</link>
			<description><![CDATA[<p>Ok.</p><p>Perhaps it requires &quot;netconsole&quot;&#160; for entering password if you don&#039;t have console access.<br />See <a href="https://www.kernel.org/doc/Documentation/networking/netconsole.txt" rel="nofollow">https://www.kernel.org/doc/Documentatio … onsole.txt</a></p><p>That would&#160; mean to use the &quot;netconsole=&quot; boot parameter rather than (or maybe together with) the &quot;ip=&quot; parameter. At the console end you can run a &quot;socat&quot; process, as per exmaple &quot;3)&quot; on that page.</p><p>EDIT: you might also want/need the <span class="bbc">pty</span> option on the socat service, to make it &quot;user friendlier&quot;.</p><p>EDIT 2: It&#039;s probably obvious, but I don&#039;t know anything about &quot;clevis&quot; or &quot;tang&quot;, so keep filtering my loose ideas.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Sun, 12 May 2024 21:42:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=49909#p49909</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Network based disk encryption using clevis & tang fails]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=49904#p49904</link>
			<description><![CDATA[<p>Some more digging:</p><div class="codebox"><pre><code>ip=dhcp</code></pre></div><p>as kernel parameter within /etc/default/grub raised errors. Replaced this with</p><div class="codebox"><pre><code>ip=192.168.1.187::192.168.1.1:255.255.255.0:guldukat:eth0:none:192.168.1.2</code></pre></div><p>which adds one more step:</p><div class="codebox"><pre><code>...
cryptsetup: WARNING: sdb3_crypt: ignoring unknown option &#039;_netdev&#039;
Please unlock disk sdb3_crypt: Begin: clevis: Waiting for interface eth0 to become available ... done
Begin: Waiting up to 180 secs for eth0 to become available ... done
IP-Config: eth0 hardware address d8:XX:XX.XX.XX.XX:XX mtu 1500
IP-Config: eth0 guessed broadcast address 192.168.1.255
IP-Config: eth0 complete:
   address: 192.168.1.187    broadcast: 192.168.1.255    netmask 255.255.255.0
   gateway: 192.168.1.1      dns0: 192.168.1.2           dns1: 0.0.0.0</code></pre></div><p>So r8169 seems to be loaded and configured, but clevis still fails....</p><p>-MN</p>]]></description>
			<author><![CDATA[dummy@example.com (Morgennebel)]]></author>
			<pubDate>Sun, 12 May 2024 15:53:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=49904#p49904</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Network based disk encryption using clevis & tang fails]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=49903#p49903</link>
			<description><![CDATA[<p>Thank you.</p><p>I just reinstalled after testing &quot;apt install dracut&quot; which resulted in a blank screen after grub :-/</p><p>On a fresh installation</p><div class="codebox"><pre><code>allow-hotplug eth0</code></pre></div><p>is missing from /etc/network/interfaces.</p><p>Also </p><div class="codebox"><pre><code>update-initramfs -v | grep interfaces</code></pre></div><p> results in an empty output - how do I add this file into initramfs?</p><p>Thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (Morgennebel)]]></author>
			<pubDate>Sun, 12 May 2024 14:48:23 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=49903#p49903</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Network based disk encryption using clevis & tang fails]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=49902#p49902</link>
			<description><![CDATA[<p>Does your initrd contain file <span class="bbc">/etc/network/interfaces</span> with the lines</p><div class="codebox"><pre><code>allow-hotplug eth0
iface eth0 inet dhcp</code></pre></div><p>I would belive that to be needed in order to get the network interface configured before decryption.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Sun, 12 May 2024 12:42:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=49902#p49902</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Network based disk encryption using clevis & tang fails]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=49901#p49901</link>
			<description><![CDATA[<p>Hej,</p><p>I am trying to implement a Network based disk encryption based on LUKS, clevis and tang.</p><p>Tang-server is a Pi Zero 2 running Raspberry OS lite and tang from apt repositories.</p><p>My client is a fresh installation of Daedalus. I installed clevis using apt:</p><div class="codebox"><pre><code>apt install powertop vim-nox clevis-initramfs clevis-luks clevis-tpm2</code></pre></div><p>and configured LVM-over-LUKS:</p><div class="codebox"><pre><code>root@guldukat:~# lsblk
NAME                 MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
sda                    8:0    0 29.8G  0 disk  
├─sda1                 8:1    0  365M  0 part  /boot/efi
├─sda2                 8:2    0  954M  0 part  /boot
└─sda3                 8:3    0 28.5G  0 part  
  └─sda3_crypt       254:0    0 28.5G  0 crypt 
    ├─FlashMem-opt   254:1    0  7.4G  0 lvm   /opt
    ├─FlashMem-swap  254:2    0  3.7G  0 lvm   [SWAP]
    └─FlashMem-root  254:3    0 17.3G  0 lvm   /
sdb                    8:16   0  1.8T  0 disk  
└─sdb1                 8:17   0  1.8T  0 part  
  └─sdb1_crypt       254:4    0  1.8T  0 crypt 
    └─USB2TBSSD-data 254:5    0  1.8T  0 lvm   /data</code></pre></div><p>For both /dev/sda3 and /dev/sdb1 the tang server registered successfully:</p><div class="codebox"><pre><code>cryptosetup luksDump /dev/sda3 </code></pre></div><p>reports</p><div class="codebox"><pre><code>...
Tokens:
  0: clevis
	Keyslot:    1
....</code></pre></div><p>I am failing with automatic decryption during boot, as the network is unreachable. As documented in clevis &amp; tang documentation I have:</p><p>Changed /etc/default/grub to include</p><div class="codebox"><pre><code>GRUB_CMDLINE_LINUX_DEFAULT=&quot;quiet rd.neednet=1 ip=dhcp&quot;</code></pre></div><p>Added the module in /etc/initramfs-tools/modules to include my network card driver:</p><div class="codebox"><pre><code>r8169</code></pre></div><p>Added to /etc/crypttab the options _netdev</p><div class="codebox"><pre><code>sda3_crypt UUID=1f4eXXXX-...-baXXXXX9cf0 none luks,discard,_netdev
sdb1_crypt UUID=7YYYYYe12-...-9a2dbYYYYYYf none luks,discard,_netdev</code></pre></div><p>Recreated initrd using</p><div class="codebox"><pre><code>update-initramfs -v -u -k &#039;all&#039;</code></pre></div><p>and updated grub</p><div class="codebox"><pre><code>update-grub</code></pre></div><p>However during a reboot no network is found and clevis cannot reach the tang server. The network module and dhpc appears much later after unlocking the disks manually.</p><p>My Google-Fu show a lot of recommendations for dracut instead of update-initramfs, but I think the error is more around network availability during early grub or early kernel stages.</p><p>Any advice?</p><p>Thanks, -MN</p>]]></description>
			<author><![CDATA[dummy@example.com (Morgennebel)]]></author>
			<pubDate>Sun, 12 May 2024 10:04:24 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=49901#p49901</guid>
		</item>
	</channel>
</rss>
