Can't attach large USB to Qubes OS

Hi

I have problems with an 256gb USB. It pops up just fine in sys-usb and I can attach it, but it does not appear under files. I have tried format it to exFAT and NTFS. Works fine on Windows.

Another weird think that might be related is, when I connect an USB, it pops up two times under sys-usb. At the top where it says “sys-usb:sda - USB NAME”

and then again at the bottom where it says sys-usb:xx number - USB NAME".

If I attach the top one (SDA) it appears under files->Other locations

If I attach the bottom one (for USBs that works) it shows up between the “Trash” and “Other locations” in files, where USB normally appear in Linux.

Thanks in advance

I have problems with an 256gb USB. It pops up just fine in sys-usb and I can attach it, but it does not appear under files. I have tried format it to exFAT and NTFS. Works fine on Windows.

Can you check the output of lsblk when you pass it through? There
should be an entry for “xvdi” or “xvdj” which matches the device that
you can manually mount.

Another weird think that might be related is, when I connect an USB, it pops up two times under sys-usb. At the top where it says “sys-usb:sda - USB NAME”

and then again at the bottom where it says sys-usb:xx number - USB NAME".

This is a difference between attaching it as a USB device and attaching
it as a block device. One provides access to only the storage, but is
far more stable. The other passes the USB interface through, which is
useful for things which do more than just storage.

The general recommendation is to use block pass through when USB is not
required.

If I attach the top one (SDA) it appears under files->Other locations
This is because Linux just sees a new block device (/dev/xvdi,xvdj…
etc). It can’t tell that the device is removable.
If I attach the bottom one (for USBs that works) it shows up between the “Trash” and “Other locations” in files, where USB normally appear in Linux.
Passing through the USB will mean Linux will see it as removable, and
the application knows to treat it differently.

Thanks for explaining. My guess is that the first choice is as a block device, aka the sys-usb:sdb, while sys-usb:NUMBER passes the USB interface through.

Actually, I get 3 devices when I block it in. Two at the top as sdb and one at the bottom with the number name (USB Interface Passthrough?)

The names and what happens is as follows:

Attach sys-usb:sdb patriot_memory ()
It shows up in appvm terminal with the lsblk as following

xvdi 202:128 1 230.8G 0 disk
└─xvdi1 202:129 1 230.8G 0 part

Show up under Other locations in files, but can’t open as it can’t open exfat.

Attach sys-usb:sdb patriot_memory (USB)
Shows up in appvm terminal with the lsblk as following

xvdi 202:128 1 230.8G 0 disk

Does not show up under other locations in files.

Attach sys-usb:3-1 - patriot_memory_SOMENUMBERS/LETTERS

Does not show up in appvm terminal with lsblk.

Does not show up as USB under files anywhere.

If it’s possible I would like to pass the USB interface through, so I got more options while using the USB.

Thanks in advance

Thanks for explaining. My guess is that the first choice is as a block device, aka the sys-usb:sdb, while sys-usb:NUMBER passes the USB interface through.
If we are talking about the Qubes Devices menu, then yes. The top
section is block devices. The bottom section is USB. Mine have icons
next to them to differentiate.
Actually, I get 3 devices when I block it in. Two at the top as sdb and one at the bottom with the number name (USB Interface Passthrough?)
That sounds about right as there is the disk itself, as well as
partition 1 (sdb and sdb1).
The names and what happens is as follows:

Attach sys-usb:sdb patriot_memory ()
It shows up in appvm terminal with the lsblk as following

xvdi 202:128 1 230.8G 0 disk
└─xvdi1 202:129 1 230.8G 0 part

Show up under Other locations in files, but can’t open as it can’t open exfat.
You will need to install exfat-utils for this. It can be found in the
rpmfusion-free third party repo for fedora or the main repo for Debian
Attach sys-usb:sdb patriot_memory (USB)
Shows up in appvm terminal with the lsblk as following

xvdi 202:128 1 230.8G 0 disk
xvdi here is equivalent to xvdi1 above.
Does not show up under other locations in files.

Attach sys-usb:3-1 - patriot_memory_SOMENUMBERS/LETTERS

Does not show up in appvm terminal with lsblk.

Does not show up as USB under files anywhere.

If it’s possible I would like to pass the USB interface through, so I got more options while using the USB.

From the output above, it would seem that this is not easily possible.
There may be some further debugging that you could do, but I’m not sure
what the “more options” you are referring to are or whether they would
be worth it. Usually a USB drive will provide only mass storage, so
using USB passthrough doesn’t provide anything more and is often slower
and more unstable.

USB passthrough is useful for other devices, such as serial adapters or
webcams. In this case, I’d use the simplest means (block).

Thank you for the answer.

I thought about if I should format and encrypt things easily, as I will have personal (social security number documents etc) things on the drive and would like to use Linux builtin encryptions methods, so if I ever lost the drive from my keyring, noone would be able to access the files.

But thank you for your time.

Thank you for the answer.
Happy to help.

