[Help šŸ˜­] Broken system because of STUPID zypper rm libxcb1... And all snapshots are also broken!

I followed the STUPIDEST advice EVER and ran `sudo zypper rm libxcb1" and it went halfway through before I realized it was litterally uninstalling everything on my system :sob::sob::sob:

And, my snapshot are all also brokenā€¦??? Dolphin, all browsers and pretty much one thing out of two is gone, I can no longer even browse my files nor the webā€¦

But whatā€™s the use of snapshots if later snapshots can break earlier snapshots???

Please if someone has any idea at all how to revert/fix thisā€¦ Iā€™m crying blood right now :sob::sob::sob:

System Recovery and Snapshot Management with Snapper | Reference | openSUSE Leap 15.0

So basically the first warning implies that my root partition has been corrupted, and so all my snapshots with it?

Please tell me, so at least I know I have to start from scratch right nowā€¦

Inventive users can break anything :crazy_face:

I have no idea what you are talking about.


This is what Iā€™m talking about

I most certainly can. I stopped counting.

We have no idea how you installed your system, whether you accepted the defaults during installation or not.

I did. I pretty much copied the advertised partitioning. You are definitly understanding this message differently than me. Please explain what it means both basically and in my specific situation. You can ask (nicely please) for any clarification, Iā€™m no expert I donā€™t know what info you need me to give you.

Please everyone, hasnā€™t anyone managed to break earlier snapshots at some point? Experience about this would be really helpfulā€¦

Then why do not you simply try to follow the guide - reboot, select read-only snapshot to boot into and perform snapper rollback?

And ā€œwhereā€ did you get that info from?

zypper presents you with what it will do BEFORE executing itā€¦ which is why you have to answer yes no (etc).

When ā€œcleaning upā€ using zypper, I always use ā€œā€“dry-runā€ to see what the results will be, without committing ā€¦ a suggestion for future use :+1:

For example, did this recently, cleaning up excessive python versions:

zypper rm --dry-run python38

For fun, I ran your command as

zypper rm --dry-run  libxcb1

HOLY SMOKE !!:

The following 805 packages are going to be REMOVED:
... blah blah ...
.
805 packages to remove.
After the operation, 3.6 GiB will be freed.
Continue? [y/n/v/...? shows all options] (y): n

No !

Hope your rollback works ā€¦ :+1:

Well, by default zypper will always ask you for confirmation, so this is not really necessary. Unless your keyboard tends to duplicate ENTER ā€¦

1 Like

What information do you have that indicates that your snapshots are broken?

With a default configuration, that shouldnā€™t happen. What is the output of snapper list on the broken system, and what snapshot in the list did you attempt to restore to?

Because, as I said, yes thatā€™s exactly what I did. It turned out that every snapshot (no matter from how long ago) was corrupted. Thatā€™s what I tried to explain.

Save your time, though, I managed to restore almost everything with a combination of zypper -t pattern minimal/kde/kde_plasma and history |grep zypper/snap/flatpak > reinstall_script.sh. It turned out it was mostly basic packages from the KDE patterns that had been deleted, most zypper commands from history returned ā€œnothing to doā€. I had to recreate a few systemctl services and the like though.

Thanks for your time.

1 Like

What Iā€™m trying to understand is how you determined it was corrupted.

I actually did what you did in a virtual machine to test - Iā€™d never actually done a recovery before, so the test seemed like something useful to try anyways.

Iā€™m running GNOME in my VM rather than KDE (I have VMs installed for a number of distros) - it sounds like what you did was where I would have gone next - getting the patterns for the installation and reinstalling based on that after rolling back to the best possible snapshot.

From a snapshot recovery perspective, even if some things were missing (which they shouldnā€™t be - snapshots are insulated from each other, but not from tampering by the root user as I understand it); that sounds like a bug and something that should be reported through bugzilla for investigation.

One of the things that I ran into in my test is that the zypper rm process caused X to die, which halted the removal - I think I had 616 packages total to be removed, and it only got about 480 of them - so a reinstall of at least the patterns should recover most of what was deleted - excepting anything installed outside of the installation process - but it sounds like youā€™ve managed to get most of the way recovered, which is great.

1 Like

This warning is not saying that anything has been corrupted - just that if you changed the btrfs subvolume configuration for the root partition (which, if you went with defaults and didnā€™t change it, you should have been able to roll back the configuration).

What this means is that unless you made changes to the subvolume layout during installation, rollback isnā€™t supported (and it may not work as designed).

In the first place, why where you trying to remove that package? Where you trying to follow a procedure for development? Most of that stuff is outdated and you find people breaking their systems because of outdated documentation.

Tip: Clone your os to an external drive next time to babyproof your problems in case anything goes wrong :wink:

Really impressive! You may always specify --dry-run and rethink.

erlangen:~ # zypper --non-interactive remove --dry-run libxcb1
Reading installed packages...
Resolving package dependencies...

The following 1148 packages are going to be REMOVED:
  GraphicsMagick ImageMagick Mesa
 ...
 
The following 6 patterns are going to be REMOVED:
  games kde kde_plasma kde_yast x11 x11_enhanced

1148 packages to remove.
After the operation, 4.6 GiB will be freed.
Continue? [y/n/v/...? shows all options] (y): y
erlangen:~ # 

1 Like

Yes Iā€™m becoming more and more aware of thatā€¦ I was trying to solve errors I describe in this post (you guessed it, a display problem involving xcb).

But it seems to me that the ā€œgood all platformsā€ ā€” the Stack-Everthing ā€” are less and less responsiveā€¦ Thatā€™s too bad it was usually quality advice :confused:

@karlmistelberger obviously. I had to make that mistake once though, for it to stick, I guess.

@aggie

From Unix Stack Exchange, probably an old postā€¦ No warning whatsoever on the potential danger of the command :confused:

Yes I do think Iā€™ll think of that next time! I did manage to restore most things, but not thanks to a rollback, see my reply to @arvidjaar above for how I did :slightly_smiling_face:

1 Like