Need Help: Ruined my installation via PCI pass through

15 views
Skip to first unread message

Ulrich Windl

unread,
Dec 8, 2020, 5:12:25 PM12/8/20
to qubes...@googlegroups.com
Hi!

Trying to get my WLAN adapter into sys-net, I made a fatal mistake: The USB host added also has the boot device (and mouse) connected. Now as soon as sys-net starts (maybe even earlier) the PV for qubes becomes inaccessible.

Mounting the device in another Linux system, I tried to prevent the start of sys-net by renaming the systemd link for multi-user target, but that did not help. The kernel panics shortly after boot.
Before I had tried to find (and edit) the settings that cause the problem, but could not find them.

My idea was to prevent start of sys-net, then use the qubes manager to undo my bad setting.
Unfortunately I don't get that far.

Any help appreciated!

Regards,
Ulrich

awokd

unread,
Dec 8, 2020, 5:22:34 PM12/8/20
to qubes...@googlegroups.com
Ulrich Windl:
Try
https://github.com/QubesOS/qubes-issues/issues/2270#issuecomment-242900312
first. If that doesn't work, make a copy of /var/lib/qubes/qubes.xml,
and edit it by hand to remove autostarting sys-net (and all other
autostarts that depend on it such as sys-firewall), and/or remove the
WLAN binding to sys-net. It's XML so a somewhat fragile file; pay
attention to the <>/ etc.

--
- don't top post
Mailing list etiquette:
- trim quoted reply to only relevant portions
- when possible, copy and paste text instead of screenshots

unman

unread,
Dec 8, 2020, 10:25:30 PM12/8/20
to qubes...@googlegroups.com
On Tue, Dec 08, 2020 at 10:22:17PM +0000, 'awokd' via qubes-users wrote: > Ulrich Windl:
> > Hi!
> >
> > Trying to get my WLAN adapter into sys-net, I made a fatal mistake: The USB host added also has the boot device (and mouse) connected. Now as soon as sys-net starts (maybe even earlier) the PV for qubes becomes inaccessible.
> >
> > Mounting the device in another Linux system, I tried to prevent the start of sys-net by renaming the systemd link for multi-user target, but that did not help. The kernel panics shortly after boot.
> > Before I had tried to find (and edit) the settings that cause the problem, but could not find them.
> >
> > My idea was to prevent start of sys-net, then use the qubes manager to undo my bad setting.
> > Unfortunately I don't get that far.
>
> Try
> https://github.com/QubesOS/qubes-issues/issues/2270#issuecomment-242900312
> first. If that doesn't work, make a copy of /var/lib/qubes/qubes.xml, and
> edit it by hand to remove autostarting sys-net (and all other autostarts
> that depend on it such as sys-firewall), and/or remove the WLAN binding to
> sys-net. It's XML so a somewhat fragile file; pay attention to the <>/ etc.
>

I wouldn't change too much in that file, just the absolute minimum.
To edit the xml file and remove the devices assigned to sys-net, look
for lines like <device backend-domain="dom0" id="xxxxxx"/> in the
sys-net section - delete those lines.
MAKE SURE you have a copy of that file somewhere safe before editing.

Then restart - sys-net should start but wont be stealing the usb
devices.

Ulrich Windl

unread,
Dec 10, 2020, 3:15:43 PM12/10/20
to qubes...@googlegroups.com
Hi!

Thanks for the help. Actually I'm sending this from Qubes, so the fix
was successful 8-)

Let me share some of my desperate attempts that all did not work. I'm
telling you so you do not waste your time like I did.

* Editing /etc/libvirt/libxl/sys-net.xml did not help
* Trying to deactivate automatic start of sys-net via systemd did not work
* Editing the GRUB boot entry interactively allows you to specify
"single" for single-user boot, but as long as the root user is disabled
you end in a "cul de sac". I mounted the root LV from another system and
set the root password to something (editing /etc/shadow).
* Trying the recovery option of the Installation media did not work (see
attached image)
* There were some more boot menu choices that did not boot (I didn't
understand what those are good for)
*
https://github.com/QubesOS/qubes-issues/issues/2270#issuecomment-242900312
didn't apply to my case (it seemed to me)
* Editing /var/lib/qubes/qubes.xml was the right fix:
[root@dom0 qubes]# cat qubes.xml.diff
--- qubes.xml.SAvED 2020-12-08 21:31:07.341007169 +0000
+++ qubes.xml 2020-12-10 20:06:34.395507685 +0000
@@ -330,7 +330,6 @@
<devices class="block"/>
<devices class="pci">
<device backend-domain="dom0" id="03_00.0"/>
- <device backend-domain="dom0" id="00_14.0"/>
</devices>
<devices class="mic"/>
<devices class="usb"/>


Regards,
Ulrich
IMG_20201209_233807.jpg

donoban

unread,
Dec 11, 2020, 8:07:16 AM12/11/20
to qubes...@googlegroups.com
On 12/10/20 9:14 PM, Ulrich Windl wrote:
> On 12/9/20 4:25 AM, unman wrote:
>> On Tue, Dec 08, 2020 at 10:22:17PM +0000, 'awokd' via qubes-users
>> wrote: > Ulrich Windl:
>>>> Hi!
>>>>
>>>> Trying to get my WLAN adapter into sys-net, I made a fatal mistake:
>>>> The USB host added also has the boot device (and mouse) connected.
>>>> Now as soon as sys-net starts (maybe even earlier) the PV for qubes
>>>> becomes inaccessible.
>>>>
>>>> Mounting the device in another Linux system, I tried to prevent the
>>>> start of sys-net by renaming the systemd link for multi-user target,
>>>> but that did not help.  The kernel panics shortly after boot.
>>>> Before I had tried to find (and edit) the settings that cause the
>>>> problem, but could not find them.
>>>>
>>>> My idea was to prevent start of sys-net, then use the qubes manager
>>>> to undo my bad setting.
>>>> Unfortunately I don't get that far.
>>>

Did you check '/var/lib/qubes/qubes.xml'? Maybe there you can disable
"autostart" property and also remove attached pci devices.
OpenPGP_0x141310D8E3ED08A5.asc
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages