Updating Arch Linux From A Core Install

NOTE: This post applied to the 2011.08 Arch Linux release. The current install ISO does not need the following steps, although they may still be useful for people attempting to upgrade an old install.

The move to /lib being a symlink to usr/lib in Arch Linux has been completely smooth… for those that followed the detailed instructions on the wiki. Not so smooth for those who had brilliant plans like deleting /lib and updating to the new glibc really quickly. What linker were you going to use to do that?

Anyway… it is now appears quite difficult to get a fully updated system from a core install. I say appears, because I did it in a couple of minutes. But I admit to actually knowing what I am doing! The simple solution is not to do a core install, which uses the packages that were available at the time of the installer creation. Instead do a net install and download the latest version of all the packages and be fully up to date straight away. Or, if you must do a core install, grab a newer testing install image.

If neither of these are an option, here are the steps required to update:

pacman -Sy
rm -rf /var/run /var/lock && pacman -Sf filesystem
pacman -S tzdata
pacman -U http://pkgbuild.com/~allan/glibc-2.16.0-1-i686.pkg.tar.xz
rm /etc/profile.d/locale.sh
pacman -Su --ignore glibc
pacman -Su

You might need to reboot after filesystem install. Also, change i686 to x86_64 in the pacman -U line if needed… Always say “N” to updating pacman first, and say “Y” to all the replacements.

All of that is given in the various news items about interventions required during updates since the last installer release. The only trick is getting the packages updated in the right order.

This is the price you pay for a rolling release distribution. Arch Linux does not get the benefit of being able to make changes like this at the time of a major release because we have none. We could probably automate some of these things with package update trickery… but it is our policy to not hide these things from the user. Finally, there is work being done on getting a new install image released more frequently so that upgrade paths in the future will always be simple.

