Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/os-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,14 @@ named here as what they are:
| logging | `06onboard-logs` keeps the boot's logs on `/data/logs` — the partition, not the filesystem that the next appliance replaces | `/data/logs` non-empty on the installed boot |
| packages and services | `apt` works and its packages land in the save layer; the appliance's own services are `/etc/init.d` scripts, which is what `rc.services` runs (there is no systemd here, and nothing pretends there is) | — |

| an optional static address | `1bit-network set-static <addr/prefix> [gateway] [dns…]` writes **`/data/net.conf`** — on the data partition, so it outlives an appliance update — and `/etc/init.d/14onboard-net` applies it at boot through **connman's own CLI** (`connmanctl config <service> --ipv4 manual …`), with `ip` only as the fallback for a link connman has no service for yet. The console's static action stays session-only, because a wrong address on a headless box is a walk to the machine; this one is persistent **and reversible in one command**: `1bit-network reset` deletes the file and hands the interface back to DHCP. An unparsable or unusable file is not applied at all — the boot leaves the link on DHCP and says so in `/var/log/1bit-network.log` | `tests/one_bit_network_conf_test.sh` (the address and file validation, 26 arms, no root or interface needed) and the installed boot's `1bit-network` rows |
| an optional static address | `1bit-network set-static <addr/prefix> [gateway] [dns…]` writes **`/data/net.conf`** — on the data partition, so it outlives an appliance update — and `/etc/init.d/zz-onboard-net` applies it at boot through **connman's own CLI** (`connmanctl config <service> --ipv4 manual …`), with `ip` only as the fallback for a link connman has no service for yet. The console's static action stays session-only, because a wrong address on a headless box is a walk to the machine; this one is persistent **and reversible in one command**: `1bit-network reset` deletes the file and hands the interface back to DHCP. An unparsable or unusable file is not applied at all — the boot leaves the link on DHCP and says so in `/var/log/1bit-network.log` | `tests/one_bit_network_conf_test.sh` (the address and file validation, the `prefix_to_mask` table and the CIDR split — 43 assertions, no root or interface needed) and the installed boot's `1bit-network` rows |

**Recovery, stated where someone under pressure will look:** `1bit-network reset` on tty1, the serial console, or the
console menu's bash item. The file is `/data/net.conf`; deleting it is the same thing.
console menu's bash item — and deleting `/data/net.conf` really is the same thing: the boot undoes a manual configuration
*this box* wrote (it records that in `/data/.net-manual`) and leaves a connection it never touched alone. A file that no
longer parses is treated the same way: the address is handed back rather than left applied invisibly.
*A machine configured while #1513 was merged has a manual connman config and no marker, so run `1bit-network reset` once
after updating it.*

## The Ubuntu plan (history, not a target)

