Progress has been immense, but I've run into a roadblock I'm not sure how to diagnose.
For starters, I've gone through and successfully compiled:
vmm-xen
core-vchan-xen
linux-utils
core-agent-linux
gui-common
gui-agent-linux
I've done the best I can to adapt Archlinux instructions, taking note of path modifications and installing everything, gruelingly by hand. Everything built as best as I can tell, but I cannot get `qvm-run` to execute a command. I'll try to give as much information as I can about the state of this systemd-based BLFS run.
1) lsmod shows xen_netfront, xen_netback, u2mfn loaded successfully on boot
2) The following systemd scripts are enabled (at boot) and run and exit cleanly:
qubes-early-vm-config
qubes-iptables
qubes-misc-post
qubes-mount-dirs
qubes-sysinit
3) The following systemd scripts are enable and run in the background:
qubes-qrexec-agent
qubes-db
Any other services have been either a) mistakenly missed and not installed OR b) ignored as they implement a functionality I believe is non critical at the time, e.g., qubes-sync-time
If there are any other processes I've missed, please let me know, because it's probably just one of the make targets I've somehow overlooked.
4) /dev/xvdb mounted as /rw. /rw/home and /rw/usrlocal all work as expected. xen mounted at /proc/xen also listed in fstab and seemingly working (based on xenstore-read name returning system name).
5) Lastly, theres qubes-gui-agent, which when run automatically hides the HVM window and makes it non-interact-able. This is currently disabled in systemd, but is installed.
And this is where I'm stuck.
I'm trying on dom0: qvm-run lfs "shutdown now -h" and it returns "Running 'shutdown now -h' on lfs" but the VM never responds.
What else might I provide to help troubleshoot this and to detect what seems like the last-mile in getting this working as a template?
Thanks in advance!
I tried recompiling everything again, and the results have changed quite a bit. Now, instead of autohiding the HVM window in dom0, I can see a very clear failure which points me in the direction of Xorg instead.
Sadly, this feels like a regression, but alas... I'm sure I'll get there eventually.
As far as "xl console lfs", dom0 reports "unable to attach console". And in terms of dom0, it is still giving no sense of failure:
$ qvm-run --pass-io personal whoami
user
$ qvm-run --pass-io lfs whoami
$ qvm-run lfs "touch /tmp/dummy"
Running 'touch /tmp/dummy' on lfs
Needless to say, /tmp/dummy doesn't ever emerge.
The new error is....
systemctl status qubes-gui-agent.service
...
Process: 660 ExecStart=/usr/bin/qubes-gui $GUI_OPTS (code=exited, status=1/FAILURE)
...
lfs qubes-gui[660]: XIO fatal IO error 11 (Resource temporarily unavailable on X server ":0"
lfs qubes-gui[660]: after 37 requests (36 known processed) with 0 events remaining)
X works (startx shows me a desktop and consoles), but nothing yet from getting Qubes GUI agent and qrexec.
Got all services to run, including qubes-gui-agent. Turns out the dependency it was failing on was meminfo-writer which was enabled in the /usr/lib/qubes/init/qubes-sysinit.sh script, but promptly disabled because it wasn't "checkmarked" in dom0's VM settings page.
That said, with all services running, still same behavior of getting no replies to "qvm-run --pass-io" nor does any qvm-run for executing commands, e.g., touch.
qubes-db.service
qubes-early-vm-config.service
qubes-meminfo-writer.service
qubes-mount-dirs.service
qubes-qrexec-agent.service
qubes-sysinit.service