[qubes-users] Can hardly run anything? every dom0 command results in Errrno2?

My computer actiing strange like some appvms not opening so i decided to restart and restarted normally and booted back up fine except now i can hardly open anything. Appvms will not start, I tried to do a backup from dom0 term and that gave me an error, tried to run qubes-qube-manager and that gave me a [similar error](https://pasteboard.co/JufhRoH.jpg)... I'm at a loss. Of course I just finished doing some important work and didnt immediately backp (usually bkup weekly).

I am not thrilled about reinstalling but can do it, but really really really want to back up my appvms before nuking everything. If i cant use the regular backup is there a way i can just copy things? I think I can still mount an external drive...

This should give you all the information necessary to get your data saved:

https://www.qubes-os.org/doc/mount-from-other-os/

Regards, Frank

My computer actiing strange like some appvms not opening so i
decided to restart and restarted normally and booted back up fine
except now i can hardly open anything. Appvms will not start, I
tried to do a backup from dom0 term and that gave me an error, tried
to run qubes-qube-manager and that gave me a similar error [1]...
I'm at a loss. Of course I just finished doing some important work
and didnt immediately backp (usually bkup weekly).

I am not thrilled about reinstalling but can do it, but really
really really want to back up my appvms before nuking everything. If
i cant use the regular backup is there a way i can just copy things?
I think I can still mount an external drive...

This should give you all the information necessary to get your data
saved:

https://www.qubes-os.org/doc/mount-from-other-os/ [2]

Regards, Frank

Thank you, I didnt notice that.
I dont suppose you have any thoughts on the error that seems to be borking my system?

I fear I don’t... but isn’t errno 2 something like „file not found“? So it smells like dom0 is having problems getting everything mounted where it belongs - either because the file system is screwed or LVM is having some problems.

In any case, I’d be backing up whatever I could get my hands on and then reinstall...

Ok so on the mount from other os page its not totally clear for me.

I do have a barebones qubes system on another computer (laptop), so would/should I take my ssd from my desktop connect it (have an adapter cable) to my laptop then "pass" the whole disk to an isolated appvm? If yes, then, what is meant by passing the disk to an appvm (copying?) and when it says isolated appvm does that just mean, in my case, an appvm on my laptop? Lastly, as my laptop drive is smaller than my desktop drive, would I be able to selectively copy/mount to my laptop appvm or would I need to go another route?

btw, on my desktop, I am still able to access a dom0 terminal and can connect to an external drive (I think), so can i just cp the appvms to an external drive and then extract the contents of the critical appvms?

Sorry, the mount from other os page is a bit over my head hence my attempting to find options that I can understand :confused:

Ok so on the mount from other os page its not totally clear for me.

I do have a barebones qubes system on another computer (laptop), so
would/should I take my ssd from my desktop connect it (have an adapter
cable) to my laptop then "pass" the whole disk to an isolated appvm?

Yes, this is the idea. Using `qvm-block a <AppVM> <desktop disk>` or the
equivalent GUI widget.

If yes, then, what is meant by passing the disk to an appvm
(copying?) and when it says isolated appvm does that just mean, in my
case, an appvm on my laptop?

Isolated was added because at this point, your AppVM is receiving the
same level of trust as your desktop Dom0. So don't do this is your
internet connected untrusted VM.

Lastly, as my laptop drive is smaller
than my desktop drive, would I be able to selectively copy/mount to my
laptop appvm or would I need to go another route?

When copying data off you would need a drive of that capacity, but to
mount, see files and modify them, there is no copying, it's all done on
the original drive.

btw, on my desktop, I am still able to access a dom0 terminal and can
connect to an external drive (I think), so can i just cp the appvms to
an external drive and then extract the contents of the critical appvms?

By default the AppVMs are LVM volumes, making it a bit hard to just copy
them. If it still works, the Qubes backup tool would be the easiest way
to do this. Otherwise, "isolated AppVM" is interchangeable with dom0.
You could mount them and pull off your files manually, though this may
compromise Dom0 with anything untrusted in the AppVMs.

Sorry, the mount from other os page is a bit over my head hence my
attempting to find options that I can understand :confused:

Maybe once this is sorted, we could use this thread to improve that
document.

On 2020-10-07 21:13, Stumpy wrote:

On 2020-10-06 10:46, Frank wrote:

My computer actiing strange like some appvms not opening so i
decided to restart and restarted normally and booted back up fine
except now i can hardly open anything. Appvms will not start, I
tried to do a backup from dom0 term and that gave me an error, tried
to run qubes-qube-manager and that gave me a similar error [1]...
I'm at a loss. Of course I just finished doing some important work
and didnt immediately backp (usually bkup weekly).
I am not thrilled about reinstalling but can do it, but really
really really want to back up my appvms before nuking everything. If
i cant use the regular backup is there a way i can just copy things?
I think I can still mount an external drive...

This should give you all the information necessary to get your data
saved:
https://www.qubes-os.org/doc/mount-from-other-os/
Regards, Frank

Thank you, I didnt notice that.
I dont suppose you have any thoughts on the error that seems to be borking my system?

I fear I don’t... but isn’t errno 2 something like „file not found“?
So it smells like dom0 is having problems getting everything mounted
where it belongs - either because the file system is screwed or LVM is
having some problems.
In any case, I’d be backing up whatever I could get my hands on and
then reinstall...

Ok so on the mount from other os page its not totally clear for me.
I do have a barebones qubes system on another computer (laptop), so
would/should I take my ssd from my desktop connect it (have an adapter
cable) to my laptop then "pass" the whole disk to an isolated appvm?
If yes, then, what is meant by passing the disk to an appvm
(copying?) and when it says isolated appvm does that just mean, in my
case, an appvm on my laptop? Lastly, as my laptop drive is smaller
than my desktop drive, would I be able to selectively copy/mount to my
laptop appvm or would I need to go another route?

btw, on my desktop, I am still able to access a dom0 terminal and can connect to an external drive (I think), so can i just cp the appvms to an external drive and then extract the contents of the critical appvms?

Well in that case you can do the following in a dom0 terminal (assuming the name of your AppVM you want to get files from is my-appvm):

# create a mount point to access the disk:

sudo mkdir /mnt/private

# make the private volume of the appvm accessible !!! notice the doubling of the dash in the AppVMs name (naturally not applicable if your AppVMs name does not contain a dash) !!!

sudo losetup -f —show /dev/mapper/qubes_dom0-vm—my—appvm—private

# use the loop device the last command printed to the screen (i.e. /dev/loop2) to mount the AppVMs private volume

sudo mount /dev/loop2 /mnt/private

# now you should be able to copy whatever data you want to save

cp /mnt/private/home/user/* /some/place/save/

Hope that works out for you!

Regards, Frank

On 2020-10-07 21:13, Stumpy wrote:

On 2020-10-06 10:46, Frank wrote:

My computer actiing strange like some appvms not opening so i
decided to restart and restarted normally and booted back up fine
except now i can hardly open anything. Appvms will not start, I
tried to do a backup from dom0 term and that gave me an error, tried
to run qubes-qube-manager and that gave me a similar error [1]...
I'm at a loss. Of course I just finished doing some important work
and didnt immediately backp (usually bkup weekly).
I am not thrilled about reinstalling but can do it, but really
really really want to back up my appvms before nuking everything. If
i cant use the regular backup is there a way i can just copy things?
I think I can still mount an external drive...

This should give you all the information necessary to get your data
saved:
https://www.qubes-os.org/doc/mount-from-other-os/
Regards, Frank

Thank you, I didnt notice that.
I dont suppose you have any thoughts on the error that seems to be borking my system?

I fear I don’t... but isn’t errno 2 something like „file not found“?
So it smells like dom0 is having problems getting everything mounted
where it belongs - either because the file system is screwed or LVM is
having some problems.
In any case, I’d be backing up whatever I could get my hands on and
then reinstall...

Ok so on the mount from other os page its not totally clear for me.
I do have a barebones qubes system on another computer (laptop), so
would/should I take my ssd from my desktop connect it (have an adapter
cable) to my laptop then "pass" the whole disk to an isolated appvm?
If yes, then, what is meant by passing the disk to an appvm
(copying?) and when it says isolated appvm does that just mean, in my
case, an appvm on my laptop? Lastly, as my laptop drive is smaller
than my desktop drive, would I be able to selectively copy/mount to my
laptop appvm or would I need to go another route?

btw, on my desktop, I am still able to access a dom0 terminal and can connect to an external drive (I think), so can i just cp the appvms to an external drive and then extract the contents of the critical appvms?

Well in that case you can do the following in a dom0 terminal (assuming the name of your AppVM you want to get files from is my-appvm):

# create a mount point to access the disk:

sudo mkdir /mnt/private

# make the private volume of the appvm accessible !!! notice the doubling of the dash in the AppVMs name (naturally not applicable if your AppVMs name does not contain a dash) !!!

sudo losetup -f —show /dev/mapper/qubes_dom0-vm—my—appvm—private

# use the loop device the last command printed to the screen (i.e. /dev/loop2) to mount the AppVMs private volume

sudo mount /dev/loop2 /mnt/private

# now you should be able to copy whatever data you want to save

cp /mnt/private/home/user/* /some/place/save/

And for the sake of completeness, after you are done copying, do

# unmounting the disk

sudo umount /mnt/private

# detaching the loop device

sudo losetup -d /dev/loop2

(and don’t forget: /dev/loop2 in the above commands is only an example! You have to use whatever the first losetup command is printing to the screen instead!)

Ok, so I *think* I have mounted and decrypted my 1tb desktop ssd on my laptop... i say "think" because I dont see anything in the Templates dir where i thought I mounted it?
This is what lsblk gives me in the appvm where I ran "sudo cryptsetup luksOpen /dev/xvdj2 Templates"

xvdj 202:144 1 931.5G 0 disk
├─xvdj1 202:145 1 1G 0 part
└─xvdj2 202:146 1 930.5G 0 part
   └─Templates 253:0 0 930.5G 0 crypt

When i ls ~/Templates it shows nothing. I guess part of my problem is that LVMs make no sense to me, or more accurately confuse me so the accessing LVM logical volumes is where my understanding decreases precipitously - I thought I was using an AppVM but LVM does not seem to be automatically discoering my LVM config?

xvdj 202:144 1 931.5G 0 disk
├─xvdj1 202:145 1 1G 0 part
└─xvdj2 202:146 1 930.5G 0 part
└─Templates 253:0 0 930.5G 0 crypt

When i ls ~/Templates it shows nothing.

You have successfully decrypted the partition, but not mounted to
"~/Templates".

I guess part of my problem is that LVMs make no sense to me, or more
accurately confuse me so the accessing LVM logical volumes is where my
understanding decreases precipitously - I thought I was using an AppVM
but LVM does not seem to be automatically discoering my LVM config?

The commands you are looking for are `lvscan` and `vgscan`, which should
populate the LVM disks in your `lsblk` output above.

For the private volumes, you should be able to then directly mount them
with `mount /dev/qubes_dom0/vm-<vm name>-private /<location to mount

`. So if you want to mount a VM called "vault" to "~/Templates" it

would be `sudo mount /dev/qubes_dom0/vm-vault-private ~/Templates`. At
this point, your files from just the VM "vault" are available in
"~/Templates".

First, thanks to Jarrah!
I inadvertantly booted my computer with my defucnt instalation plugged in and it booted my desktop drive on my laptop... go figure, but regardless I was now able to use Jarrah's response to mount and copy over most of the appvms (actually just mounted, tar'd up the entire thing, and saved to trusted ext drive). Thanks Jarrah!

Caveat though, two actually, a few of the appvms gave errors, most of them were not hugely important appvms but the second issue (kinda) is about the possbility of copying the whole appvm, more specifically I have some vpn proxy vms which (for me) wasnt easy to setup so I was hoping to copy the whole appvm over to the new installation... I have tar'd the entire contents/configs of each of those vpn proxy vms but wasnt sure if that would be sufficient?

First, thanks to Jarrah!
I inadvertantly booted my computer with my defucnt instalation plugged
in and it booted my desktop drive on my laptop... go figure, but
regardless I was now able to use Jarrah's response to mount and copy
over most of the appvms (actually just mounted, tar'd up the entire
thing, and saved to trusted ext drive). Thanks Jarrah!

Nice work. Glad it worked out for you.

Caveat though, two actually, a few of the appvms gave errors, most of
them were not hugely important appvms but the second issue (kinda) is
about the possbility of copying the whole appvm, more specifically I
have some vpn proxy vms which (for me) wasnt easy to setup so I was
hoping to copy the whole appvm over to the new installation... I have
tar'd the entire contents/configs of each of those vpn proxy vms but
wasnt sure if that would be sufficient?

The /rw/config directory (just /config in the private image you copied)
should be enough, depending on how you configured it. You should be able
to make a new VM, overwrite its files with these and reboot. Your VPN
should "just come up".

Thanks, unfortunately though for teh VPNs its not working, in that i go to something like ifconfig.co and it tells me i am ... well where I actually am. Is there a way to diagnose this? Or maybe its time to use the users contribution repo (or whatever it was called) as i noticed it had a package to setup a vpn, though it was not clear to me if it was taskett's version that had a kill swtich?