<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[HyperForum — serial-console only with full disk encryption]]></title>
	<link rel="self" href="https://forums.hyperbola.info/extern.php?action=feed&amp;tid=821&amp;type=atom" />
	<updated>2023-03-06T13:16:41Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.hyperbola.info/viewtopic.php?id=821</id>
		<entry>
			<title type="html"><![CDATA[Re: serial-console only with full disk encryption]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=5812#p5812" />
			<content type="html"><![CDATA[<p>Thanks for sharing the information! <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[throgh]]></name>
				<uri>https://forums.hyperbola.info/profile.php?id=347</uri>
			</author>
			<updated>2023-03-06T13:16:41Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=5812#p5812</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[serial-console only with full disk encryption]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=5809#p5809" />
			<content type="html"><![CDATA[<p>Hi all,</p><p>I posted the following on a different forum, but I have tried it with Hyperbola and it works just as well.</p><p>I work mostly in the console, so I usually run my server VMs with serial console output only. More recently I have begun to fully encrypt the whole os, without a separate /boot partition. All went well until I realized that the cryptomount command which is called by Grub, is executed before the serial console initialization and as a result the prompt to enter the passphrase was not being passed to the serial console. I started working to fix the problem only to find out that as far as I could see, there were no simple clear examples of how to solve this specific problem. So here I am trying to detail how I fixed the problem in case this is useful to anyone else.</p><p>Cheers, and please feel free to correct/improve my post.</p><p>NOTE:</p><p>* My setup uses BIOS/MBR, but should also work for UEFI with small tweaks.<br />* I assume that the reader already knows how to configure grub to display in the serial console.<br />* Check your grub.cfg carefully for all the modules that need to be preloaded in the core.img ... i.e. luks2 vs luks<br />* A subsequent grub-install will blow out this configuration and it will no longer work.</p><p>I worked out the solution based on information provided by these two links:</p><p><a href="https://wiki.archlinux.org/title/GRUB/Tips_and_tricks">https://wiki.archlinux.org/title/GRUB/Tips_and_tricks</a><br /><a href="https://cryptsetup-team.pages.debian.ne">https://cryptsetup-team.pages.debian.ne</a></p><p>&nbsp; &nbsp; ----------------- early-grub.cfg ----------------------------------<br />&nbsp; &nbsp; serial --unit=0 --speed=9600<br />&nbsp; &nbsp; terminal_output serial<br />&nbsp; &nbsp; terminal_input serial</p><p>&nbsp; &nbsp; cryptomount -u YOUR_UUID</p><p>&nbsp; &nbsp; set root=(cryptouuid/YOUR_UUID)<br />&nbsp; &nbsp; set prefix=/boot/grub<br />&nbsp; &nbsp; configfile grub.cfg<br />&nbsp; &nbsp; ----------------------------------------------------------------------------</p><div class="codebox"><pre><code>grub-mkimage -c early-grub.cfg  -o /boot/grub/i386-pc/core.img -O i386-pc biosdisk cryptodisk ext2 gcry_rijndael gcry_sha256 gzio luks part_gpt part_msdos serial terminal configfile keylayouts at_keyboard 
grub-bios-setup -d /boot/grub/i386-pc/ /dev/YOUR_DISK</code></pre></div>]]></content>
			<author>
				<name><![CDATA[larissa]]></name>
			</author>
			<updated>2023-03-06T02:45:15Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=5809#p5809</id>
		</entry>
</feed>
