TLDR: Why does crond start qubes when qubes.skip_autostart is set ?
[edited to give the full kernel command line options, and to add tldr…]
For reasons, I needed to prevent automatic start of sys-usb on qubes startup. (sys-usb was causing immediate loss of the desktop, with black screen, no keyboard or mouse).
When I add qubes.skip_autostart
to the kernel command line in grub, I could see the graphical login prompt, login, and get a first few clicks or keypresses, before sys-usb started automatically → Black screen, etc.
Finally, I found I could add
qubes.skip_autostart systemd.mask=crond.service
This allowed access to the desktop and to text consoles, and to fix the problem.
It seems that multi-user target requires startup of all qubes which are set to autostart
. There is a file named ‘/etc/systemd/system/multi-user.target.wants/qubes-vm@sys-usb.service’, and similar files for all the other autostart qubes. Each of them is symlinked to /usr/lib/systemd/system/qubes-vm@.service.
I got lucky, I think, because masking crond prevented systemd from continuing the preparation for multi-user.
I see nothing in any of the cron files which looks like it could cause sys-usb to start, BUT I can see many lines in journalctl like this:
`dom0 CROND[123445]: (user) CMD (qvm-start --skip-if-running sys-usb…’
All is working now, but I would really like to understand :
- How do I get crond messages in the journal for tasks I cannot find in /etc/*cron* ?
- do I have some missing file(s) or some leftovers, because this system has been upgraded through several Qubes-os versions?
- Alternatively, have I made some weird, long forgotten, customisation to cause this?
- Or did I miss something else? (not unlikely, given my ineptness with systemd!)
Very mystified… all suggestions welcome.