Skip to content

LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.

Docs: VM-SETUP step 39 (the imager on VM 116, all undone) and the Linux download running inside LordOS

Federico Pereira9ccbe19c2544
diff --git a/docs/IMAGER.md b/docs/IMAGER.md
index d433d20..a0c9bc4 100644
--- a/docs/IMAGER.md
+++ b/docs/IMAGER.md
@@ -19,6 +19,7 @@ It is not a web page: a browser can't write a whole disk.
| ![Customise: cooling](imager/native-10-tab-cooling.png) | ![Customise: cooling](imager/desktop-07-cooling.png) |
| ![Writing](imager/native-15-writing.png) | ![Writing](imager/desktop-11-writing-dark.png) |
| ![Done](imager/native-18-done.png) | ![Done](imager/desktop-12-done-dark.png) |
+| ![The Linux download running inside LordOS](imager/desktop-13-linux-in-lordos.png) | ![The Linux download, written through udisks2](imager/desktop-14-linux-done.png) |
## The steps
@@ -326,6 +327,7 @@ The containers keep their own `node_modules` and cargo target folders in named v
| `server/tests/firstrun_image_test.sh` (root, VM 116) | the real 0.8.3 Raspberry Pi image written by `imager-write`, the first-run file put on its boot partition as the user, then `lordos-firstrun --root --boot`: every file it should write, owners and modes, nothing else changed in `cmdline.txt`/`config.txt`, no Wi-Fi password anywhere, the file shredded, and a broken file applies nothing | 25/25 |
| Native app on VM 116 | the whole flow with the 0.8.3 image to the virtual stick: written and verified; the first-run file it wrote parses, its yescrypt hash verifies with `crypt(3)` and its PSK matches `pbkdf2_hmac` | ✓ |
| Desktop app (Mac download, on the development machine) | the whole flow through the app's own commands (`LORDOS_IMAGER_TEST_STATE`, no simulated input) to a 16 GB disk image: download of 0.8.3 from GitHub, signature, image check, write, read back (the same SHA-256 as the native write, `b623f7a8…`), the first-run file on the boot partition (it parses, glibc accepts its SHA-512 hash, the PSK matches) | ✓ |
+| Linux download inside LordOS (VM 116) | the `.deb`'s binary as a Wayland app in the LordOS session: lists only the virtual stick (2 disks hidden), downloads 0.8.3 again, signature, image check, write and read back through udisks2's `OpenDevice` (the same SHA-256); without a polkit agent udisks2 answers "not authorized" and nothing on the drive is touched, with a test rule standing in for the agent the write goes through | ✓ |
| Downloads on VM 116 | `imager-fetch meta`, the two signature files, the 558 MB image cancelled at 335 MB and resumed from the `.part` | ✓ |
## Not done or not verified yet
diff --git a/docs/VM-SETUP.md b/docs/VM-SETUP.md
index aea3b4d..75c24cf 100644
--- a/docs/VM-SETUP.md
+++ b/docs/VM-SETUP.md
@@ -1371,3 +1371,40 @@ in `~/LordOS-csd`, built there (`make -C server`, `make -C server build/deco-cli
`master_preferences` and `settings.json` restored, the themes, the schemas package, `session.conf`,
the profiles, the tree, the script and the backup removed, `lordos.service` restarted to the login
screen. No network or Proxmox setting was touched.
+
+## Step 39 — 0.8.4: LordOS Imager (VM 116 `lordos-gpu`, October 19)
+
+See `IMAGER.md`. Tree in `~/LordOS-imager`, built there (`make -C server`, `make -C server test`:
+23 passed, the imager suites included) and installed over `/usr/local/lib/lordos` by
+`~/deploy-imager-116.sh`, which first saved `/usr/local/lib/lordos` and lord's `settings.json` in
+`/var/backups/lordos-imager-bak`.
+
+- **A scratch disk:** `qm set 116 --scsi1 local-lvm:24,discard=on` on the Proxmox host (as VM 119's
+ `sata1` before it), formatted ext4 (label `imgscratch`) and mounted at `/var/tmp/imager-scratch`
+ (not in fstab); `~/ImagerTest` was a bind mount of its `user/` folder, so test images sat in the
+ home folder as the imager requires. It also served as the internal, non-removable disk the
+ imager must refuse.
+- **A virtual USB stick:** `modprobe dummy_hcd` and `modprobe g_mass_storage
+ file=/var/tmp/imager-scratch/usb-stick-116.img removable=1` (4 GB, then 16 GB, sparse): `sdc`,
+ `TRAN usb`, `RM 1`. Every write was preceded by `~/ImagerTest/vguard.sh sdc`, which prints the
+ device and stops unless it is that gadget with the backing file's size. No other disk was written.
+- **Images:** the signed 0.8.1 release folder copied from the development machine, and 0.8.3
+ downloaded from GitHub by `imager-fetch` into `~/.cache/lordos/imager`.
+- **Session:** `/etc/lordos/session.conf` with `AUTOLOGIN=lord` (it didn't exist) and lord's
+ `settings.json` set to English, both put back at the end; the locked `pwtest` session from an earlier
+ test was ended by the service restarts.
+- **The Linux download (Tauri) inside the LordOS session:** installed for the test only
+ `libwebkit2gtk-4.1-0` and `udisks2` with their dependencies (61 packages, listed in
+ `~/ImagerTest/linux-test-packages.txt`), and `/etc/polkit-1/rules.d/49-lordos-imager-test.rules`
+ allowing `lord` the udisks2 open/mount/eject actions (the LordOS session has no polkit agent to
+ ask); the app ran as a Wayland client with `WAYLAND_DISPLAY=wayland-0`. All of it was removed at
+ the end (`apt-get purge` of those packages, then the rule).
+- **Screenshots** with `qm monitor 116` (`screendump`) from the Proxmox host, the pointer with
+ `/root/lord-qmp-input.py 116` and keys with `/root/lord-type.py 116`.
+- **Undone at the end:** `/usr/local/lib/lordos` restored from the backup, `session.conf` removed and
+ lord's `settings.json` restored, `lordos.service` restarted to the login screen; the gadget
+ unloaded (`rmmod g_mass_storage dummy_hcd`), the bind mount and the scratch mount removed, and the
+ scratch disk detached and deleted from the VM (`qm set 116 --delete scsi1`, then the unused volume
+ removed); `~/ImagerTest`, `~/.cache/lordos/imager`, `~/.config/LordOS Imager` and the test key and
+ image files deleted. `~/LordOS-imager` (the tree) is kept, like the other agents' trees. No network
+ or Proxmox setting other than the scratch disk was touched.
diff --git a/docs/imager/desktop-13-linux-in-lordos.png b/docs/imager/desktop-13-linux-in-lordos.png
new file mode 100644
index 0000000..ceb38af
Binary files /dev/null and b/docs/imager/desktop-13-linux-in-lordos.png differ
diff --git a/docs/imager/desktop-14-linux-done.png b/docs/imager/desktop-14-linux-done.png
new file mode 100644
index 0000000..fff47f8
Binary files /dev/null and b/docs/imager/desktop-14-linux-done.png differ