Dotfiles/docs/html/archiso.html

433 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Archiso — Custom Live Installer — M-Archy Dotfiles</title>
<style>
/* ── CyberQueer Theme ──────────────────────────────────────────────── */
:root {
--bg: #1A1A1A;
--bg2: #242424;
--bg3: #2e2e2e;
--text: #D6ABAB;
--accent: #E40046;
--violet: #5018DD;
--danger: #F50505;
--border: #5018DD;
--radius: 10px;
--radius-sm: 5px;
}
/* ── Reset & Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
background-color: var(--bg);
color: var(--text);
font-family: 'Agave Nerd Font Mono', 'JetBrains Mono', 'Fira Code',
'Cascadia Code', 'Source Code Pro', monospace;
font-size: 15px;
line-height: 1.75;
max-width: 960px;
margin: 0 auto;
padding: 2.5rem 2rem 5rem;
}
/* ── Typography ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
font-family: 'Agave Nerd Font Mono', monospace;
font-weight: 700;
line-height: 1.25;
margin-top: 2.2rem;
margin-bottom: 0.6rem;
}
h1 {
color: var(--accent);
font-size: 2.2rem;
border-bottom: 3px solid var(--accent);
padding-bottom: 0.4rem;
margin-top: 0;
}
h2 {
color: var(--accent);
font-size: 1.55rem;
border-bottom: 2px solid var(--violet);
padding-bottom: 0.3rem;
}
h3 {
color: var(--violet);
font-size: 1.2rem;
}
h4, h5, h6 {
color: var(--text);
font-size: 1rem;
}
p {
margin: 0.9rem 0;
}
strong { color: var(--accent); font-weight: 700; }
em { color: var(--violet); font-style: italic; }
/* ── Links ─────────────────────────────────────────────────────────── */
a {
color: var(--violet);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: color 0.15s, border-color 0.15s;
}
a:hover {
color: var(--accent);
border-bottom-color: var(--accent);
}
/* ── Code ──────────────────────────────────────────────────────────── */
code {
font-family: inherit;
background: var(--bg2);
color: var(--violet);
border: 1px solid var(--violet);
border-radius: var(--radius-sm);
padding: 0.1em 0.42em;
font-size: 0.9em;
}
pre {
background: var(--bg2);
border: 2px solid var(--violet);
border-radius: var(--radius);
padding: 1.2rem 1.4rem;
overflow-x: auto;
margin: 1.2rem 0;
position: relative;
}
pre code {
background: transparent;
border: none;
padding: 0;
color: var(--text);
font-size: 0.875em;
line-height: 1.6;
}
/* Syntax-like token colouring (no JS required — structural only) */
pre code .kw { color: var(--accent); }
pre code .str { color: var(--violet); }
pre code .cm { color: #666; font-style: italic; }
/* ── Horizontal Rule ───────────────────────────────────────────────── */
hr {
border: none;
border-top: 2px solid var(--violet);
margin: 2rem 0;
opacity: 0.45;
}
/* ── Blockquote ────────────────────────────────────────────────────── */
blockquote {
border-left: 4px solid var(--accent);
background: var(--bg2);
margin: 1.2rem 0;
padding: 0.8rem 1.2rem;
border-radius: 0 var(--radius) var(--radius) 0;
color: var(--text);
opacity: 0.9;
}
blockquote p { margin: 0; }
/* ── Tables ────────────────────────────────────────────────────────── */
table {
width: 100%;
border-collapse: collapse;
border: 2px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
margin: 1.2rem 0;
font-size: 0.9em;
}
th {
background: var(--violet);
color: var(--bg);
text-align: left;
padding: 0.55rem 0.9rem;
font-weight: 700;
letter-spacing: 0.03em;
}
td {
padding: 0.5rem 0.9rem;
border-top: 1px solid var(--bg3);
vertical-align: top;
}
tr:nth-child(even) td { background: var(--bg2); }
tr:hover td { background: var(--bg3); }
/* ── Lists ─────────────────────────────────────────────────────────── */
ul, ol {
padding-left: 1.6rem;
margin: 0.7rem 0;
}
li { margin: 0.25rem 0; }
ul li::marker { color: var(--accent); }
ol li::marker { color: var(--violet); font-weight: 700; }
/* ── Nav sidebar (index page) ──────────────────────────────────────── */
nav ul {
list-style: none;
padding: 0;
}
nav li { margin: 0.3rem 0; }
/* ── Page Header Bar ───────────────────────────────────────────────── */
.page-header {
border-bottom: 3px solid var(--accent);
padding-bottom: 0.6rem;
margin-bottom: 2rem;
display: flex;
align-items: baseline;
gap: 1rem;
}
.page-header .site-title {
color: var(--accent);
font-size: 0.85rem;
opacity: 0.75;
white-space: nowrap;
}
/* ── Back link ─────────────────────────────────────────────────────── */
.back-link {
display: inline-block;
color: var(--violet);
font-size: 0.85rem;
margin-bottom: 1.5rem;
padding: 0.25rem 0.75rem;
border: 1px solid var(--violet);
border-radius: 30px;
transition: background 0.15s, color 0.15s;
}
.back-link:hover {
background: var(--violet);
color: var(--bg);
border-bottom-color: transparent;
}
/* ── Footer ────────────────────────────────────────────────────────── */
footer {
margin-top: 4rem;
padding-top: 1rem;
border-top: 1px solid var(--bg3);
color: var(--text);
opacity: 0.4;
font-size: 0.8rem;
text-align: center;
}
/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 680px) {
body { padding: 1.2rem 1rem 3rem; font-size: 14px; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
table { display: block; overflow-x: auto; }
}
/* ── Selection ─────────────────────────────────────────────────────── */
::selection {
background: var(--accent);
color: var(--bg);
}
/* ── Scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
</style>
</head>
<body>
<header class="page-header">
<span class="site-title">M-Archy Dotfiles</span>
</header>
<a class="back-link" href="index.html">← Index</a>
<main>
<h1 id="archiso-custom-live-installer">Archiso — Custom Live Installer<a class="toc-anchor" href="#archiso-custom-live-installer" title="Permanent link">&para;</a></h1>
<p>The archiso build system produces a bootable Arch Linux ISO pre-loaded with the M-Archy installer scripts. Optionally, an answerfile can be embedded so the entire install — base OS + dotfiles — runs with zero user interaction.</p>
<hr />
<h2 id="prerequisites">Prerequisites<a class="toc-anchor" href="#prerequisites" title="Permanent link">&para;</a></h2>
<pre><code class="language-bash">sudo pacman -S archiso jq
</code></pre>
<hr />
<h2 id="building-the-iso">Building the ISO<a class="toc-anchor" href="#building-the-iso" title="Permanent link">&para;</a></h2>
<pre><code class="language-bash"># Basic build — interactive installer, no answerfile
bash setup/archiso/build.sh
# Specify output directory
bash setup/archiso/build.sh /path/to/output
# Embed an answerfile for automated deployment
bash setup/archiso/build.sh --preconf
# Embed a specific answerfile
bash setup/archiso/build.sh --preconf ~/my-server.json
# Both flags together
bash setup/archiso/build.sh --preconf ~/my-server.json /media/usb/output
</code></pre>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><em>(none)</em></td>
<td>Clean ISO, no answerfile</td>
</tr>
<tr>
<td><code>--preconf</code></td>
<td>Embed <code>~/answerfile.json</code> at <code>/answerfile.json</code> in the ISO</td>
</tr>
<tr>
<td><code>--preconf FILE</code></td>
<td>Embed the specified file instead</td>
</tr>
</tbody>
</table>
<p>Build artefacts land in <code>~/m-archy-out/</code> by default. Override with the <code>OUT_DIR</code> environment variable or by passing a path argument.</p>
<h3 id="environment-variables">Environment Variables<a class="toc-anchor" href="#environment-variables" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Variable</th>
<th>Default</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>WORK_DIR</code></td>
<td><code>~/m-archy-build</code></td>
<td>Scratch space for mkarchiso</td>
</tr>
<tr>
<td><code>OUT_DIR</code></td>
<td><code>~/m-archy-out</code></td>
<td>ISO output directory</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="what-the-build-does">What the Build Does<a class="toc-anchor" href="#what-the-build-does" title="Permanent link">&para;</a></h2>
<ol>
<li>Copies the upstream <code>releng</code> Arch base profile</li>
<li>Applies the M-Archy overlay (<code>setup/archiso/overlay/</code>)</li>
<li>Replaces <code>profiledef.sh</code> with the M-Archy version</li>
<li>Adds extra packages from <code>packages.extra</code></li>
<li>Embeds both installer scripts (<code>arch-autoinstall.sh</code>, <code>archbaseos-guided-install.sh</code>) into <code>/root/installer/</code></li>
<li>If <code>--preconf</code>: copies the answerfile to <code>/answerfile.json</code> in the ISO's airootfs</li>
<li>Runs <code>mkarchiso</code> to produce the final <code>.iso</code></li>
</ol>
<hr />
<h2 id="extra-packages-on-the-live-system">Extra Packages on the Live System<a class="toc-anchor" href="#extra-packages-on-the-live-system" title="Permanent link">&para;</a></h2>
<p>Defined in <code>setup/archiso/overlay/packages.extra</code>:</p>
<pre><code>git
jq
pam-u2f
btop
fastfetch
openssh
</code></pre>
<p>These are added on top of the standard Arch <code>releng</code> package set.</p>
<hr />
<h2 id="live-system-entry-points">Live System Entry Points<a class="toc-anchor" href="#live-system-entry-points" title="Permanent link">&para;</a></h2>
<p>Once booted from the ISO, the following are available:</p>
<h3 id="install-arch"><code>install-arch</code><a class="toc-anchor" href="#install-arch" title="Permanent link">&para;</a></h3>
<p>A command placed in <code>/usr/local/bin/</code>:</p>
<pre><code class="language-bash">install-arch # guided mode (default)
install-arch guided # guided interactive install
install-arch auto # automated mode (reads /answerfile.json)
</code></pre>
<h3 id="rootlaunchsh"><code>/root/launch.sh</code><a class="toc-anchor" href="#rootlaunchsh" title="Permanent link">&para;</a></h3>
<p>Internal dispatcher used by <code>install-arch</code>.</p>
<h3 id="answerfilejson"><code>/answerfile.json</code><a class="toc-anchor" href="#answerfilejson" title="Permanent link">&para;</a></h3>
<p>Only present when built with <code>--preconf</code>. Both installer scripts check for this file on startup. If found, all prompts are answered from it — the only interaction required is the disk-encryption password (passwords are never stored in answerfiles).</p>
<hr />
<h2 id="automated-deployment-workflow">Automated Deployment Workflow<a class="toc-anchor" href="#automated-deployment-workflow" title="Permanent link">&para;</a></h2>
<pre><code>┌─────────────────────────────────────┐
│ Developer machine │
│ │
│ 1. generate-answerfile.sh │
│ → ~/answerfile.json │
│ │
│ 2. build.sh --preconf │
│ → ~/m-archy-out/m-archy.iso │
│ │
│ 3. dd if=m-archy.iso of=/dev/sdX │
└──────────────┬──────────────────────┘
│ USB
┌─────────────────────────────────────┐
│ Target machine (boots from USB) │
│ │
│ 4. install-arch auto │
│ reads /answerfile.json │
│ installs base OS │
│ runs tui-install.sh in chroot │
│ installs dotfiles &amp; apps │
│ │
│ 5. Reboot → ready system │
└─────────────────────────────────────┘
</code></pre>
<p>For multi-machine deployments, the <code>hostname</code> field in the answerfile is combined with the machine's MAC address, so each system gets a unique hostname even though they share the same answerfile.</p>
<hr />
<h2 id="overlay-structure">Overlay Structure<a class="toc-anchor" href="#overlay-structure" title="Permanent link">&para;</a></h2>
<pre><code>setup/archiso/overlay/
├── airootfs/
│ ├── etc/motd # Welcome message
│ ├── root/
│ │ └── launch.sh # Installer entry point
│ └── usr/local/bin/
│ └── install-arch # User-facing CLI command
├── packages.extra # Additional live-system packages
└── profiledef.sh # M-Archy ISO profile definition
</code></pre>
<p>The <code>build.sh</code> script also adds at build time:</p>
<pre><code>airootfs/root/installer/
├── arch-autoinstall.sh
└── archbaseos-guided-install.sh
</code></pre>
<hr />
<h2 id="writing-the-iso-to-usb">Writing the ISO to USB<a class="toc-anchor" href="#writing-the-iso-to-usb" title="Permanent link">&para;</a></h2>
<pre><code class="language-bash"># Find the USB drive
lsblk
# Write (replace /dev/sdX with your drive — ALL DATA WILL BE ERASED)
sudo dd if=~/m-archy-out/m-archy-*.iso of=/dev/sdX bs=4M status=progress oflag=sync
</code></pre>
<p>Or use <code>ventoy</code> / <code>balenaEtcher</code> as alternatives.</p>
</main>
<footer>
Generated by md-to-html.sh &nbsp;·&nbsp; CyberQueer theme &nbsp;·&nbsp; 2026-05-18
</footer>
</body>
</html>