leni1
May 15, 2024, 10:50am
1
So I connected an external hard drive via USB and it got automatically attached to sys-usb. I tried opening it in a disposable VM and attached it to that as well.
However though I can see it in the File Manager, I can’t open it to browse the files and I am not sure how to mount it in the terminal.
Any ideas on what I should do would be helpful.
The disposable most likely uses the default of fedora-39-xfce for template and I am using the File Manager that comes with that.
Trying to mount it in the terminal like so:
mount.ntfs computer:///My \Drive /mnt/removable/
Gives me “failed to access ‘computer:///My Drive’ no such file or directory”
Change computer:///My \Drive
to the proper device name like /dev/sda1 or /dev/xvdi1 or something similar.
You can find it in this command output:
sudo fdisk -l
This page is part of device handling in qubes. If you don’t know what a “block device” is, just think of it as a fancy way to say “something that stores data”. Using the Devices Widget to Attach a Drive (Note: In the present context, the term “USB...
leni1
May 15, 2024, 11:03am
3
sudo fdisk -l
Should be run in which terminal? dom0 or the disposable VM’s terminal.
At least for the disposable VM’s terminal, I don’t see the device.
In the disposable VM’s terminal to which you’ve connected the disk from sys-usb.
Did you attach the disk to it from sys-usb?
leni1
May 15, 2024, 11:20am
5
From what I can see, when I plug it in, it automatically attaches to sys-usb.
Then when I attach it to the disposable VM, it gets the name ‘My_Drive’ and appears as directly attached to the disposable VM (when I click on Qubes Devices on the task bar)
There are also two entries for the device that show up in the Qubes Devices listing as well. All of this is under Data (Block) Devices section
Under the USB Devices section, the external drive has a different name and is shown as connected to sys-usb, with an arrow pointing to the disposable VM’s name.
leni1
May 15, 2024, 11:33am
6
The steps I followed are like so:
Plug in the device with a USB cable into my computer
There appears an entry My_Device under the Data (Block) Devices and the brand name for the drive appears under the USB Devices section.
At this point what should I do to open the drive in a disposable VM so as to see the files on the drive in File Manager?
leni1
May 15, 2024, 11:43am
7
So after steps #1 and #2 , I attached the device entry under USB Devices to the disposable VM.
When I open “Computer” in the disposable VM’s file manager, there are two entries: File System and removable. Clicking on the removable entry shows it as mountable.
Running sudo fdisk -l
only shows the partitions of Qubes OS as far as I can tell and doesn’t show the hard drive.
It should be present if it’s attached successfully.
I’ve just checked it and it worked for me.
What disk names do you have there?
leni1
May 15, 2024, 12:45pm
9
So I tried to open the disk on another computer and the issue seems to be with the disk itself:
[ 1411.145959] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=67s
[ 1411.145992] sd 0:0:0:0: [sda] tag#0 Sense Key : Hardware Error [current]
[ 1411.146008] sd 0:0:0:0: [sda] tag#0 Add. Sense: No additional sense information
[ 1411.146027] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 02 47 00 00 02 00
[ 1411.146044] I/O error, dev sda, sector 583 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[ 1411.146065] Buffer I/O error on dev sda1, logical block 260, async page read
Is the output I get from sudo dmesg
in the disposable VM.
I will try to see if the disk is salvageable.
Thanks for the help
leni1
May 15, 2024, 2:20pm
10
So I tried with another drive and I get this in the disposable VM
[ 9330.877160] vhci_hcd: connection closed
[ 9330.877300] vhci_hcd: stop threads
[ 9330.877326] vhci_hcd: release socket
[ 9330.877392] usb 2-1: USB disconnect, device number 3
[ 9330.877531] vhci_hcd: disconnect device
[ 9338.180298] audit: type=1100 audit(1715782293.334:458): pid=4042 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=pam_rootok acct="root" exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
[ 9338.180746] audit: type=1103 audit(1715782293.335:459): pid=4042 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
[ 9338.180831] audit: type=1006 audit(1715782293.335:460): pid=4042 uid=0 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=15 res=1
[ 9338.180847] audit: type=1300 audit(1715782293.335:460): arch=c000003e syscall=1 success=yes exit=1 a0=3 a1=7ffe89da94d0 a2=1 a3=0 items=0 ppid=4040 pid=4042 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=15 comm="qrexec-agent" exe="/usr/lib/qubes/qrexec-agent" subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 key=(null)
[ 9338.180874] audit: type=1327 audit(1715782293.335:460): proctitle="/usr/lib/qubes/qrexec-agent"
[ 9338.181191] audit: type=2300 audit(1715782293.335:461): pid=4042 uid=0 auid=0 ses=15 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='pam: default-context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 selected-context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
[ 9338.205055] audit: type=1105 audit(1715782293.359:462): pid=4042 uid=0 auid=0 ses=15 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_selinux,pam_loginuid,pam_selinux,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_umask,pam_lastlog acct="root" exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
[ 9338.213222] audit: type=1334 audit(1715782293.367:463): prog-id=135 op=LOAD
[ 9338.213401] audit: type=1334 audit(1715782293.367:464): prog-id=136 op=LOAD
[ 9338.213475] audit: type=1334 audit(1715782293.367:465): prog-id=137 op=LOAD
[ 9338.359684] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(0)
[ 9338.359699] vhci_hcd vhci_hcd.0: devid(196610) speed(5) speed_str(super-speed)
[ 9338.359726] vhci_hcd vhci_hcd.0: Device attached
[ 9338.600853] usb 2-1: SetAddress Request (4) to port 0
[ 9338.600902] usb 2-1: new SuperSpeed USB device number 4 using vhci_hcd
[ 9338.616964] usb 2-1: New USB device found, idVendor=1058, idProduct=2626, bcdDevice=10.34
[ 9338.616978] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9338.616986] usb 2-1: Product: My Passport 2626
[ 9338.616992] usb 2-1: Manufacturer: Western Digital
[ 9338.616997] usb 2-1: SerialNumber: 575837324441334331354834
[ 9338.618916] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 9338.619038] scsi host0: usb-storage 2-1:1.0
[ 9339.625906] scsi 0:0:0:0: Direct-Access WD My Passport 2626 1034 PQ: 0 ANSI: 6
[ 9339.626773] scsi 0:0:0:1: Enclosure WD SES Device 1034 PQ: 0 ANSI: 6
[ 9339.636867] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 9339.637733] ses 0:0:0:1: Attached Enclosure device
[ 9339.637789] ses 0:0:0:1: Attached scsi generic sg1 type 13
[ 9339.640758] ses 0:0:0:1: Wrong diagnostic page; asked for 1 got 8
[ 9339.640767] ses 0:0:0:1: Failed to get diagnostic page 0x1
[ 9339.640773] ses 0:0:0:1: Failed to bind enclosure -19
[ 9339.641143] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 9339.642054] sd 0:0:0:0: [sda] 9767475200 512-byte logical blocks: (5.00 TB/4.55 TiB)
[ 9339.642064] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 9339.642775] sd 0:0:0:0: [sda] Write Protect is off
[ 9339.642784] sd 0:0:0:0: [sda] Mode Sense: 47 00 10 08
[ 9339.644548] sd 0:0:0:0: [sda] No Caching mode page found
[ 9339.644558] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 9339.665123] sda: sda1
[ 9339.665235] sd 0:0:0:0: [sda] Attached SCSI disk
[ 9343.461746] kauditd_printk_skb: 5 callbacks suppressed
[ 9343.461750] audit: type=1101 audit(1715782298.616:471): pid=4214 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="user" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[ 9343.461814] audit: type=1123 audit(1715782298.616:472): pid=4214 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/user" cmd="dmesg" exe="/usr/bin/sudo" terminal=pts/0 res=success'
[ 9343.462506] audit: type=1110 audit(1715782298.616:473): pid=4214 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_localuser,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[ 9343.465091] audit: type=1105 audit(1715782298.619:474): pid=4214 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[ 9343.466270] audit: type=2300 audit(1715782298.620:475): pid=4215 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='newrole: old-context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 new-context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
I did the steps as mentioned here and here
When I click on the device in the File Manager, it says there was an error in mounting the device and that I should check dmesg
for details.
If it helps, this drive is 5TB and formatted using NTFS.
cd ~
mkdir mnt
sudo mount /dev/sda1 mnt
Then access your disk in ~/mnt directory using File Manager.
1 Like