Non-qubes kernel with Arch template fails

I’m doing some experimentation with hardware passthrough, and wanted to test using the Arch Linux template which I built a few months ago.

In order to be able to boot the VM’s kernel rather than the Qubes kernel, I needed to install Grub in the VM. This worked without issues.

When booting the VM’s kernel, nothing happens (rexec timeout), so I booted with the debug window active. I get past the Grub boot screen and then the following message is displayed, and then the VM hangs: Failed to start adjust root filesystem size.

I tried to build a new kernel from source using the same kernel config as the Qubes kernel, but when trying that one, I get the same problem.

Is there anything I can do to debug the boot process further? I’d like to know why adjust root filesystem size fails to start properly. Searching for the error message yields nothing. There are literally no instances of this message on the Internet at this time (I’m sure there is now, after I posted it).

The short answer would be that you need the qubes-vm-kernel-support package (under qubes-src/linux-utils). This would bring in GRUB and mkinitcpio and install the right hooks into the initramfs and direct the kernel to the rootfs.

The long answer is the qubes-vm-kernel-support package for archlinux doesn’t work. See #5584; there’s a PR but it hasn’t been merged.

As for where adjust root filesystem size comes from, it is a Qubes-specific systemd service installed into the template (qubes-rootfs-resize.service).

You can cheat by increasing the qrexec_timeout to something like 180 (3 mins) with qvm-prefs [vm] qrexec_timeout 180, as what’s hanging is setting up swap (xvdc1). That job times out after 1.5 minutes. After that the VM will boot, just without swap unless it is manually configured.

Thank you very much. This was what I needed. I’m still not able to bring up a full Arch environment with a custom kernel, but those issues are unrelated to the one being discussed in this thread.

Again, thanks for your help.