Fixing a broken config in debian-11-template which breaks VMs

I’m a Qubes noob and made a mistake in the /etc/fstab file in the debian-11-template vm. In the worst-case situation I can re-install the whole thing and just start over, but I thought I would use this as a learning experience with some of the dark corners of the system.

I made changes to /etc/fstab to add some removable USB drives I have and rebooted my system. Unfortunately my changes prevent VMs using it from starting, including sys-net, sys-fiirewall, and others. This prevents me from updating the template using the normal methods.

I tried to mount the logical volume to /mnt, but the mount program indicated it could not mount it due to wrong fs type, bad block, etc. Not sure if I’m missing a magical incantation in the form of a mount argument or something else.

My question is whether there is a way to mount the logical volume so I can edit the fiile, or should I just start over?

You can mount the LVM image

Thanks for the suggestion.

I got to step 2, but the qvm-run command fails because it automatically starts sys-net and sys-firewall and both of these depend on the corrupted template. The error message mentions “Cannot connect to qrexec agent for 60 seconds…”

I tried this command using the --service=qubes.StartApp+xterm and using --no-gui /bin/bash to get a command line, but both result in the same result with failure to start the sys-net and sys-firewall VMs.

I think you can just remove the netvm from the disp template you are using, it should allow you to start the disp vm without networking.

Just remember to add it back when you are done.

Thanks. I will give this a go later today.

Or temporarily change the template for sys-net and sys-firewall to a working template if you need internet.

I ended up changiing the templates for sys-net to fedora-36. I then created a throwaway, not disposable, qube using sys-net for networking and fired it up. I used the how to mount LVM volumes howto and was able to resolve my issue. After insuring the debian-11 based VMs ran, I deleted the throwaway VM and restored sys-net to debian-11.

Everything now seems to be working.

Much thanks to enmus and renehoj for their help.

1 Like

Great. It would be a good idea to mark @renehoj’s post a s a solution so it could help others too… Thanks