You are not logged in.

#1 2025-03-09 18:17:23

Restein
Member
Registered: 2025-03-09
Posts: 2

[SOLVED] Upgrade fail with lost kernel, library files etc.

Did a 207 package upgrade by:

# pacman -Syu

including kernel, various drivers etc. and system went into a complete freeze during 9/28 post hooks.

( 1/28) Creating system user accounts...
( 2/28) Updating journal message catalog...
( 3/28) Reloading system manager configuration...
( 4/28) Reloading user manager configuration...
( 5/28) Updating udev hardware database...
( 6/28) Restarting marked services...
( 7/28) Applying kernel sysctl settings...
( 8/28) Creating temporary files...
( 9/28) Reloading device manager configuration... FREEZE

After a hard reboot the system is without boot files e.g. vmlinuz, initramfs variants. Only file that survived was intel-ucode.img. LTS, current and their fallback files are gone.

Booted the machine up on a liveiso/USB, mounted the system partition + EFI and did a arch-chroot.

- mkinitcpio fails as there is no files in /etc/mkinitcpio.{d,condf.d}

- pacman -S linux / linux-lts fails with "(conflicting files)" under /usr/lib/modules/6.13.5-arch-1/. A find -type f -size +0 under said directories reveals no files. I.e. all files are empty.

- pacman -S [all the 207 packages] fails with "existing files" all over (close to 80,000) where about 70,000 has size of zero.

- pacman -S some_package not in "existing files" gives ldconfig error as various /usr/lib files are empty.

- pacman -Qkk gives 44 errors as of unrecognized file format, mtree files with zero size e.g. /var/lib/pacman/local/vulcan-tools-nnn/mtree, - and of course a lot of warnings about checksum, size etc. mismatches beyond the 44.

Question is how to tackle this. Is

pacman -S --overwrite XXX package

the way to go? One by one; and in that case what is the cons for using asterisk as glob?

Initial failed upgrade log:

https://0x0.st/8uFy.txt

Last edited by Restein (2025-03-09 22:58:03)

Offline

#2 2025-03-09 21:20:06

seth
Member
Registered: 2012-09-03
Posts: 62,277

Re: [SOLVED] Upgrade fail with lost kernel, library files etc.

Boot the iso, mount (don't forget the boot partition), arch-chroot and re-install the broken packages in two passed, 1st w/ "--dbonly", 2nd w/o
The first passs will sanitize the databases and prevent all those file collisions simply stemming from there (you'll still get errors because of broken libs etc - ignore them here)
The second pass will then properly re-install pacakges and update/fix the files on-disk.

Stay away from the overwrite parameter as much as possible.

Offline

#3 2025-03-09 22:40:39

Restein
Member
Registered: 2025-03-09
Posts: 2

Re: [SOLVED] Upgrade fail with lost kernel, library files etc.

seth wrote:

[...] re-install the broken packages in two passed, 1st w/ "--dbonly", 2nd w/o

Superb. That worked out good and was clearly the right way to go.

Boot logs looks good (from a quick scan) and a new upgrade after boot also worked without issues.

Offline

Board footer

Powered by FluxBB