I thought about if I should format and encrypt things easily, as I will have personal (social security number documents etc) things on the drive and would like to use Linux builtin encryptions methods, so if I ever lost the drive from my keyring, noone would be able to access the files.
These builtin methods should work just fine with either passthrough
method. As usual, the arch wiki is a decent resource here:
dm-crypt/Device encryption - ArchWiki

I am glad you were successful in solving that problem. I was reading some of the same documentation about USBs where they were providing some insight about how to manage USB attachment and thought I should create a sys-usb since I skipped that step during initial configuration.

On the other, I currently So, I tried to create a sys-usb in order to prevent rubber ducky attacks but I ended up killing my mouse.

At first, I made a VM called sys-usb with network connection using the create new-app-VM function (thinking it was that simple), then I found in the docs, the best method to make a sys-usb was to write

qubesctl state.sls qvm.sys-usb

in dom0, which I did. The log response was promising as no errors were returned.

Unfortunately, on my next restart my mouse was inactive. I tried a few different USB ports and nothing.

I returned to the docs to see, if there was a fix for this in usb-qubes.md and they suggested to default the system to accept all usb-mice.

So, I looked for the script/package qubes.Inputmouse but I did not find it. So, I deleted the new-app-VM and tried the mouse again but nothing happened.

Finally, I tried the suggested steps to create the file by writing the following:

[user@dom0 ~]$ qubesctl state.sls qvm.sys-usb

and this is what was returned :

Local:
Data failed to compile:

   No matching sls found for 'qvm.sys-usb' in env 'base'

DOM0 configuration failed, not continuing

At this point,I want to get my USB Mouse working again.

I looked for the qubes.InputMouse to see if I could add the suggested code to have my mouse attached but I did not find the file in qubes-rpc.

I am hoping someone would know how to fix this.

thanks,

I am not 100% sure for your case but can you try to create sys-usb with no-strict-reset pci passthrough and allow mouse from sys-usb to dom0 without asking you.



If you do this, I think you should avoid hiding your usb controllers at boot.
1 Like

Thanks for the reply. I took your suggestion and decided to reinstall Qubes OS while selecting the default sys-usb option. On the other hand, I’m still on the fence about running all peripherals through the sys-net. Have you any experience with that option or can I proceed without it?

Again, thanks.

Can you give some more detail what you are trying to say?

Sure, what I was getting at was: how does sys-net manage multiple connections in parallel?

During a qubes install we are asked if we want to use sys-net for other tasks such as peripherals (paraphrased). It’s the radio box under create a sys-usb.

When I saw that option, I thought it was for peripherals such as printers or other devices.
From my limited experience in internet networking, I was worried sys-net couldn’t handle multiple paralel tasks involved in creating networks without sharing information. In essence, I was worried that sys-net could share printer tasks with some listening ports. Possibly, It’s because I can’t figure out why you can request netstat on some domains and not on others. Then again, maybe I have limited undestranding of sys-net or how to add a printer to a domain.

thanks,

I’ve encountered a similar problem with large capacity USBs 64 and 256G. However, the issues started after I cleaneded the USBs and changed the filesystem on them to exFat and dos (worked fine on Windows) and renamed the USB.

However, when I used it on qubes, it wouldn’t appear in the file’s side menu or under other locations of files if used the sys-usb:sda - USB NAME.

So I tried the other option sys-usb:xx number - USB NAME and it would load under 'trash’and above ‘other locations’ icons.

However, when I tried to access the USB, I would receive the following message:

Error Mounting /dev/sda at /run/media/user/USBNAME: unknown filesystem type “exfat”

Bizarely, the exfat USBs were working last week. So, I tried to install RPM Fuse, and exfat-utils but the checksum did not on a testing AppVM

Preformatted text[user@ApVM ~]$ sudo dnf install exfat-utils
RPM Fusion for Fedora 33 - Free - Updates 563 B/s | 3.7 kB 00:06
Errors during downloading metadata for repository ‘rpmfusion-free-updates’:

  • Downloading successful, but checksum doesn’t match. Calculated: 54fad5df88472ecd29697e6af8da2d4bea7a143321e19931f4797b8fe74f68cd62798256a656289f37d2db074eb8d29bdfa1b58921c96a9b6b468f8762d49e26(sha512) Expected: a3c2cb175634b41fef794d011b9ed553bb2f83872e47c7038c2684d628a652a05951022374fc7aa6d4ffeeba80d8509d80f26b3c52eda293da32e9fa408ab4db(sha512)
    Error: Failed to download metadata for repo ‘rpmfusion-free-updates’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    RPM Fusion for Fedora 33 - Nonfree - Updates 125 kB/s | 71 kB 00:00
    Ignoring repositories: rpmfusion-free-updates
    No match for argument: exfat-utils
    Error: Unable to find a match: exfat-utils

Now, I am little perplexed why the checksum didn’t verfy. Mind you I installed it on a AppVM to test the REPO.

I’ve got a few options: either figure out why the checksum didn’t work, why the exfat-utils weren’t found, or why i can’t download the exfat-util download contingent?

Would any of you have a suggestion about this?

Thanks,