You are not logged in.

#1 2021-02-21 06:19:50

sylvite
Member
Registered: 2014-03-16
Posts: 16

[SOLVED] Borked system when updating while mounted readonly

I recently did a `pacman -Syu` on a system and didn't notice until too late that / was mounted readonly.
(That happened because of numerous btrfs issues that I believe I've since resolved after the fact with `btrfs scrub`.)

I've booted from a live iso usb. Mounted at /mnt/arch@.
I found that many, many binaries and libraries are 0-byte files on / :

http://ix.io/2Qa8

I've gotten a lot of help from this post, and used a lot of info there to narrow down the problem to this point.

Not all binaries and libraries were affected-- Those that weren't do still seem to work.
I can run /mnt/arch@/usr/bin/{bash,cat,zsh} fine from the live iso.

arch-chroot doesn't work because /mnt/arch@/usr/bin/unshare is borked.

There's also several 0-byte files in etc, usr/share,...

I'm looking for advice on how to proceed. pacman-static? manual unpacking?
Re-installing is looking like the best option, but I wanted input before going down that path.

Last edited by sylvite (2021-02-21 23:11:02)

Offline

#2 2021-02-21 07:13:52

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Borked system when updating while mounted readonly

Can pacman still detect what packages are installed? You can then just reinstall all of your packages from the outside with the live iso environment. Pacman has two arguments "--root" and "--sysroot" for this and there's also the "pacstrap" command.

I can't remember exactly how this is done (I had to do it once after a terrible mistake). It should be something like this, from within the live iso environment if you mount your root to /mnt:

pacman --root /mnt -Qnq | pacman --root /mnt -S -

The documentation says "--sysroot" uses chroot so I guess that argument won't work because of your broken files, that's why I'm thinking you need "--root".

Offline

#3 2021-02-21 14:23:38

sylvite
Member
Registered: 2014-03-16
Posts: 16

Re: [SOLVED] Borked system when updating while mounted readonly

Thanks @Ropid. I started down this path, and realized...
Stupid me-- I'm using btrfs, with snapper scheduled snapshots of / !
I've never had any real need for them until now. I just need to copy/restore the last clean snapshot. I'll mark this post as solved once I get past this step.

Last edited by sylvite (2021-02-21 14:28:23)

Offline

#4 2021-02-21 23:10:21

sylvite
Member
Registered: 2014-03-16
Posts: 16

Re: [SOLVED] Borked system when updating while mounted readonly

Offline

Board footer

Powered by FluxBB