You are not logged in.

#1 2013-02-05 12:56:09

Jamess
Member
Registered: 2010-07-09
Posts: 17

Accidentally deleted /lib directory - problems with acpid

I ran a system upgrade the other day and had to move some files to the home folder (conflict: tcl/tk files exist in system but not owned by anyone) to upgrade tcl/tk. After installing the new Tcl/tk I deleted the files in the home directory but also stupidly deleted the /lib directory accidentally with

sudo rm -rf /lib

yikes

I booted an archlinux-2013.01.iso live cd and copied the files from /usr/lib/ to /mnt/sda5/usr/lib which enabled me to boot the machine. Then I ran the script found here:

https://bbs.archlinux.org/viewtopic.php?id=34832

#! /bin/sh

for pkg in $(pacman -Q | cut -d' ' -f1); do
    pacman -S --noconfirm $pkg
done

The system is back up, although I can't use acpid anymore. The log says:

Feb  5 09:51:44 instrument acpid: can't open socket /var/run/acpid.socket: Permission denied
Feb  5 09:51:46 instrument acpid: can't open socket /var/run/acpid.socket: Permission denied
Feb  5 09:57:04 instrument acpid: can't open socket /var/run/acpid.socket: Permission denied
Feb  5 12:53:12 instrument acpid: can't open socket /var/run/acpid.socket: Address already in use
Feb  5 12:53:13 instrument acpid: can't open socket /var/run/acpid.socket: Address already in use
Feb  5 12:53:14 instrument acpid: can't open socket /var/run/acpid.socket: Address already in use

can anyone help with this?

many thanks

James

Offline

#2 2013-02-05 14:09:05

Kilz
Member
Registered: 2008-03-01
Posts: 140

Re: Accidentally deleted /lib directory - problems with acpid

/lib is a symlink to /usr/lib, did you replace the symlink? the command would be

ln -s /usr/lib /lib


I trust Microsoft about as far as I can comfortably spit a dead rat.
Cinnamon is a wonderful desktop
"Faith is the substance of things hoped for, the evidence of things not seen."

Offline

#3 2013-02-05 15:16:00

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Accidentally deleted /lib directory - problems with acpid

Well, use pacman to find out which package is in charge of /lib:

$ pacman -Qo /lib
/lib is owned by apache-ant 1.8.4-1

Well, oops, what went wrong?

After removing apache-ant…

$ pacman -Qo /lib
/lib is owned by filesystem 2013.01-3

So reinstalling that package might be the clean way.

Offline

#4 2013-02-08 15:22:37

Jamess
Member
Registered: 2010-07-09
Posts: 17

Re: Accidentally deleted /lib directory - problems with acpid

$ pacman -Qo /lib
/lib is owned by filesystem 2013.01-3

So reinstalling that package might be the clean way.

Thanks for the replies.

So I tried removing filesystem with

pacman -Rdd filesystem

and then I couldn't reinstall it or reboot! The system is broken again.
I tried the same steps as before but now chroot gives me:

chroot: failed to run command /bin/zsh: No such file or directory

and

chroot . /bin/bash

results in:

[I have no name!@archiso ~]#

Now it's even worse than before. How can I rescue it from here?

Offline

#5 2013-02-08 15:35:10

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: Accidentally deleted /lib directory - problems with acpid

See pacman manpage for root dir.

Last edited by illusionist (2013-02-08 15:48:58)


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

Board footer

Powered by FluxBB