Skip to content

v0.1.1 — install to the eMMC, and a way back

Choose a tag to compare

@Brunux Brunux released this 18 Oct 06:22
· 379 commits to main since this release

v0.1.1 — install to the eMMC, and a way back

A maintenance release. The boot chain, the kernel and the sway session are the same as
v0.1.0; what changed is the part that installs the system onto internal storage, the
SSH host keys, and two new tools that back the running machine up and put it back.

What changed since v0.1.0

  • Install to internal storage works, and it is now pmbootstrap's method.
    scripts/lib-cgpt.sh reproduces pmbootstrap's ChromeOS install path part by part: the root
    partition is sized dev_size - root_start - 33 (the secondary GPT survives, as pmbootstrap
    leaves it), partprobe runs after the cgpt adds, the mkfs lines and the /etc/fstab options
    are the ones pmb/install/*.py builds, and a target with a mounted partition is refused instead
    of silently unmounted.
  • Partitions are resolved by number, not by their order in lsblk. lsblk lists a disk's
    partitions in the order the kernel handed out their minors, and the partx -d/-a round
    reorders them: over 16 attaches of one loop device, 5 came back as 2 3 1 or 3 1 2, which
    formatted the boot partition as the root filesystem and wrote the kpart into the wrong partition.
    The layout now looks each partition up by number and asserts the three pmOS_* labels, so a
    wrong resolution dies instead of destroying a card.
  • install-emmc.sh recreates the mount points rsync drops (/dev, /proc, /sys, /run,
    /mnt, /media) and refuses to write the kernel partition unless /dev exists and /sbin/init
    resolves. Without them the installed system mounted its root and then died in run-init with
    No init found and no console to say why, which read as a firmware or kernel failure.
  • The SSH host keys are generated on the first boot that lacks them. Debian's
    sshd-keygen.service is gated on ConditionFirstBoot=yes, and an image written to a card or the
    eMMC is always a copy of a tree that already generated /etc/machine-id, so the condition was
    never true, the keys were never made, and ssh.service died on every boot with
    sshd: no hostkeys available -- exiting. rootfs-setup.sh ships a drop-in that keys on the host
    keys being absent instead, which is the thing that actually matters.
  • scripts/backup-system.sh (new) backs the running installation up into a directory: the
    kernel partition it booted from, the GPT areas, /boot and the root filesystem as gzip tars with
    owners, ACLs and xattrs preserved, plus a README and SHA256SUMS. scripts/restore-system.sh
    (new) is the other half: it rebuilds the three partitions from such a backup with the original
    filesystem UUIDs, so the restored machine boots with its own fstab and command line.
  • install-kpart.sh's chroot guard actually fires (stat -L and the corrected comparison, with
    both sides read before refusing), and CONFIRM survives the sudo re-exec in both
    install-emmc.sh and install-kpart.sh.
  • build-rootfs.sh ships an empty /etc/machine-id and no host keys, so every card and every
    install gets its own identity instead of sharing one journal and one SSH identity.
  • scripts/00-deps.sh installs the host build dependencies from apk or apt, so the
    toolchain is installable from the Debian system this port itself runs.

Validation

The hardware evidence this port publishes lives in reports/, taken with
scripts/check-system.sh on the reference Hayato. The kernel, the boot chain and the session are
unchanged from v0.1.0 — whose report of the booted image is clean (51 OK, 2 WARN, the
two WARNs being the upstream sbs-8-000b fuel-gauge noise and the world regulatory domain) — so
what this release changes was verified on the hardware and on loop devices instead:

  • the eMMC install reaches the desktop: the running card installed onto /dev/mmcblk0 boots by
    picking internal disk in the firmware menu, the same greetd prompt as the card;
  • the layout and its refusals were rehearsed on a loop device: 16 of 16 attaches resolve the
    partitions correctly (including the 5 that came back reordered), and the geometry, partition
    types, labels and cgpt flags match pmbootstrap's;
  • scripts/backup-system.sh and scripts/restore-system.sh were rehearsed on a loop device over a
    sparse copy of the original disk's geometry: the GPT, the kernel partition and the file count
    come out identical and tar -d agrees with both archives.

Assets

asset what it is
google-asurada.img.xz 4 GiB disk image: the three ChromeOS GPT partitions (kernel, /boot, root), ready for dd
google-asurada-rootfs.tar.zst the same root filesystem as a tarball (with /boot inside), for writing your own card with scripts/write-sd.sh
google-asurada.vmlinuz.kpart the signed FIT kernel partition of that image; it embeds the image's root=UUID, so it belongs to this image and no other
SHA256SUMS SHA-256 of the three assets
sha256sum -c SHA256SUMS
xz -dc google-asurada.img.xz | sudo dd of=/dev/mmcblk1 bs=4M conv=fsync

On the Chromebook: developer mode, crossystem dev_boot_usb=1 dev_boot_signed_only=0, insert the
card, turn it on and pick external disk in the firmware menu. It comes up silently to a greetd
prompt: user brunux, password debian, passwordless sudo — change the password before using it
for anything real. (scripts/install-emmc.sh then installs it to internal storage.)

What it does not carry

Unchanged from v0.1.0: the artifact is sanitized and asserted clean (scripts/lib-dist.sh). No
Wi-Fi profiles, no SSH host keys, no machine-id, no personal files — the machine identity and the
SSH host keys are generated on first boot.

Known limitations

  • The image is 4 GiB. A larger card keeps the space after p3 unused; writing the tarball with
    scripts/write-sd.sh sizes p3 to the whole card.
  • The tarball's /etc/fstab is the unconfigured one the build leaves behind:
    write-sd.sh generates the real one.
  • Artifacts are not byte-reproducible yet (FIT timestamp, filesystem UUIDs).
  • Battery percentage is the capacity reading only; the gauge reports Unknown chemistry: OTC0 and
    spams the journal on upstream kernels — Nura's own log has the same lines.

Upstream

Vendored from pmaports commit 0e458a2417d6f5ed61c7b70621d5632e30136091 (2026-10-15).