One month ago, I posted a solution to get glibc-2.16 work on our arch linux box.
After come back from holidays, I’ve seen another annoying update on Arch. Oh, I know they are doing it right by simplifying the structure under /usr, but all of us who are living that transition are experimenting a big pain in the ass. I must say that I’ve just installed the latest version on a old laptop and all works as a charm, so If you feel that your computer needs a reinstallation, that could be the moment. Because the solution for this problem will leave some dirty on your root folder that Arch’s developers are trying to avoid (we will leave a soft link /lib pointing to /usr/lib) and we will continue using GRUB instead GRUB2… without saying that in addition, this will be a very dirty trick that you should use if, like me, have you read and tried every solution people says on the forum.
For all the the people like me who have a lot of information and tons of software, windows games working through tricky wine configurations, etc, I’m gonna put my dirty solution. Use it at your own risk, it won’t break anything at the moment, but I cannot assure that at the followings updates, something can go wrong because of that. So don’t blame me if something breaks your system, you should first read all information on official sources or reinstall if you are unsure to do this.
Well, after advising you for doing ugly and dirty things on your linux, and after you have readed and tried everything Arch docu and forums says. Let’s break our system and restore it. So first of all, make sure you have a USB/CD with a live enviroment 😉
First of all, we will do the contrary said on documentation.
# pacman --force glibc
This will break the system, so once done, press power off button until PC goes powered off. Then turn it on with the Live CD/USB and boot from it.
After booted and configured our keyboard with
km (arch 2011 live CD) or
loadkeys (arch 2012 live CD), we will try to chroot the damaged enviroment (it won’t work)
# fdisk -l
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/sdb1 63 4000184 2000061 82 Linux swap / Solaris
/dev/sdb2 4000185 507991364 251995590 83 Linux
As you can see my root and boot partition are the same (I love simplicity), /dev/sdb2, so:
# mount /dev/sda2 /mnt
# mount --bind /proc /mnt/proc
# mount --bind /dev /mnt/dev
# mount --bind /sys /mnt/sys
# chroot /mnt
As said before, it won’t worked. We just broke the system prior to force shutdown some while ago. In order to get chrooted, we will do:
# cp /mnt/var/cache/pacman/pkg/glibc-2.16.0-1.tar.xz /mnt
# cd /mnt
# tar -Jxvf glibc-2.16.0-1.tar.xz
Thi will extract a bunch of files, but now we can chroot the damaged environment
# cd ..
# chroot /mnt
Yuhooo! Now, we will update glibc. In my case, as I did a lot of tests, the system said to me that it was already installed (perhaps the –force before crash the system??) but it will reinstall fine.
# pacman -S glibc
# /usr/lib/ld-2.16.so /bin/rm -rf /lib
# /usr/lib/ld-2.16.so /bin/ln -s usr/lib /lib
And reinstall once again (just in case) the damned glibc.
# pacman -S glibc
# umount /mnt/sys;umount /mnt/dev; umount /mnt/proc;
The system should reboot fine… if not, so bad, fortunately you have a LiveCD and you can rescue the needed information and reinstall the system from scratch… or continue trying, of course. But this is unlikely. You should have now a fully working Arch linux system!
Finally, if you are a non-english speaker like me, you should regenerate your locale. If after executing locale -a you see this:
# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
Then, edit /etc/locale.gen and uncomment your language and regenerate locales with
Well, I hope it helps and no Arch developer see that post 😛