53 thoughts on “Updating Arch Linux From A Core Install

  1. Hi, had no problems with the update. 🙂 I deinstalled ld-lsb (dependency from google-earth, which I didn’t use anyway) from AUR though since it was preventing glibc to update properly.

    Btw, when will a new ISO file be released? It has now been a while since the last update.

    • Agree with the last point, a more frequent ISO release would be very useful.
      Arch is rolling apart from ISO releases 🙂

  2. Thanks for all the work (-:
    Arch is great, ignore the idiots and unsensable people out there.

  3. Hahah I am among those with brilliant /lib plans. Silly, uh?
    So I borked it all, and resorted to re(net-)installing from scratch !
    Thanks for the lifebuoy instructions though.
    Next time I’ll be more careful.

  4. I tried this but glibc still fails to update:
    sudo pacman -Su
    :: Starting full system upgrade…
    resolving dependencies…
    looking for inter-conflicts…

    Targets (1): glibc-2.16.0-2

    Total Installed Size: 37.58 MiB
    Net Upgrade Size: 0.00 MiB

    Proceed with installation? [Y/n] y
    (1/1) checking package integrity [############################################################] 100%
    (1/1) loading package files [############################################################] 100%
    (1/1) checking for file conflicts [############################################################] 100%
    error: failed to commit transaction (conflicting files)
    glibc: /lib exists in filesystem
    Errors occurred, no packages were upgraded.

    I have the following installed
    local/gcc-libs-multilib 4.7.1-4.1
    Runtime libraries shipped by GCC for multilib
    local/gcc-multilib 4.7.1-4.1 (multilib-devel)
    The GNU Compiler Collection – C and C++ frontends for multilib
    local/lib32-gcc-libs 4.7.1-4.1
    Runtime libraries shipped by GCC (32-bit)
    local/glibc 2.16.0-1 (base)
    GNU C Library
    local/lib32-glibc 2.16.0-2
    GNU C Library for multilib

    I tried searrching the forum but unable to find any safe working solution.

  5. I’m sorry, but after step “pacman -Su –ignore glibc” I can’t use pacman.
    “pacman-key –init” hangs. I tried “ls -R /” to generate some entropy but it didn’t help.

  6. This greatly assisted with upgrading a bunch of VPS instances based on ye olde 2010.05. Very much appreciate your glibc package to make the transition smooth.

  7. You’re amazing! I was freaking out over all this, I couldn’t update a thing. Saved my life.

    Thank you so much!

  8. Insulting there intelligence is really not the way to win new users over to Linux. My question is why is none of this referenced (that I can find) in the Beginners guide. It seems obvious that this will always be an issue for a beginner if they don’t use the network download install. I am still trying to figure out when to abandon the Beginners guide and move into the commands listed above.

    • Arch Linux is not about trying to win new users. It is about creating the distribution its developers want to use. The Beginners’ Guide is community maintained, so add to it if you feel that needs done. Although, given a new release is just waiting for the formal announcement to be made, it is probably not worth it.

  9. Огромное спасибо. Жаль, что сразу не нашел Вашу статью. Но теперь система с чистого листа.

  10. I followed the instructions plus pacman-key –init. But the final pacman -Su fails as shown below. How do I force trust of this signature?

    # pacman -Su
    :: Starting full system upgrade…
    resolving dependencies…
    looking for inter-conflicts…

    Targets (1): glibc-2.16.0-2

    Total Installed Size: 37.58 MiB
    Net Upgrade Size: 0.00 MiB

    Proceed with installation? [Y/n]
    (1/1) checking package integrity [################################] 100%
    error: glibc: signature from “Allan McRae ” is unknown trust
    error: failed to commit transaction (invalid or corrupted package (PGP signature))
    Errors occurred, no packages were upgraded.

  11. I’ve been running Archlinux since around March in a virtual machine to test it out and see if I’m capable of living on the bleeding edge, and I have yet to experience a major breakage after an update.

    When I read about the /lib move and what could go wrong, I though “ok, this is it, everything went fine so far but this can’t possibly go smooth, I expect something to break this time, this sounds just too complex”. I waited two days before updating and finally did it and was completely blown away that nothing broke whatsoever, due to the excellent instructions in the Arch news and wiki.

    It feels to me that there’s a lot of care taken to make such transitions as smooth as possible. I didn’t expect this when I first read about Arch and decided to try it. My appreciation of all you Arch developers grows every day.

    Thank you so much!

    Sanne

  12. Could you please explain why it’s necessary to rm -rf /var/run /var/lock before a filesystem upgrade and to rm /etc/profile.d/locale.sh afterwards?

  13. You have another fan: I
    Thank you!
    After suffering two nights I found your tutorial and got it!!!!!
    I love you!!!!!

  14. I’m attempting to set up a new VPS on Rackspace with their Arch 2011.10 distribution. I follow your steps, exactly as you have them up to the last “pacman -Su”. Before performing this, I execute the pacman-key –init and –populate commands. They complete successfully.

    When I finally execute the “pacman -Su”, it still products the “/lib exists in filesystem” error, which is precisely the error covered in Issue 2 of the usrlib wiki page. When I perform the “grep ‘^lib/’ /var/lib/pacman/local/*/files”, it produces pages of files. Then, when I perform “find /lib -exec pacman -Qo — {} +”, it produces pages of modules that are owned by “kernel26-xen 2.6.39.3-1”.

    I’m not certain what I should do at this point. I’ve searched for a couple of days now, and haven’t found a direct answer. I am relatively new to Arch, and am certain I am missing something trivial. Any help is greatly appreciated!!

      • Thanks for getting back with me.

        By uninstall “it”, I’m assuming you’re referring to kernel26-xen. kernel26-xen is just one owner. There are many more: linux-firmware, pam, udev, lvm2, e2fsprogs, sysfsutils, linux 3.1.1.-1, etc. I tried uninstalling them, but it renders my system useless, as expected.

        If it helps: after running the “pacman -Syu –ignore glibc” command, I am still not showing a symlink to /usr/lib.

        Any ideas?

  15. This “completely smooth” upgrade is the reason why I’m going to stop using Arch Linux. I tried everything in the guides, none of it worked. ; I was hoping to get some work done, not spend all evening trying to work around a change inflicted on me – no doubt for valid reasons – without adequate update tools.

  16. [Edit: snip many screens of unneeded output…]

    [root@setiawan /]# pacman -Su
    :: Starting full system upgrade…
    resolving dependencies…
    looking for inter-conflicts…

    Targets (1): glibc-2.16.0-2

    Total Download Size: 7.57 MiB
    Total Installed Size: 33.94 MiB
    Net Upgrade Size: 0.00 MiB

    Proceed with installation? [Y/n] Y
    :: Retrieving packages from core…
    glibc-2.16.0-2-i686 7.6 MiB 120K/s 01:04 [######################] 100%
    (1/1) checking package integrity [######################] 100%
    error: GPGME error: Inappropriate ioctl for device
    error: glibc: missing required signature
    error: failed to commit transaction (invalid or corrupted package (PGP signature))
    Errors occurred, no packages were upgraded.

    please help me

  17. when I run the following command in my other distro to chroot.

    root@ubuntu: ~# mount -t devpts devpts /media/dev/pts -o mode=0620,gid=5,nosuid,noexec

    it worked.

    Then, i run this command :

    root@ubuntu: ~# chroot /media
    [root@setiawan /]# pacman -Su
    :: Starting full system upgrade…
    resolving dependencies…
    looking for inter-conflicts…

    Targets (1): glibc-2.16.0-2

    Total Installed Size: 33.94 MiB
    Net Upgrade Size: 0.00 MiB

    Proceed with installation? [Y/n] Y
    (1/1) checking package integrity [######################] 100%
    (1/1) loading package files [######################] 100%
    (1/1) checking for file conflicts [######################] 100%
    warning: could not get filesystem information for /sys/fs/fuse/connections: No such file or directory
    warning: could not get filesystem information for /sys/kernel/debug: No such file or directory
    warning: could not get filesystem information for /sys/kernel/security: No such file or directory
    warning: could not get filesystem information for /run/lock: No such file or directory
    warning: could not get filesystem information for /run/shm: No such file or directory
    warning: could not get filesystem information for /home/arie/.gvfs: No such file or directory
    (1/1) checking available disk space [######################] 100%
    (1/1) upgrading glibc [######################] 100%
    init: /dev/initctl: No such file or directory
    Generating locales…
    en_US.UTF-8… done
    en_US.ISO-8859-1… done
    Generation complete.

    There is a Warning ?

  18. i removed glibc

    i have made

    mkdir /mnt/gli
    mount /dev/sda4 /mnt/gli
    cd /mnt/gli
    pacman -U glibc-2.15-11-x86_64.pkg.tar.xz

    and i got

    warning cannot resolve linux api headers>=3.3 as depedency for glibc

    can you help?

  19. Thank you allan , this worked for me on a fresh archbang install after 5 re installs i found your “fix” and it worked like a charm , i managed to fully update my system , however now when i do an -Syu it wants to upgrade just 1 package (glibc-2.16.0-2) i am wondering if it would now be safe to update this /? , regards
    cirrus
    BTW i like that Scots surname u got 🙂

    • update for archbang users , pacman -R broadcom-wl from /lib/modules all up to date and bleeding on all 3 installs , pass the mop 🙂

  20. Please reply:-

    # pacman -Su
    :: Starting full system upgrade…
    resolving dependencies…
    looking for inter-conflicts…

    Targets (1): glibc-2.16.0-2

    Total Installed Size: 37.58 MiB
    Net Upgrade Size: 0.00 MiB

    Proceed with installation? [Y/n]
    (1/1) checking package integrity [################################] 100%
    error: glibc: signature from “Allan McRae ” is unknown trust
    error: failed to commit transaction (invalid or corrupted package (PGP signature))
    Errors occurred, no packages were upgraded.

    Then , I did :- #pacman-key -populate archlinux.
    which shows list of options.
    what should i do next…. How to import the Arch Linux keyring.

    • I did:-
      # pacman-key –recv-keys FFF979E7 CDFD6BB0 4C7EA887 6AC6A4C2 824B18E8

      once again:-
      # pacman-key –init
      then , i did:- # pacman-key –lsign-key FFF979E7
      & so on for above 5 keys ,
      finally, # pacman-key –lsign-key EAE999BD(last 8 digis of finger prins of master key FFF979E7)
      & so on for above 5 keys.
      After that,” # pacman -Su ” is validating(PGP Signature-ok), but still ,” /lib ” conflicts glibc ( no packages were upgraded.)

  21. Thanks Allan! Netinstall didn’t work for some reason so I needed this.

    For the rest, I’m not sure that disqualifying terms like “idiot” and such are appropiate here. This update has given thousands of middle of the road Archers headaches, not just newbies. I’m one of them. Arch thrives on communication to remain successful and this is good example. I personally like the way I am continually becoming educated by using Arch Linux while it gives flexibility that few other distro’s provide.

    Also I’m pretty sure it’s not easy for the dev’s to make Arch work as it is and not sometimes have something like this happen which no-one is happy about. Learning is continuing on both sides I’m sure.

  22. This got me last weekend off guard while configuring my new netbook. After some frustrating trial and error session and no other computer available for consulting online material(!) i gave up and installed a Xubuntu ISO. As a loyal arch user I will give it a try again today.

    I would ask for a favor. PLEASE, deliver a working text based web browser like ‘lynx’ or ‘links’ in the installation media, I got mad using wget for fetching some data from the arch wiki in the hope of solving this issue, and failed misserably at it 🙁

    Or do I am missing something? Is there a text based web browser in the installation media?

  23. thank you very much for this allan. I can also confirm this works.