You are not logged in.

#1 2012-07-15 16:01:03

kiLLroy_ow
Member
From: ger
Registered: 2008-08-20
Posts: 10

[SOLVED] glibc upgrade - what to do after rm -rf /lib/* without reboot

Hello everyone,

edit: please read this whole post... better mention it here, too -> I cannot reboot. thanks smile

I messed up following this guide while doing the glibc (/lib) upgrade on my desktop. I ran into "Issue 2" and it said

[...]
If no other files are in /lib/modules, you can safely remove that directory.

Sadly I did

rm -rf /lib/*

instead of

rm -rf /lib/modules*

That means all the .so files in /lib (owned by glibc) are gone now. That means - besides other problems - I cannot use any binaries like "cp" anymore. I still have a root shell (bash), a nautilus, a Gedit and a Firefox open but cannot call ANY other binaries. E.g.:

[root@firefly ~]# pacman -Su
-bash: /usr/bin/pacman: No such file or directory

With Firefox I managed to get all the deleted libraries into my home folder (from my Laptop running Arch64, too). So there are now under "/home/killroy/dloads/lib" rather than "/lib". I cannot reboot this computer now so I have to get those files into /lib so that I can use my binaries again. I still have "echo" because it is a bash-builtin. Is it possible to somehow emulate / workaround a

cp /home/killroy/dloads/lib/* /lib/

Or is it possible to tell my still-running root shell that the library path where those glibc-owned libraries reside are not in /lib but in /home/killroy/dloads/lib now?

Any help would be appreciated, really smile

Last edited by kiLLroy_ow (2012-07-17 08:45:33)


the 'arch' of truth

Offline

#2 2012-07-15 16:03:31

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: [SOLVED] glibc upgrade - what to do after rm -rf /lib/* without reboot

How about doing a search? Check the thread right under yours.

Offline

#3 2012-07-15 16:04:34

kiLLroy_ow
Member
From: ger
Registered: 2008-08-20
Posts: 10

Re: [SOLVED] glibc upgrade - what to do after rm -rf /lib/* without reboot

stlarch wrote:

How about doing a search? Check the thread right under yours.

Yes and no. The problem is that I cannot reboot. The problem is completely different because of that (but I should have mentioned it in the topic-subject... sorry).

If I could shutdown / reboot this PC now I would not have posted anything because I could solve this problem alone. Sadly I do not know how to answer the two questions (see above). I searched for it quite a long time but I did not find anything usefull sad

Last edited by kiLLroy_ow (2012-07-15 16:06:34)


the 'arch' of truth

Offline

#4 2012-07-15 16:05:46

RaisedFist
Member
From: Romania
Registered: 2007-01-30
Posts: 556
Website

Re: [SOLVED] glibc upgrade - what to do after rm -rf /lib/* without reboot

there was a topic on this somewhere, but I don't know exactly the link.... but here's what it said (it worked for me)

boot your computer and edit the kernel line in GRUB to contain this

init=/usr/lib/ld-2.16.so /bin/sh

you'll be dropped in a root shell at this moment, then do this:

/usr/lib/ld-2.16.so /bin/mount -o remount,rw /
/usr/lib/ld-2.16.so /bin/rmdir /lib
/usr/lib/ld-2.16.so /bin/ln -s usr/lib /lib

Reboot and reinstall glibc, then update everything.

pacman -S glibc
pacman -Syu

Note: you might not need to run the 'rmdir' line as you already said you deleted /lib

Offline

#5 2012-07-15 16:17:39

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: [SOLVED] glibc upgrade - what to do after rm -rf /lib/* without reboot

kiLLroy_ow wrote:
stlarch wrote:

How about doing a search? Check the thread right under yours.

Yes and no. The problem is that I cannot reboot. The problem is completely different because of that (but I should have mentioned it in the topic-subject... sorry).

If I could shutdown / reboot this PC now I would not have posted anything because I could solve this problem alone. Sadly I do not know how to answer the two questions (see above). I searched for it quite a long time but I did not find anything usefull sad

Can you still set the executable bit for files using nautilus?
Then download busybox: http://www.busybox.net/downloads/binaries/latest/
Set it executable and use the root shell to spawn an instance of the busybox shell /path/to/busybox sh
in the busybox you have now all requiered commands (wget, cp, chmod, tar, xz, ...)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2012-07-15 16:39:15

kiLLroy_ow
Member
From: ger
Registered: 2008-08-20
Posts: 10

Re: [SOLVED] glibc upgrade - what to do after rm -rf /lib/* without reboot

progandy wrote:

Can you still set the executable bit for files using nautilus?
Then download busybox: http://www.busybox.net/downloads/binaries/latest/
Set it executable and use the root shell to spawn an instance of the busybox shell /path/to/busybox sh
in the busybox you have now all requiered commands (wget, cp, chmod, tar, xz, ...)

OMG thank you, really! smile

Okay that did the trick:

With the busybox binary - after making it excecutable with nautilus - I could use its tar command to untar the glibc package and its cp command to copy the needed .so files to /lib using something like:

root # /path/to/busybox tar xf /path/to/glibc.tar
root # /path/to/busybox cp ./lib/* /lib/

Again, thank you.

This topic could now be closed (and maybe kept for reference for people who need to fix this without rebooting the system) I guess.


the 'arch' of truth

Offline

#7 2012-07-16 01:46:48

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: [SOLVED] glibc upgrade - what to do after rm -rf /lib/* without reboot

Mark it [solved] please.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB