You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2013/03/28/unattended-ubuntu-install-in-a-vm/index.html
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ <h1><a href="/2013/03/28/unattended-ubuntu-install-in-a-vm/">Unattended Ubuntu i
61
61
62
62
</section>
63
63
<sectionid="section-2">
64
-
<h2id="getanubuntuinstallationimage">Get an Ubuntu installation image</h2>
64
+
<h2id="get-an-ubuntu-installation-image"><ahref="#get-an-ubuntu-installation-image">Get an Ubuntu installation image</a></h2>
65
65
66
66
<p>I’m using the latest 64-bit LTS server ISO which is marked 12.04.2 at the moment of writing this. I also recommend downloading it via torrent then keep it seeding.</p>
67
67
@@ -70,7 +70,7 @@ <h2 id="getanubuntuinstallationimage">Get an Ubuntu installation image</h2>
<p>Adjust isolinux.cfg and preseed files to your needs. The options needed before the installer mounts the installation media should go into isolinux.cfg as part of the append statement. Every other preconfiguration for the installer could be set in the preseed file (list of preseed options). All path info in the below examples should be seen as if the root directory was the ISO image’s root.</p>
<p>In order to don’t stop to wait for any user input I needed to specify the following minimal set of preconfiguration options: hostname, initial user’s full name, username and MD5 hashed password, home directory encryption, timezone, partition setup, mirror config, update policy, additional packages to be insalled, GRUB installation, and how to finish the installation.</p>
<p><strong>Edit: install acpid by default as it is needed for proper VM shutdown. The initial username/password is ubuntu/ubuntu in this example.</strong></p>
<p>I have <ahref="https://cli.github.com">GitHub CLI</a> installed and configured, so I will use that as an example below along with the app-text/vale ebuild I worked on last time. Similar tools could work as well, like <ahref="https://hub.github.com/">hub</a>, or even a mix of browser interactions and plain git commands.</p>
130
130
131
-
<h3id="preparetherepository">Prepare the repository</h3>
131
+
<h3id="prepare-the-repository"><ahref="#prepare-the-repository">Prepare the repository</a></h3>
<code>-H</code> or <code>-G</code> options, or with the <code>on</code> option of
143
143
<ahref="https://metacpan.org/pod/Rex::Commands#run_task"><code>run_task</code></a> from code.</p>
144
144
145
-
<h2id="overridethetaskstargettolocal">Override the task’s target to <code><local></code></h2>
145
+
<h2id="override-the-tasks-target-to-local"><ahref="#override-the-tasks-target-to-local">Override the task’s target to <code><local></code></a></h2>
146
146
147
147
<p>The <code>-H</code> command line option supports the same special <code><local></code> hostname:</p>
148
148
@@ -166,7 +166,7 @@ <h2 id="overridethetaskstargettolocal">Override the task’s target to <code><
166
166
<p>This approach allows users to intentionally choose local execution, regardless
167
167
of a task having an explicit target or not.</p>
168
168
169
-
<h2id="disablesshpertaskwithno_sshtask">Disable SSH per task with <code>no_ssh task</code></h2>
169
+
<h2id="disable-ssh-per-task-with-no_ssh-task"><ahref="#disable-ssh-per-task-with-no_ssh-task">Disable SSH per task with <code>no_ssh task</code></a></h2>
170
170
171
171
<p>The <code>no_ssh</code> command hints individual tasks to not use SSH:</p>
172
172
@@ -190,7 +190,7 @@ <h2 id="disablesshpertaskwithno_sshtask">Disable SSH per task with <code>no_ssh
190
190
<p>See also the <ahref="https://metacpan.org/pod/Rex::Commands#no_ssh">no_ssh</a>
191
191
documentation.</p>
192
192
193
-
<h2id="disablesshgloballywithno_ssh">Disable SSH globally with <code>no_ssh</code></h2>
193
+
<h2id="disable-ssh-globally-with-no_ssh"><ahref="#disable-ssh-globally-with-no_ssh">Disable SSH globally with <code>no_ssh</code></a></h2>
194
194
195
195
<p>In case none of the tasks need SSH to connect to their targets, the <code>no_ssh</code>
196
196
command can disable it globally:</p>
@@ -212,7 +212,7 @@ <h2 id="disablesshgloballywithno_ssh">Disable SSH globally with <code>no_ssh</co
212
212
<p>See also the <ahref="https://metacpan.org/pod/Rex::Commands#no_ssh">no_ssh</a>
213
213
documentation.</p>
214
214
215
-
<h2id="runningpartsofataskwithinlocalblocks">Running parts of a task within <code>LOCAL{}</code> blocks</h2>
215
+
<h2id="running-parts-of-a-task-within-local-blocks"><ahref="#running-parts-of-a-task-within-local-blocks">Running parts of a task within <code>LOCAL{}</code> blocks</a></h2>
216
216
217
217
<p>Wrapping parts of the task steps in a <code>LOCAL{}</code> block forces these to run on
218
218
the local machine instead of on the target in effect otherwise:</p>
@@ -233,7 +233,7 @@ <h2 id="runningpartsofataskwithinlocalblocks">Running parts of a task within <co
233
233
<p>See also the <ahref="https://metacpan.org/pod/Rex::Commands#LOCAL">LOCAL</a>
234
234
documentation.</p>
235
235
236
-
<h2id="connecttolocalhostoverssh">Connect to local host over SSH</h2>
236
+
<h2id="connect-to-local-host-over-ssh"><ahref="#connect-to-local-host-over-ssh">Connect to local host over SSH</a></h2>
237
237
238
238
<p>Using the identity of the local machine as target makes it possible to treat it
239
239
the same way as remotes, including connecting to it using SSH like to any
0 commit comments