You are not logged in.

#26 2012-07-09 06:28:46

pintergreg
Member
Registered: 2011-04-16
Posts: 8

Re: Can not upgrade glibc

I've got similar problems, but finally i managed to solve it.
Pacman said "I don't overwrite a directory with a file /lib64" (I don't know what is the proper english message), so glibc can't have been updated.

Reading this topic and the buglink above gave me an idea, so I run pacman -Qo /lib64/*.

The issue was caused bacause I had a /lib64 dir with a manually created simlink in it, to be able to run a program (packettracer) on x86_64 with multilib.
I removed it and updated the glibc package. After that I saw that /lib64 is a simlink to /lib. I put back my simlink and everything seems to be working.

I don't use any testing repo, but I thought my experience would be useful.

Last edited by pintergreg (2012-07-09 06:29:29)


"If you immediately know the candlelight is fire, the meal was cooked a long time ago." /Oma Desala/
"You never get a second chance to make a first impression." /Gil Grissom/

Offline

#27 2012-07-09 13:10:58

scottro
Member
From: NYC
Registered: 2002-10-11
Posts: 466
Website

Re: Can not upgrade glibc

On a second system, with testing enabled, that I update say, every 3-4 days, (usually), I was able to upgrade with no issues.   That is, I didn't have any notice about /lib already there.

It was only on the fresh install where I had an issue.

Offline

#28 2012-07-09 14:48:41

sbillaudelle
Member
Registered: 2011-10-03
Posts: 7

Re: Can not upgrade glibc

For all of you suffering from a borked system: You don't need a LiveCD to fix your filesystem!

Just tell your kernel to load some fake/non-existing init system (I used "/usr/bin/bash") and you'll get dropped to a root shell…

1. Boot into GRUB and add "init=fakeinit" "break=postmount" to the line that starts with "kernel"
2. Wait until you get dropped into a root shell
3. Your root partition should be mounted read-only to '/new_root', remount with write permissions
4. Change to '/new_root'

cd new_root

5. Remove 'lib'

rm -Rf lib

6. Create a softlink from 'usr/lib' to 'lib'

ln -s usr/lib lib

7. Reboot

My system booted into some crippled state (without X, KMS, etc.). Just perform an update from cache ('sudo pacman -Su') and reboot one more time.

Please be very careful and only perform these steps if you know what you are doing!

I hope I could help! Greetings,
Sebastian

EDIT: There seems to be a regular option to get into a working shell, thanks falconindy!

Last edited by sbillaudelle (2012-07-09 17:02:41)

Offline

#29 2012-07-09 16:57:10

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Can not upgrade glibc

sbillaudelle wrote:

Just tell your kernel to load some fake/non-existing init system (I used "/usr/bin/bash") and you'll get dropped to a root shell…

The manpage for mkinitcpio documents the break=[premount|postmount] option to pass on the kernel cmdline...

Offline

#30 2012-07-11 18:53:06

drop.of.peace
Member
Registered: 2012-05-06
Posts: 5

Re: Can not upgrade glibc

hey there, another solution is to

1. reboot into one of any archlinux live cd's
2. km (select keyboard layout)
3. mount /dev/** /mnt/ (on my hard disk it was /dev/sda3/)
4. pacman -Syy
5. pacman -Suf glibc -r /mnt
6. reboot and its done.

but beware, on my laptop there were some graphic settings missing with amd catalyst and gnome3 it could be happened trough the broken forced update progress.

Offline

#31 2012-07-11 21:56:13

usagi
Member
Registered: 2011-11-21
Posts: 62

Re: Can not upgrade glibc

Wow, i'm glad i'm not the only one who bricked their arch doing this. Oh well, i'm fully functional, but it took some serious tinkering.

Offline

#32 2012-07-15 00:06:31

praxis22
Member
From: Germany
Registered: 2010-11-12
Posts: 4
Website

Re: Can not upgrade glibc

I successfully bricked mine as well smile

Booted from Ubuntu CD

Mounted partition,
Copied the contents of /lib (modules and sym link of ld.so) to /usr/lib
rm -rf lib
ln -s usr/lib lib

rebooted, works!

From there reinstall glibc and kmod, then force the kernels and nvidia module which still complained.

Cheers, I'll know to read the web page next time it borks with a seemingly stupid error, "of course /lib exists.."  Doh!

Many thanks


Geek, scruff, economics wonk

Offline

#33 2012-07-15 04:05:05

girzel
Member
Registered: 2010-06-27
Posts: 74

Re: Can not upgrade glibc

I'm bricked but I hope not permanently...

Booting normally gives me a kernel panic:

switch_root: failed to execute /sbin/init: No such file or directory

I add a "break=postmount" to the grub boot line, and it drops me into the root shell. I remount new_root as writeable. When I go into /new_root I can see that /lib exists and is a soft link to usr/lib.

usr/lib is full of all the usual stuff, it's got the modules directory, and all the lib* files and whatnot, though I would have no idea if there was anything wrong with them.

Simple saying "exit" bumps me back out and it panics again. Is there some final step that has to be done here to make things permanent? Did I bork things in an earlier stage so badly that what's in lib and usr/lib is already screwed?

Help!

And thanks

Offline

#34 2012-07-15 05:47:31

MrCode
Member
Registered: 2010-02-06
Posts: 373

Re: Can not upgrade glibc

^ I'm having this problem as well, except I did:

rm -r /lib

…in a fit of blind rage trying to fix this problem, rather than doing --force (before reading the news page; woops :x).

Am I totally fscked as well?  Can I recover without having to reinstall the system from scratch?  (It wouldn't be too much of an inconvenience if I did; I have my /home on a separate partition, so all my personal data/configs would be preserved, at least…)

Last edited by MrCode (2012-07-15 05:48:19)

Offline

#35 2012-07-15 05:53:52

girzel
Member
Registered: 2010-06-27
Posts: 74

Re: Can not upgrade glibc

MrCode wrote:

^ I'm having this problem as well, except I did:

rm -r /lib

…in a fit of blind rage trying to fix this problem, rather than doing --force (before reading the news page; woops :x).

Yup, I think I issued the same command at some point, thought possibly it was a fit of panic rather than rage. smile

My secret weapon (I hope) is a /usr/lib dir copied over from another, newly-update Arch system at home. I'm going to see if I can copy that, and if not then it's the installation media for me.

Offline

#36 2012-07-15 06:02:02

MrCode
Member
Registered: 2010-02-06
Posts: 373

Re: Can not upgrade glibc

My secret weapon (I hope) is a /usr/lib dir copied over from another, newly-update Arch system at home. I'm going to see if I can copy that, and if not then it's the installation media for me.

Welp, I think my system pretty much is totally b0rked, then; the only other Arch system I have is a 64-bit lappy, and this is a 32-bit install, so no go. sad

Trying to chroot from the initramfs shell to the one on the root partition just gives me a "No such file or directory" error, and even trying to run bash manually from the initramfs shell gives me a no-such-file error for libreadline, so yeah…b0rked. Completely.  <_<

EDIT: Actually, I may be able to reinstall glibc using pacman's -r option from a LiveCD or something; no need to reinstall the whole system…maybe.

Last edited by MrCode (2012-07-15 06:22:59)

Offline

#37 2012-07-15 06:54:51

girzel
Member
Registered: 2010-06-27
Posts: 74

Re: Can not upgrade glibc

Well I was thrilled and frankly pretty astonished to find that copying that directory from the other machine works. Now I'm in a pre-glibc-update state, and trying to pacman -S glibc gives me a metric ton of "file already exists" errors, but at least I have a bootable system. I do think you'll be able to manage with pacman cache, rather than reinstalling the system - good luck!

Offline

#38 2012-07-15 14:27:10

gartrog
Member
Registered: 2009-04-15
Posts: 7

Re: Can not upgrade glibc

Many many thanks, this literally saved my day !

It was really easy to brick to brick the system with that update, if not reading Arch homepage before -_-


sbillaudelle wrote:

For all of you suffering from a borked system: You don't need a LiveCD to fix your filesystem!

Just tell your kernel to load some fake/non-existing init system (I used "/usr/bin/bash") and you'll get dropped to a root shell…

1. Boot into GRUB and add "init=fakeinit" "break=postmount" to the line that starts with "kernel"
2. Wait until you get dropped into a root shell
3. Your root partition should be mounted read-only to '/new_root', remount with write permissions
4. Change to '/new_root'

cd new_root

5. Remove 'lib'

rm -Rf lib

6. Create a softlink from 'usr/lib' to 'lib'

ln -s usr/lib lib

7. Reboot

My system booted into some crippled state (without X, KMS, etc.). Just perform an update from cache ('sudo pacman -Su') and reboot one more time.

Please be very careful and only perform these steps if you know what you are doing!

I hope I could help! Greetings,
Sebastian

EDIT: There seems to be a regular option to get into a working shell, thanks falconindy!

Offline

#39 2012-07-15 15:40:01

ajaxas
Member
Registered: 2009-02-23
Posts: 65
Website

Re: Can not upgrade glibc

@sbillaudelle
Thank you so much! yikes Your advice was the most useful thing I've read in the web for at least a year!

Offline

#40 2012-07-15 16:37:40

liquibyte
Member
Registered: 2007-11-11
Posts: 91
Website

Re: Can not upgrade glibc

Borked mine as well because the update came before the news item.

Copied everything not owned by glibc to /usr/lib, Rebooted into live distro, mounted /dev/sda2 under /mnt and deleted /lib.. Extracted glibc-2.16.0-2-i686.pkg.tar.xz from /var/cache/pacman/pkg to / and rebooted. I now have a desktop so I then did a pacman -U on the glibc package to make sure the install parts got done correctly.

System is working but I'm sure I'll end up with other issues to be solved at a later date. Seems that updates like this could be handled better other than breaking sysems and posting fixes after the fact. I always look at the news items first and I can tell you it wasn't there when I pushed glibc through. Personally I enjoy the challenge of a borked system as it helps me understand how to fix things in ways that no one else has tried.

Last edited by liquibyte (2012-07-15 16:38:23)

Offline

#41 2012-07-16 16:35:35

splashy
Member
Registered: 2010-08-21
Posts: 128

Re: Can not upgrade glibc

I followed what Spillaudelle said but ended up with a kernel panic: switch_root: failed to exevute /sbin/init: no duch file or directory. My problem was that I rm -rf /lib for glibc..(I kniw stupid) so now with this tutorial I now have the symlink /lib-->usr/lib but I'm not able to boot with a working shell(to use pacman and reinstall glibc). Please could somebody help me. Thanks a lot.


P.S: I'm running 64bits Archlinux so do have I smthing to do woth /lib64?

Offline

#42 2012-07-16 17:19:14

SUK
Member
Registered: 2009-09-28
Posts: 19

Re: Can not upgrade glibc

Hi.
I just followed this: https://wiki.archlinux.org/index.php/De … iki:usrlib

1. I moved /lib/firmware/ to new location (there was pacman-unmanaged files for wifi card (b43))
2. I deleted /lib/modules (there was two folders "xxx-ARCH")
3. find /lib -exec pacman -Qo -- {} + returned only one line saying that "/lib" is not owned by any package
4. so i made pacman -Su --force
then my system broke
5. I booted to "fakeinit" and made ln -s /usr/lib /lib
then my system broke more
6. I created booting flashdisk, booted, mounted "/" and did pacman -S glibc -r /tmp/rootmount

now, my system is in broken state, but no kernel panic (thats better, but not much). It writes this: http://i.nyx.cz/files/00/00/08/17/81752 … AG0023.jpg

Can anybody help me please? Now I really don't know, what to-do... and windows-like reinstall is not what I want now... thank you!

Offline

#43 2012-07-16 17:44:04

splashy
Member
Registered: 2010-08-21
Posts: 128

Re: Can not upgrade glibc

Drop of peace, you're my hero!!!! Thanks a lot! I burn ctkarch livecd(which is excellent, saw a cartoon and then did as you do and everything's now OK! yeah

Offline

#44 2012-07-17 02:25:59

prokrypt
Member
Registered: 2006-04-06
Posts: 6

Re: Can not upgrade glibc

I, too, have done "rm -r /lib" after upgrading everything else except glibc. I read the wiki, but it did not say anything about copying the current glibc files to /usr/lib. DOH!

Here's how I fixed it:

add "break=postmount" to kernel parameters in grub & boot
remount /new_root read-write

cd new_root
ln -s usr/lib lib

cp /new_root/var/cache/pacman/pkg/glibc-2.16.0-2-i686.pkg.tar.xz /tmp
cd /tmp
/new_root/usr/bin/xz -d glibc*
/new_root/bin/tar xf glibc*
cp -r usr sbin /new_root/

reboot

pacman -Sf glibc

Again, I did the "rm -r /lib" booboo AFTER upgrading everything else. I'm not sure if this would have worked if other packages weren't upgraded.

Last edited by prokrypt (2012-07-17 02:30:10)

Offline

#45 2012-07-17 02:40:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can not upgrade glibc

Glad you got it sorted.

Closing this as it is no longer a [Testing] issue. There are sufficient threads in the other boards to provide inspiration...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB