Can't arch-chroot in order to recover broken system

@otherbarry

Perhaps this is not the exact wording but it was during “updating module dependency” (or some such) that the freezing happened.

Yes I can. No issues navigating the filesystem.

[liveuser@eos-2021.11.30 ~]$ sudo btrfs check /dev/nvme0n1p2 
Opening filesystem to check...
Checking filesystem on /dev/nvme0n1p2
UUID: 0d19c35e-8b2b-4844-a2e6-359ae17575e1
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups
found 118324834304 bytes used, no error found
total csum bytes: 100922200
total tree bytes: 1930952704
total fs tree bytes: 1714126848
total extent tree bytes: 90931200
btree space waste bytes: 304329902
file data blocks allocated: 127281573888
 referenced 132049518592

From the live iso and without mounting @home this time, still no arch-chroot luck.
Same issue as before.

If I am looking at a reinstall using EnOS iso, will Calamares respect the other subvolumes existing on /dev/nvme0n1p2? That is, they won’t get overwritten?

Then perhaps I could reuse my current @home post-install via /etc/fstab.

Or as @otherbarry has suggested do a re-install “The Arch Way” ?

My suggestion was a last resort, a hail mary to pacstrap the base files into the root volume, assuming the file system is not corrupt.

I’ve seen this error before, but only with mistakes I made when installing Arch manually. This is a corrupted system in an inconsistent state, so probably won’t help, but before it is pronounced officially dead and re-installed I thought what have you got to lose?

Next time maybe have an extra backup mechanism to snapshots, which are not really backups anyway. Something to think about.

I had a similar issue about a month ago that required restore from a backup image, an update scrambled my KDE config. Plasmashell spewed out a million errors, so instead of trying to sort through the mess and manually fix it I restored last backup, and next time the update completed successfully.

1 Like

Yes, though I think it will complain about existing files… (I can’t remember pacstrap’ping into a non-empty location before…).

1 Like

Sure, when I read “Bailing out, you are on your own. Good luck.” on that black screen, I kin of realized that I am in for a “hail mary” solution :sweat_smile:

You are right. I have been quite inconsistent about my backup strategy. My data is safely (I hope) backed up to several locations but it was unfortunate to have gotten myself rid of the system snapshot on this particular system. What pains me is the fact that was running so nicely and tweaked to my liking :frowning_face:

A lesson (another one) learnt the hard way (again).

@pebcak
What did you do? :thinking:

I am not really sure what route to take. By the looks of things, I have to re-install the system.

I don’t know if I use EnOS’ iso, Calamares will respect other subvolumes on the same partition and they won’t get overwritten.

The other option would be to make a new subvolume and install the system “The Arch Way”.

In either case, I will be reusing my @home and perhaps I should backaup /etc as well to restore my tweaks post-install.

At any rate, I won’t be able to do anything for a couple of days. I am already away from that machine and won’t be back before Sunday evening.

In the meantime, if you guys have other suggestion for possible recovery or re-install I would really appreciate if you shared it here.

Your subvolume layout might be broken. What do

btrfs subvolume get-default /mnt 
btrfs subvolume list -a /mnt

return?

1 Like

Thanks @mrvictory for your post!

I am afraid I won’t be able to post the output of the commands before Sunday evening when I’ll be back home and can start working on the broken system again.

I haven’t tested it but someone else reported that Calamares won’t touch your existing subvolumes as long as they don’t clash with the existing names. So if you choose not to format your partition and rename any subvolumes that would clash it should work if that person was correct.

1 Like

That sounds quite reasonable. After all, Calamares should just make new subvolumes on the partition, mount them and install the system onto them. As you mention, if not reformatting the partiton, it should be alright. Not sure yet if I should take my chances with Calamares or just go the arch way route.

Now that I think about it, I recently made changes to that part of the code and I am pretty sure that is exactly what it does.

It loops through the subvols calling btrfs create

1 Like

That sounds great!

So I could pretty much rename my current @home, make an EnOS install, and mount my old home back via /etc/fstab?