)
1bit OS boots live from a stick and there was no way to put it on a machine
(the #515 image says so plainly: no installer at all). This adds the installer
and proves the whole sequence in QEMU, so the owner's install is a known run of
commands rather than an experiment.
- os/mini/install.sh (new), shipped as /bin/1bit-install: installs onto ONE
internal disk named explicitly. Before it writes anything it refuses: no
--yes, a partition instead of a whole disk, a removable device, the disk this
live boot runs from (the 1BIT-DATA partition's parent, via sysfs), a disk
with anything mounted, a missing GPT tool. Then it prints the disk's
model/size/partition table and waits 10 s. Past that: GPT with a 512 MB ESP
(the live ESP copied byte for byte - the same shim, signed grub, vmlinuz,
initramfs, grub.cfg, so the MOK enrolment on the machine is unchanged) and a
1BIT-DATA ext4 partition filling the disk carrying the stick's models,
Lemonade backends/config/cache, the NPU kernel sets and the SSH keys, plus
/data/.installed.
- os/mini/init.sh: /data/.installed selects the installed mode - INSTALLED
banner instead of LIVE, /etc/1bit/installed instead of /etc/1bit/live, and no
stick menu (there is nothing to choose). Same initramfs and signed chain
either way. Also define say() before its first use: it sat below the NPU
kernel-link line, so that line died as "say: not found" on the console.
- os/mini/mkimage.sh: ship install.sh and sfdisk (busybox fdisk is MBR-only;
the installer lays the target out with the same sfdisk script the build uses
for the stick, so a stick and an installed disk are one layout), and ship and
load nvme + ahci. Without them the live system had no NVMe driver at all and
could not see the disk an install target always is.
- os/mini/vmtest.sh: an install pass - a sparse qcow2 virtual NVMe attached to
the live VM, the refusal matrix, the install, poweroff, then a second boot
from the installed disk alone with clean NVRAM and no USB attached, asserting
the INSTALLED banner, /etc/1bit/installed, /data on the disk, Lemonade with
its key answering a chat, and 1bit-selftest reporting INSTALLED.
- os/README.md: the owner's sequence as commands, the Secure Boot/MOK note, how
to get back to the live stick, and what the VM proves vs what only the real
machine can.
Three bugs the VM found, all invisible to a stick that never needs a second disk:
the image shipped no nvme/ahci module; new_part() decided a partition's name by
asking whether the node already existed (right after sfdisk it does not), so it
wrote /dev/nvme0n11 on a disk whose name ends in a digit; and "mke2fs" was not
mke2fs. The image shipped only busybox's applet, which is ext2-only and rejects
-t, so the data partition was never created ("1bit-install: mke2fs failed").
Shipping the real e2fsprogs binary was not enough on its own: this is a busybox
shell with CONFIG_FEATURE_SH_STANDALONE, so a name it knows as an applet is
answered by the shell before PATH is consulted, and the real /bin/mke2fs was
still skipped (measured in the guest: `type mke2fs` -> "mke2fs is mke2fs", while
/bin/mke2fs printed the e2fsprogs usage). The installer now names the tools it
needs by absolute path - /bin/sfdisk and /bin/mke2fs - and mkimage.sh ships the
real mke2fs with its libraries and /etc/mke2fs.conf. install.sh also reads the
partition table back with sfdisk, not busybox fdisk, which cannot read a GPT.
Two more the same runs found. Mounting the ESP failed with EINVAL and the kernel
said why: "FAT-fs (nvme0n1p1): codepage cp437 not found" - the image ships
nls_cp437 but init loaded vfat and not the codepage, so no vfat mount could
succeed. And the live disk was found with `findfs LABEL=1BIT-DATA`, which after
an install answers with the *installed* disk, whose own partition carries that
label: the installer then refused the target as "the disk this live boot runs
from" (blocking every reinstall) and would have copied the wrong ESP. Both the
live disk and the live ESP are now taken from what /data is actually mounted
from, in /proc/mounts.
Booting the installed disk and asking it (not guessing) found the last two: 1bit-selftest
printed "mode: LIVE" unconditionally, so on an installed machine it contradicted the
banner and the installer's own "selftest reports INSTALLED" check could never pass - it
now reads /etc/1bit/installed vs /etc/1bit/live. And /etc/1bit did not exist at all on
any boot, because mkimage.sh creates it after it packs the initramfs; init makes the
directory itself now, so the marker is not silently lost. That ordering in mkimage.sh
(/etc/1bit/libhsa and /opt/1bit-llama are also added after the pack) is pre-existing and
left alone here.
Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
1bit OS already ran entirely from RAM and never mounted an internal disk — but nothing said so on screen, and proving the engine answered from a given boot meant hand-typing a
wget. Both are now part of the image, which is what makes a live USB test something you (or an agent) can actually do before the final install.Live mode, stated
init.shnow prints, before the hardware lines:…and drops
/etc/1bit/liveso the mode is checkable. There is no installer in the image at all, so nothing can be installed over a working disk by accident.1bit-selftestNew
os/mini/selftest.sh, installed as/bin/1bit-selftest: mode, kernel, GPU/NPU devices, NPU firmware, the USB4/Thunderbolt module, model list from Lemonade, then one question to the locallemondwith the answer and decode rate, appended to/data/selftest.logso the evidence outlives the live boot. Non-zero exit on failure, so it also works in a script and inside CI's1bit.checkpath.Verified
Booted the signed image in QEMU and read the graphical console:
(CPU/llamacpp — a VM has no NPU; on the box the same command goes through
onebit:npu.)Two bugs the self-test caught in itself, fixed here
/dline left by an earliersedwhose pattern containedn/a, so the/ended the regex early;""— it now triesidthenmodel_nameand fails loudly when no model is present.Also bakes an optional SSH key (
AUTHORIZED_KEYS=) so the box can be driven remotely during a live test; the key is not in the repo.