Disk password box not showing (usb in dom0 is not restricted)

This issue started with when i got this error message “usb is not restricted in dom0” after reading few same posts in forum tried creating the sys-usb myself.

created a simple qube with hvm as the mode(not sure what that does) and assigned usb ports to it.

now read a post here which created sys usb through the sudo qubesctl state.sls qvm.sys-usb command in the terminal. exeut4ed that command some text showed up then nothing. checked qubes manager, only the sys-usb i created was there. so decided to delete it. and then restarted the system.

Now when i boot the system there is not text box to enter the disk password

checked the log… it gives

[ok] Reached target paths.
[ok[ Started Show Plymouth boot screen.
[ok] Forward Password R…s to Plymouth Directory watch

This repeats several times

then

warning: somepath/qubes_dom0-root doesnot exist
warning: root does not exist
warning: swap does not exist
warning: luks uuid not found

Entering emergency mode

press enter for manitenenca

Warning: not all diskss have been found
warning: you might want to regenerate your initramfs.

I have no clue how to fix this never used linix or any text based OS, not at all familiar with this system.

Did you install Qubes OS on a USB disk?

yes it was on a usb stick

I was able to stop the autostart by entering the grub menu by press button “E” on keyboard. and appending the lines with qubes.skip_autostart after rh.qubes_quiet and removed the line rd.qubes.hide_all_usb. Then pressed ctrl+x and the password box appeared.

Logged into the system. Opened qube manager, sys-usb was still there. Identified the correct id of the usb attached and then used the device tab in the sys-usb settings menu to add the other usb terminals in the list. Hit apply and ok.

Followed the steps below to find the id of the usb terminal :

First, find out which USB bus the device is connected to (note that these steps need to be run from a terminal inside your USB qube):

* *lsusb* *

For example, I want to attach a broadband modem to the NetVM. In the output of lsusb it may be listed as something like:

* *Bus 003 Device 003: ID 413c:818d Dell Computer Corp.* *

(In this case, the device isn’t fully identified)

The device is connected to USB bus #3. Check which other devices are connected to the same bus, since all of them will be attach to the same VM.

To find the right controller, follow the usb bus:

* *readlink /sys/bus/usb/devices/usb3* *

This should output something like:

* *../../../devices/pci-0/pci0000:00/0000:00:1a.0/usb3* *

Now you see the path and the text between /pci0000:00/0000: and /usb3 i.e. 00:1a.0 is the BDF address

Now to follow the steps where you need to edit the grub file is where i am stuck. How to open that file in dom0. Not able to edit the grub file and follow the consecutive steps.

You can use nano text editor in dom0 terminal:

sudo nano /etc/default/grub

opened the file in nano using the command. in the grub file usbcore.authorized_default=0 line is not there.

and is there need to take backup of this file or something like that incase i edit something accidentally


1. To save the file in nano Linux, follow the instructions:
2. Press Ctrl+O.
3. The message "WriteOut" will appear in the terminal. Enter the file name you want to give to the saved file.
4. Press Enter to save the file.
5. If you want to leave the editor, press Ctrl+X

Remove rd.qubes.hide_all_usb and usbcore.authorized_default=0 options if you have them.

You can make a copy of this file just in case:

cp /etc/default/grub ~/grub.backup

ran this command in dom0 terminal but gives error - “You must run this as root”

found this link but not sure how to execute

Run it with sudo:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Ran the command with sudo like sudo grub2-mkconfig -o /boot/grub2/grub.cfg in dom0 terminal and it worked

after hitting enter -

Generating grub configuration file …

Found some text…

error: syntax error.
error: Incorrect Command.
error: synta error.
syntax error at line 164
Syntax error are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub and /etc/grub.d/*

@apparatus

It seems that you’ve made an error when you edited the /etc/default/grub file.
Check the line 164 in /etc/default/grub. Maybe you removed the quotes or something.

the syntax error was “<>” not to use these two special characters when entering the BDF id

after removing the “<>” characters and entering the sudo grub2-mkconfig -o /boot/grub2/grub.cfg in dom0 terminal, it worked

@apparatus

completed till step: sudo grub2-mkconfig -o /boot/grub2/grub.cfg in dom0 terminal

but the issue still persists

Still i have to edit the grub and remove the line “qubes.hides_all_usb” at the boot from the grub menu.

when i open the file grub it has the edited lines and the lines “qubes.hie_all_usb” is not there.

What’s the output of this command in dom0 terminal?

sudo grep -lr "hide_all_usb" /boot /etc/default/grub

it gives output of
/…/efi/EFI/qubes/grub.cfg

@apparatus

Then run this command instead:

sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg

the error still persists

no disk password box
but now there is this in the grub when you boot and enter the grub edit menu

qubes.hide_pci=id1,id2 

is there any syntax error

@apparatus