You are not logged in.

#1 2013-11-05 02:46:26

rpt
Member
Registered: 2013-07-31
Posts: 14

Broken system after interrupted pacman -Syu

I was in the process of executing pacman -Syu after several months of neglecting to do so, so it was a large installation. Unfortunately, during the installation I lost power, and upon rebooting I got a kernel panic due to something wrong with libpam.so.

I booted from USB and attempted to continue the installation (by running pacman -Syu -r /mnt), but it refused to install over existing files: so I ran with the deadly --force option. Since then, I have been able to boot; but the login prompt immediately declares 'Login incorrect' when I enter any username. Additionally, from USB boot, we have the following:

useradd: PAM: Module is unknown

and

passwd: Module is unknown

I investigated a number of similar cases via Google, but nothing has worked. I checked my PAM configuration files in pam.d, and made an alteration (omitting an optional session module, whose line was prefixed by a hyphen in the config), at which point an updated error message was available:

passwd: Authentication token manipulation error

Nonetheless, none of the user utilities work, and login still behaves the same way. All of the libraries referenced in the pam.d configuration for login are present in /lib/security and /usr/lib/security.

Remarks:

- Typing 'login' while chroot'ed 'restarts' the USB shell, clearing the screen and bringing me back to ~ in the root filesystem, as if some sort of failure had required the shell to restart itself.
- The user metadata files (passwd, group, shadow, gshadow) are all intact, and have been reinstalled several times.
- pam and pam-base have both been reinstalled, with and without --force.
- The login and agetty binaries are intact, as they are the same as their counterparts on the USB system.

I would just backup /home and reinstall the OS, but backing up in my circumstances currently would be very difficult, if not prohibitively so. I would also like to get to the bottom of this issue.

Thanks

Last edited by rpt (2013-11-05 02:49:25)

Offline

#2 2013-11-05 02:56:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,642

Re: Broken system after interrupted pacman -Syu

You probably should try a chroot environment and try running pacman -Syu again from within the chroot.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

#3 2013-11-05 03:01:40

rpt
Member
Registered: 2013-07-31
Posts: 14

Re: Broken system after interrupted pacman -Syu

The pacman -Syu installation in fact finished (with --force) once I first got into the USB system -- running it will yield "nothing to do" or similar. (Whether in the chroot environment or not)

However, it seems that there are still damaged files. One thing that I forgot to mention in my original post is that, upon any particular successful installation, pacman will output a number of lines like the following:

ldconfig: some-library.so is empty: not checking

(This is from memory, so I don't remember exactly).

EDIT:

Also note that the useradd and passwd commands I ran were within the chroot environment.

Thank you for the response.

Last edited by rpt (2013-11-05 03:02:27)

Offline

#4 2013-11-05 03:03:13

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,173

Re: Broken system after interrupted pacman -Syu

Given that you used force and given that you had not updated for several months - either of which alone would be enough to break things - I honestly think your best option is likely to be a reinstall.

If home is a separate partition, you don't need to wipe /home - just don't format it during installation. (Best not to even mount it, in fact.)

I assume you realise that data you don't backup is data you don't mind losing, so I assume you cannot be that worried about the contents of /home in any case. However, reinstalling Arch ought not to touch anything on /home if you have it on a separate partition.

Otherwise, you need to start reading the news and figuring out what got half installed etc. But I really don't suggest doing this. --force is, as you say, deadly. And Arch is meant to be regularly updated. If you can't update every week or so, you might consider an alternative distro while you are reinstalling since Arch just doesn't deal well with being neglected.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2013-11-05 03:05:20

rpt
Member
Registered: 2013-07-31
Posts: 14

Re: Broken system after interrupted pacman -Syu

OK, I will plan to reinstall then. To be completely honest, I am a new user and it had completely slipped my mind that pacman -Syu was something that was to be done often. Of course, from now on I will be sure to pay closer attention to best practices.

Offline

#6 2013-11-05 03:11:01

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,173

Re: Broken system after interrupted pacman -Syu

I think that's likely to be fastest and most efficient, to be honest. And it isn't as though you need to figure out the problem to learn from this experience (which is often a reason not to reinstall even if it is quicker) since you now know the key lessons - keep Arch up to date and don't use --force. The other key thing is to read pacman's output. If you update regularly, this is fairly easy and it tells you when you need to do stuff to keep your system healthy. If the updates accumulate, just parsing the output is overwhelming - even if the update is otherwise successful, it is just too easy to miss the messages telling you vital information.

Good luck wink.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB