Can't attach a partition

Greetings, I’m having some issues with device management, in particular with mounting disk partitions to a Whonix-based AppQube.

I have two disks: disk A has W10 installed; disk B has two partitions, partition B1 has Qubes, Partition B2 has the bitcoin blockchain.

I created a Whonix-ws templateVM and installed Bitcoin Core on it. Then i created a Bitcoin AppQube. The idea is to mount partition B2 on the Bitcoin AppQube.

The issue is…I just can’t do that. I tried with Qubes Device gui: no error is reported, the entry goes bold, i have the ejection symbol next to the Bitcoin vm, but I can’t access the partition from the vm. I tried with the terminal, I also tried making it persistent: still, no error message, everything seems to be working fine, but i can’t access the partition from the AppQube (I even get the error message if I try to attach the partition to another vm without shutting down the Bitcoin VM first).

What about other partitions and other vms? Here’s where things start to get weird…I’m never capable of attaching a disk partition to BitcoinVM, but I can attach an usb drive to it. With other VMs, sometimes I can do it, sometimes I can’t. Sometimes I can attach B2 but not A to Work, sometimes I can attach A to Personal but no B2…it’s just a random mess. But I’m never capable of attaching any disk partition to Bitcoin.

Any idea?

P.s: I know that dual boot setup is not ideal, but I’m a noob and for the time being I’ll just be practicing with Qubes, I need a fallback Windows installation. I’ll switch to Qubes only when I feel ready.

About the partitioning of the Qubes ssd, it’s an attempt to avoid downloading the blockchain from scratch. I’d like to solve this issue for now, if it turns out to be too troublesome I’ll try something else.

Greetings Newb

When you attach a partition, it should appear as /dev/xvdi, /dev/xvdj, etc
If you run qvm-block in dom0, the “USED BY” column will show where it
should appear in the qube.
If you open a terminal in the qube, can you check to see if that device
is present? (You can also run sudo dmesg or journalctl immediately
after attaching the partition, and see what has happened in the qube.)

Thank you for helping :slightly_smiling_face:

When I attach the partition, I get a popup system message saying that the partition is being attached, I don’t get one for confirmation of successful attachment (don’t if it’s expected). qvm-block “USED BY” column shows that it’s correctly attached to the Bitcoin VM with frontend xvdi. Thunar file manager can’t see the partition. DMESG and JOURNALCTL both give the following message:

[…] xen-blkback: backend/vdb/10/51840: using 2 queues, protocol 1 (x86_64-abi) persistent grants

Update: if I attach another partition first, and the bitcoin partition second, the first one doesn’t show up in thunar file manager, but the btc partition does; however, I still can’t browse it, the icon is semi-transparent. I’ve tried different combos and the only partition I seem to be able to browse in this vm is the windows EFI partition…

The same thing happens with every other whonix-based AppQubes. I have better, but still inconsistent results with fedora-based and debian-based AppQubes: I can usually see AND read/write the second partition I mount, but not the first.

Some additional infos, don’t know if they can be pertinent:

  • Both disks are GPT
  • When I installed Qubes, at first i wasn’t able to boot the installer in UEFI mode. I could get it started in Uefi & Bios compatibility mode. I ended up installing the os using UEFI and commenting-out noexitboot and mapbs. I didn’t make any other change in the installation.
  • The installer wasn’t capable of shrinking my existing partition to make space for Qubes so I did that from Windows

What’s the output of ls /dev/xvd* in the qube?

The frontend of every partition I attach is listed, even those that I can’t see/browse/edit from the file manager. There are also other 9 entries, is that supposed to happen?

Since I dont know what you see I cant comment.

I would:

  1. qvm-block detach the partition.
  2. restart the qube
  3. Re-attach the partition
  4. ls /dev/xvd* and look for /dev/xvdi
  5. sudo mount /dev/xvdi /mnt

Then see if the device has been mounted from command line (sudo ls /mnt/)
and if /mnt is browsable in the file manager.

Report back, quoting any error messages or faults.

I see xvda, xvda1, xvda2, xvda3, xvdb, xvdc, xvdc1, xvdc3, xvdd, xvdi (my partition). The same goes for fedora-based appqubes.

Oh, I didn’t think of doing that.

If I try to mount any partition on the whonix-based appqube I have this error (whether it’s the first or second block I attach, so whether I can see (but not browse) it on the file manager or not)

mount: /mnt: unknown filesystem type 'ntfs'.

If I try to mount the Bitcoin partition on the Fedora-based appqube when it’s the first block I attach (when its frontend is xdvi), the terminal does nothing and gives no error (the partition does not become browsable on /mnt), and i must ctrl+C to return to the terminal.

On the fedora appqube, if the first block I attach is the Windows partition, if I try to mount it on /mnt I have this error:

The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)

That could make sense, but if I attach the block after another one as been attached, and so if the frontend is xvdj, it works…

Update 1: I performed a full windows shutdown and was able to mount the windows partition on /mnt in the fedora Appqube, but the fact remains that it doesn’t show up in the file manager by itself (when it’s the first block). I’m still not able to mount it on the whonix-based appqube (same error as above). The situation is unchanged for the bitcoin partition.

Update 2: after installing ntfs-3g on the whonix appqube, I am able to mount the partition on /mnt, browse and edit it. Bitcoin core can use it. Ok, so, why doesn’t it show up on the file manager by itself?

I see xvda, xvda1, xvda2, xvda3, xvdb, xvdc, xvdc1, xvdc3, xvdd, xvdi (my partition)

Oh, I didn’t think of doing that. I have this error:

“mount: /mnt: unknown filesystem type ‘ntfs’.”

This tells you that you havent got support for ntfs - (and tells me
that you are probably using a minimal template.)
You need to install that support - in Debian it’s apt install ntfs-3g
in Fedora, dnf install ntfs-3g.

Many problems that people have in Qubes are actually not Qubes specific.
This is one of those.
You can find many guides online to enabling ntfs support.
The only Qubes specific part is that you have to do this in the template.

I had actually already solved that issue, maybe I should have edited away that part instead of just writing an update at the end of my post.

The Qubes-specific problems I have are that partitions don’t show up as regular drives after I qvm-block attach them, (mounting them on /mnt looks more like a workaround than a solution, and that still doesn’t work on fedora appqubes), unless they’re the second block in a fedora appqube. This fact seemed strange to me and a chance to learn more about the os.

If any post in particular help your solve it, can you mark it as the solution? You do so by clicking the button on the bottom right of each reply and then :white_check_mark: solution.