removed qubes-core-dom0 by accident

75 views
Skip to first unread message

sofo...@gmail.com

unread,
Mar 1, 2017, 9:45:51 PM3/1/17
to qubes-users
upgrading from 3.1 to 3.2 broke with several hundred dupe packages. package-cleanup didn't work, so I had to remove dupes by hand one by one.

clicking through many y/N questions, I inadvertently removed libxml dupe, which in turn removed qubes-core-dom0, all templates, and borked my system.

I'm hurting here. Is there any way to restore my Qubes to a working system?

No backups. (of course.)

Any suggestions for system recovery?

Or at least recovering my data?

thanks
so foobard

Bernhard

unread,
Mar 2, 2017, 4:23:58 AM3/2/17
to sofo...@gmail.com, qubes-users
I can only give some limited backup help (from memory, I did it some
moment ago). Use a live linux WITH luks support (tails is great). Boot
it (in tails activate root at startup!), open terminal, enter sudo su -
to make it a root terminal.
0) with lsblk you should see your partitions & sizes. Normally it allows
to guess which ones are the encrypted disks.
The procedure I use is (before retyping any command, read the manpage
top know / verify you do want you want to do).
1) cryptsetup luksOpen /dev/[dev-name] ALIAS
typically cryptsetup luksOpen /dev/sda1 HDD and / or cryptsetup
luksOpen /dev/sdb1 SDD
2) standard installs will use a "volume group". Before mounting you may
need to activate it:
vgchange -a y (a='available', y=yes=activate, n=no=deactivate)
3) mount them: mount /dev/mapper..[ qubes-volume-name ] /somepath
4) mount your recue disc as well. You may want to encrypt your backups :
(a) generate a huge sparse file truncate -s 200G backup.luks
(b) lopsetup -d will give you a free loopback slot, like loop5
for example.
(c) losetup backup.luks /dev/loop5
(d) cryptsetup luksFormat /dev/loop5
(e) cryptsetup luksOpen /dev/loop5 backup
(f) |mkfs.ext2 /dev/mapper/backup
(g) mkdir /backup && mount /dev/mapp/er/backup /backup
|| Now you have /backup that can be written to. Content will be
stored encrypted in your backup.luks file.
|
5) data is in /var/lib/qubes/

But (here someone may expolain it to me at the same time): the
appvms seem to be in files actually,
with strange names, like qubes-0 qubes-1 or something of this type.
I presume they are loop-mounted
by qubes into their respective dirs at startup. If you want to fetch
data selectively, I guess you have
to do the same: lopsetup -d will give you a free loopback slot,
like loop5 for example.
losetup file /dev/loop5 will then generate a "device" /dev/loop5
that points to your file.
Now mount /dev/loop5 /some-other-path allows to mount a filesystm
inside a file. Then you may go to
/some-other-path and grab data.

when done, close your encrypted disks correctly cryptsetup luksClose
ALIAS and shutdown live-linux
samefor backup !

Good luck, Bernhard

sofo...@gmail.com

unread,
Mar 2, 2017, 6:55:37 AM3/2/17
to qubes-users
thanks Bernhard.

Is there a way to reinstall core Qubes packages?

Marek?

sofo...@gmail.com

unread,
Mar 2, 2017, 9:01:43 AM3/2/17
to qubes-users
rebooting in current state gives me splash screen, error FAILED to start Qubes DB

login takes me to usual Qubes desktop, konsole but minus qubes-manager

qvm-* tools are all gone

no internet connection

I can drop to xl console but not sure what to do once I get there

is there a way to manually connect to repos and re-install missing core dom0 packages?

thanks

sofo...@gmail.com

unread,
Mar 2, 2017, 9:13:30 AM3/2/17
to qubes-users
so I tried to run

sudo xl console sys-net

but this returns

sys-net is an invalid domain identifier (rc=-6)

is there some other way of addressing guest VMs in Xen?

Marek Marczykowski-Górecki

unread,
Mar 2, 2017, 2:19:18 PM3/2/17
to sofo...@gmail.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
You can grab it from installation image. You can use this image for
recovery - choose this option in startup menu, then when you get shell,
install the package using rpm --root=/mnt/sysimage -i PATH_TO_PACKAGE.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYuHAvAAoJENuP0xzK19csXrsH/RjKgL5mnsFed4d2aRswzxWd
fuLP58GE105G8qZT7P8HQkbTl0kJyj2fs9mHPi2wvO9wb5+exUBA5YpERvch3JRX
JBfbwF8cE9sJrcrVHB8AT4BJ5oh+CqM/ao1AaZbUpQ5xDKsRlCZ4Z2mE5uS2HBb1
DUf8yaiiY6iGqx+6IY4+0FgA2DqZiiKO6/G3S7dnD9oZ98YUqOoJPHKgNYwuR09H
mp58edlpd+9e58QjZBzbzRCdMIqDoweRz0UJ6Q9Qk8sC5bDizHT2LU0UhinrsJzS
UXAd/Jgjtl/jZLCyRD7K6TL/9tAY7WmdLhPCQ1XQom9owIx1ranZ4O/mTIKaFIg=
=X87k
-----END PGP SIGNATURE-----

sofo...@gmail.com

unread,
Mar 3, 2017, 11:59:32 AM3/3/17
to qubes-users
Thank you, Marek.

Am I better off using the 3.1 or 3.2 iso?

(I've tried direct download of both 3.1 iso and 3.2 iso, and the 3.2 torrent, but I get a BAD signature error for all three. Also the 3.2 iso was signed 2016-09-20? Can that be correct?)

thank you
sf

sofo...@gmail.com

unread,
Mar 3, 2017, 2:09:19 PM3/3/17
to qubes-users
My apologies for the bother, Marek.

Where is PATH_TO_PACKAGE once in a recovery shell?

(finally got a good sig on 4th download of iso)

thanks so much
sf

sofo...@gmail.com

unread,
Mar 3, 2017, 3:29:23 PM3/3/17
to qubes-users
hurray! rpms are in /mnt/install... but how do I deal with dependencies? is there a way to invoke yum or dnf during restore?
Reply all
Reply to author
Forward
0 new messages