Expand Down
2 changes: 1 addition & 1 deletion os/v3/puppy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ this recipe ships are:
| `05onboard-data` | finds `1BIT-DATA` (`1bit.data=` on the boot line, else the label), mounts it at `/data`, creates the contract dirs, points `/etc/1bit/lemond.conf` at `/data/lemonade/lemond.conf`, copies `/data/ssh/authorized_keys` and links the host key from `/data/ssh`, and registers `/data/models` in Lemonade's `user_models.json` |
| `10lemonade` | starts `/opt/1bit-package/lemond-onebit`, binds `0.0.0.0:13305`, logs to `/var/log/lemond-onebit.log`. **No key by default** (cycle 20, the owner's "blank key": the appliance ships like stock Lemonade). A key is opt-in and lives in `/etc/1bit/lemond.conf` (mode 600, a symlink onto `/data`) — console menu item 1 mints one, removes it, and restarts this service so lemond comes up in the other mode; nothing else in the image holds it |
| `07onboard-user` | **the installed machine's normal account** (engine#712): on an installed boot only (`/data` mounted with `1bit-install`'s `.installed` on it) it creates `onebit` — home, bash, **locked password** so a key is the only way in — installs `/data/ssh/authorized_keys` as its `0600` key file (re-applied at every installed boot, exactly as `20onboard-ssh` does for root), and appends **one** sudo rule, `onebit ALL=(ALL) NOPASSWD: ALL`, backed up and proved with `sudo -n true` as that user, rolled back if it fails. A live stick exits without touching anything: a machine that forgets stays root-only |
| `14onboard-net` + `usr/local/bin/1bit-network` | **the persistent network identity** (engine#712): `1bit-network set-static <addr/prefix> [gateway] [dns…]` validates the answer, writes `/data/net.conf` (data partition, so it survives an appliance update) and applies it now through connman's own CLI; `14onboard-net` applies the same file at every boot, and does nothing at all when the file is absent or does not validate (a bad file leaves the link on DHCP rather than half-applying). `1bit-network reset` is the whole recovery path: it deletes the file and gives the interface back to DHCP. The console's own static action stays session-only on purpose |
| `zz-onboard-net` + `usr/local/bin/1bit-network` | **the persistent network identity** (engine#712): `1bit-network set-static <addr/prefix> [gateway] [dns…]` validates the answer, writes `/data/net.conf` (data partition, so it survives an appliance update) and applies it now through connman's own CLI; `zz-onboard-net` applies the same file at every boot, and does nothing at all when the file is absent or does not validate (a bad file leaves the link on DHCP rather than half-applying). `1bit-network reset` is the whole recovery path: it deletes the file and gives the interface back to DHCP. The console's own static action stays session-only on purpose |
| `20onboard-ssh` | `ssh-keygen -A`, `/root/.ssh` 700 + `authorized_keys` 600, then sshd. An image with no key provisions no listener |
| `21serial-console` | a root shell on `/dev/ttyS0`, only when the command line carries `1bit.serial=1` (that shell has no password, so it is opt-in) |
| `26onboard-board` | `os/mini/board.sh` as `/usr/sbin/1bit-board` (the path release-check's `fans` row reads): EC fan curve, power profile and the detached boost loop, on a board whose DMI it knows; on any other machine it writes nothing and says so |
Expand Down
4 changes: 2 additions & 2 deletions os/v3/puppy/container-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ if [ -n "${PAYLOAD:-}" ]; then
chmod 0755 "$skeleton/usr/local/bin/1bit-tty1"
chmod 0755 "$skeleton"/etc/init.d/03onboard-efivars "$skeleton"/etc/init.d/05onboard-data \
"$skeleton"/etc/init.d/06onboard-logs "$skeleton"/etc/init.d/07onboard-user \
"$skeleton"/etc/init.d/08onboard-presets "$skeleton"/etc/init.d/14onboard-net \
"$skeleton"/etc/init.d/08onboard-presets "$skeleton"/etc/init.d/zz-onboard-net \
"$skeleton"/etc/init.d/10lemonade \
"$skeleton"/etc/init.d/18onboard-mdns \
"$skeleton"/etc/init.d/20onboard-ssh "$skeleton"/etc/init.d/21serial-console \
Expand Down Expand Up @@ -650,7 +650,7 @@ if [ -n "${PAYLOAD:-}" ]; then
usr/local/bin/1bit-record usr/local/bin/1bit-lemonade-webapp \
usr/local/bin/1bit-webapp-proxy usr/local/bin/1bit-desktop usr/local/bin/1bit-logs \
etc/init.d/06onboard-logs etc/init.d/07onboard-user etc/init.d/08onboard-presets \
etc/init.d/14onboard-net usr/local/bin/1bit-network \
etc/init.d/zz-onboard-net usr/local/bin/1bit-network \
root/Startup/1bit-lemonade-webapp \
etc/personal_settings_popup_disabled etc/1bit/palemoon-prefs.js \
etc/init.d/24onboard-webapp opt/1bit/webapp/index.html \
Expand Down
127 changes: 0 additions & 127 deletions os/v3/puppy/embed/etc/init.d/14onboard-net

This file was deleted.

Loading
Loading