Enable rootless image builds #1

Open
deftdawg wants to merge 1 commit from deftdawg/rootless into main
deftdawg commented 2026-06-03 01:54:05 -05:00 (Migrated from git.etawen.dev)

This should be considered a draft PR as I've built images with it and inspected them (EFI looks part good, kernel and ramdisk included), but haven't confirmed they run on my PS5.

This should be considered a draft PR as I've built images with it and inspected them (EFI looks part good, kernel and ramdisk included), but haven't confirmed they run on my PS5.
deftdawg commented 2026-06-13 21:28:43 -05:00 (Migrated from git.etawen.dev)

This has now been tested with an Alpine Linux build off of a different USB... Booted right up into Ubuntu desktop, configured Keyboard, Wifi and User info... USB is very slow, so not going to wait for it to finish whatever it's trying to do after that.

image

I also wrote some additional scripts and tooling stuff to validate the images looked okay post-build and to boot them with QEMU to make sure they're bootable, I'll PR that separately.

This has now been tested with an Alpine Linux build off of a different USB... Booted right up into Ubuntu desktop, configured Keyboard, Wifi and User info... USB is very slow, so not going to wait for it to finish whatever it's trying to do after that. ![image](/attachments/ee03c050-7324-4095-89c0-99a7b06badd1) I also wrote some additional scripts and tooling stuff to validate the images looked okay post-build and to boot them with QEMU to make sure they're bootable, I'll PR that separately.
deftdawg commented 2026-06-13 22:01:14 -05:00 (Migrated from git.etawen.dev)

Update: it appears to hang at this screen because it's trying to run "unattended upgrades" i.e. it's doing apt-get update; apt-get upgrade on my suck-ass USB that can only write at ~20MB/s 🤣

Found this out when I flipped to a console and tried to ctrl-alt-del reboot and the job wouldn't shutdown:
image

Update: it appears to hang at this screen because it's trying to run "unattended upgrades" i.e. it's doing apt-get update; apt-get upgrade on my suck-ass USB that can only write at ~20MB/s 🤣 Found this out when I flipped to a console and tried to ctrl-alt-del reboot and the job wouldn't shutdown: ![image](/attachments/902c3e53-284b-49d3-8fdc-71ab682dd059)
earthonion commented 2026-06-13 23:39:28 -05:00 (Migrated from git.etawen.dev)

Thanks for tackling rootless — agree it's the right direction architecturally, and tightening chroot_cache_complete to require bzImage + initrd.img would have caught one of the failures we hit today.

We're mid-debug on a real-PS5 boot regression right now (amdgpu probe -EINVAL on FLAVA3 → display dies mid-boot), and merging a full build-pipeline rewrite untested would entangle two failure modes. Holding the merge until at least one image is confirmed to boot a real PS5.

I'll likely take it for a spin once our current display issue is sorted. Two non-blocking suggestions when you come back to it:

  1. Pin distrobuilder to a commit SHA rather than --branch v3.3.1. The Python heredoc rewrites two literal blocks of shared/chroot.go — any upstream text drift will fail the build with SystemExit("patch context not found"). A pinned SHA makes the patch surface stable.
  2. /dev/null → /dev/console bind: practical but could mask chroot scripts that legitimately write to console (e.g. a getty / systemd-logind PAM session would order against a null sink). Worth a comment in the patch.

Appreciate the work — will revisit soon.

Thanks for tackling rootless — agree it's the right direction architecturally, and tightening `chroot_cache_complete` to require `bzImage` + `initrd.img` would have caught one of the failures we hit today. We're mid-debug on a real-PS5 boot regression right now (amdgpu probe -EINVAL on FLAVA3 → display dies mid-boot), and merging a full build-pipeline rewrite untested would entangle two failure modes. Holding the merge until at least one image is confirmed to boot a real PS5. I'll likely take it for a spin once our current display issue is sorted. Two non-blocking suggestions when you come back to it: 1. **Pin distrobuilder** to a commit SHA rather than `--branch v3.3.1`. The Python heredoc rewrites two literal blocks of `shared/chroot.go` — any upstream text drift will fail the build with `SystemExit("patch context not found")`. A pinned SHA makes the patch surface stable. 2. **`/dev/null → /dev/console` bind:** practical but could mask chroot scripts that legitimately write to console (e.g. a getty / systemd-logind PAM session would order against a null sink). Worth a comment in the patch. Appreciate the work — will revisit soon.
deftdawg commented 2026-06-14 01:23:34 -05:00 (Migrated from git.etawen.dev)

I'm out of my mind, sleep deprived an alpine image shouldn't be doing deb package updates... I need to fix this; back to WIP.

UPDATE: Building does work rootless, but need to --clean otherwise it takes the wrong root image, I was able to boot alpine which yeeted itself instantly trying to resize the slow boot USB drive.

I'm out of my mind, sleep deprived an alpine image shouldn't be doing deb package updates... I need to fix this; back to WIP. **UPDATE:** Building does work rootless, but need to `--clean` otherwise it takes the wrong root image, I was able to boot alpine which yeeted itself instantly trying to resize the slow boot USB drive.
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'deftdawg/rootless:deftdawg/rootless'
git switch 'deftdawg/rootless'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'deftdawg/rootless'
git switch 'deftdawg/rootless'
git rebase 'main'
git switch 'main'
git merge --ff-only 'deftdawg/rootless'
git switch 'deftdawg/rootless'
git rebase 'main'
git switch 'main'
git merge --no-ff 'deftdawg/rootless'
git switch 'main'
git merge --squash 'deftdawg/rootless'
git switch 'main'
git merge --ff-only 'deftdawg/rootless'
git switch 'main'
git merge 'deftdawg/rootless'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
git-etawen-dev-mia/ps5-linux-image!1
No description provided.