chamesle

chamesle.org: the site of Chamesle, a small Linux distribution
git clone https://github.com/tortr-rs/chamesle
Log | Files | Refs | README

handbook-iso.html (5040B)


      1 <!doctype html>
      2 <html lang="en">
      3 <head>
      4 <meta charset="utf-8">
      5 <meta name="viewport" content="width=device-width, initial-scale=1">
      6 <title>The live ISO - Chamesle</title>
      7 <meta name="description" content="The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, logs in as">
      8 <link rel="canonical" href="https://chamesle.org/handbook-iso.html">
      9 <meta property="og:type" content="website">
     10 <meta property="og:site_name" content="Chamesle">
     11 <meta property="og:title" content="The live ISO - Chamesle">
     12 <meta property="og:description" content="The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, logs in as">
     13 <meta property="og:url" content="https://chamesle.org/handbook-iso.html">
     14 <link rel="stylesheet" href="style.css?25">
     15 <link rel="icon" href="img/logo.png">
     16 </head>
     17 <body>
     18 
     19 <div id="page">
     20 
     21 <div id="top">
     22 <h1><a href="./"><img src="img/banner.png" alt="Chamesle Linux" width="223" height="56"></a></h1>
     23 </div>
     24 
     25 <div id="nav">
     26 <a href="./">Home</a> |
     27 <a href="download.html">Download</a> |
     28 <b>Handbook</b> |
     29 <a href="packages.html">Packages</a> |
     30 <a href="new.html">News</a> |
     31 <a href="board.html">Board</a> |
     32 <a href="chat.html">Chat</a> |
     33 <a href="source.html">Source</a> |
     34 <a href="https://x22.chamesle.org/">X22</a> |
     35 <a href="https://github.com/tortr-rs/mag">mag</a> |
     36 <a href="about.html">About</a>
     37 </div>
     38 
     39 <main>
     40 <p><a href="handbook-kernel.html">&larr; The kernel and firmware</a> | <a href="docs.html">Contents</a> | <a href="handbook-maintaining.html">Maintaining &rarr;</a></p>
     41 <h2>8. The live ISO</h2>
     42 <h2 id="s8-1">8.1 What it is</h2>
     43 <p>The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, logs in as root on every tty and has</p>
     44 <ul>
     45 <li>mag, the keys and the repos, and <code>chamesle-bootstrap</code>, <code>chamesle-disk</code>, <code>chamesle-boot</code>, <code>arch-chroot</code></li>
     46 <li>the disk tools: <code>cfdisk</code>, <code>sfdisk</code>, <code>lsblk</code>, <code>blkid</code>, <code>mkfs.ext4</code>, <code>mkfs.fat</code>, <code>zpool</code>, <code>zfs</code>, <code>limine</code></li>
     47 <li>the network: <code>dhcpcd</code>, <code>iwd</code> with <code>iwctl</code>, <code>wpa_supplicant</code>, <code>curl</code></li>
     48 <li>the Intel wireless firmware, vim, less, and this handbook in <code>/usr/share/doc/chamesle/handbook.md</code></li>
     49 </ul>
     50 <p>It is where you do chapter 3. <code>chamesle.iso</code> is for x86_64, <code>chamesle-x86.iso</code> for 32-bit machines (BIOS only).</p>
     51 <h2 id="s8-2">8.2 How it boots</h2>
     52 <p><code>iso/init</code> looks through <code>/dev/sr*</code>, <code>/dev/sd*</code>, <code>/dev/nvme*n*p*</code>, <code>/dev/vd*</code> and <code>/dev/mmcblk*</code> until it finds one that mounts and has <code>LiveOS/rootfs.sfs</code>. It mounts that squashfs read-only, puts a tmpfs overlay over it, moves the medium and the squashfs to <code>/run/live/medium</code> and <code>/run/live/rootfs</code>, and runs <code>switch_root</code> into the result. Whatever you change in the live system is gone at shutdown.</p>
     53 <h2 id="s8-3">8.3 Making it</h2>
     54 <pre>iso/mkiso -o chamesle.iso
     55 iso/mkiso -a x86 -o chamesle-x86.iso</pre>
     56 <p>as root, with mag in PATH, and <code>xorriso</code>, <code>mksquashfs</code>, <code>zstd</code> and <code>bsdcpio</code> on the host. mkiso installs <code>chamesle-base</code>, the kernel and what <code>iso/profile/packages</code> names into <code>work/rootfs</code> with mag, copies <code>iso/profile/overlay</code> over it, makes the initramfs and the squashfs and puts them on the ISO with limine.</p>
     57 <h2 id="s8-4">8.4 Trying it in qemu</h2>
     58 <p>BIOS:</p>
     59 <pre>qemu-system-x86_64 -m 1G -cdrom chamesle.iso -boot d</pre>
     60 <p>UEFI, with the firmware of your qemu (<code>edk2-x86_64-code.fd</code>; the path differs between systems):</p>
     61 <pre>qemu-system-x86_64 -m 1G -bios /usr/share/qemu/edk2-x86_64-code.fd -cdrom chamesle.iso</pre>
     62 <p>Add <code>-enable-kvm</code> for speed. To go through all of chapter 3 in a virtual machine, give it a disk:</p>
     63 <pre>qemu-img create -f qcow2 disk.qcow2 8G
     64 qemu-system-x86_64 -m 1G -enable-kvm -cdrom chamesle.iso -drive file=disk.qcow2 -boot d -nic user</pre>
     65 <p>A machine like an old Pentium 4 with 256 MB: <code>-cpu pentium3,+sse2 -m 256</code> and the x86 ISO.</p>
     66 <p>To write the ISO to a stick: <code>dd if=chamesle.iso of=/dev/sdX bs=4M conv=fsync</code>.</p>
     67 <hr>
     68 <p><a href="handbook-kernel.html">&larr; The kernel and firmware</a> | <a href="docs.html">Contents</a> | <a href="handbook-maintaining.html">Maintaining &rarr;</a></p>
     69 </main>
     70 
     71 <hr>
     72 <div id="foot">
     73 Something wrong on this page? Tell us on the <a href="board.html">board</a>.<br>
     74 Chamesle installs with <code>chamesle-install</code>, or by hand from the <a href="docs.html">handbook</a>.<br>
     75 <a href="https://ko-fi.com/L6N725GI1V">Ko-fi</a><br>
     76 <a href="#" id="edit-link">Edit text</a><br>
     77 $Date: 2026-11-23 $
     78 </div>
     79 
     80 </div>
     81 
     82 <script src="edit.js"></script>
     83 </body>
     84 </html>