You are not logged in.

#1 2013-10-31 16:05:41

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

[Howto] Updating an old system (before /bin symlink) to current

I just spend a few hours updating an older archlinux install to current; so I thought I'd document it here for reference purposes. This is not for the faint of heart:

# pacman -Syu --ignore filesystem,glibc
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] n

:: Starting full system upgrade...
warning: filesystem: ignoring package upgrade (2012.12-1 => 2013.05-2)
warning: glibc: ignoring package upgrade (2.17-1 => 2.18-9)
:: Replace heirloom-mailx with core/s-nail? [Y/n] Y
:: Replace nss-myhostname with core/systemd? [Y/n] Y
resolving dependencies...
warning: ignoring package glibc-2.18-9
warning: cannot resolve "glibc>=2.17-2", a dependency of "pacman"
:: The following package cannot be upgraded due to unresolvable dependencies:
      pacman

Do you want to skip the above package for this upgrade? [y/N] y
looking for inter-conflicts...

Targets (123): .......

all updates will throw errors such as call to execv failed (No such file or directory) and pacman will no longer function:

# pacman
pacman: error while loading shared libraries: libarchive.so.12: cannot open shared object file: No such file or directory

Download pacman from your favorite mirror and extract it in /, pacman will now work again.

# cd /
# curl $MIRROR/core/os/x86_64/pacman-4.1.2-4-x86_64.pkg.tar.xz | tar xJvf -

Glibc has binaries in /bin, get rid of them so we can update

# rm -Rf /bin /sbin /usr/sbin

Use pacman to update itself (force because we extracted files that are now in the way):

# pacman -S pacman --force

We can now perform normal updates again

# pacman -Syu

Offline

#2 2013-10-31 16:18:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Howto] Updating an old system (before /bin symlink) to current

A clean reinstall would be much faster.

Offline

#3 2013-10-31 20:52:03

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [Howto] Updating an old system (before /bin symlink) to current

That obviously depends on several factors

Offline

#4 2013-10-31 20:54:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Howto] Updating an old system (before /bin symlink) to current

https://www.archlinux.org/news/binaries … ervention/ says you should run

# pacman -Syu --ignore filesystem,bash

What went wrong when you tried it?

Offline

#5 2013-10-31 21:00:58

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [Howto] Updating an old system (before /bin symlink) to current

karol wrote:

https://www.archlinux.org/news/binaries … ervention/ says you should run

# pacman -Syu --ignore filesystem,bash

What went wrong when you tried it?

As you can see I start with that. The problem was that pacman wanted to update itself first. That update will never work, because it requires a newer glibc and filesystem package, both of which cannot be installed until all other packages are upgraded first.

Offline

#6 2013-10-31 21:05:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Howto] Updating an old system (before /bin symlink) to current

Sorry, I missed that the filesystem was version 2012.12-1 (current glibc depends on filesystem>=2013.01).

Offline

#7 2013-11-01 02:36:52

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: [Howto] Updating an old system (before /bin symlink) to current

First download all packages throw pacman -Sw
later look for packages no more in repo, maybe you need to rebuild these adding --sbindir=/usr/bin and or sbindir=/usr/bin

first let know packages in your system and not in pacman-db for current


Well, I suppose that this is somekind of signature, no?

Offline

#8 2013-11-01 03:21:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [Howto] Updating an old system (before /bin symlink) to current

Spider.007 wrote:

Glibc has binaries in /bin, get rid of them so we can update

# rm -Rf /bin /sbin /usr/sbin

You should at least check if anything else is there before you do this - if only so you know what you've forcibly removed!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2013-11-01 03:31:06

VanillaFunk
Member
From: MA. USA
Registered: 2013-06-10
Posts: 396
Website

Re: [Howto] Updating an old system (before /bin symlink) to current

wouldnt you back up those directories for that purpose?  and then insert the uniq files?  (trying to understand)

-- should have quoted cfr in this post --

Last edited by VanillaFunk (2013-11-01 03:32:13)


archx86_64 : awesomewm
https://github.com/dreemsoul

Remeber to feed the squirrels

Offline

#10 2013-11-01 04:12:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [Howto] Updating an old system (before /bin symlink) to current

I'm not sure what you mean by inserting uniq files?

Backing them up would be safer but the whole thing is so dangerous anyway that I take it as read that anybody doing this would have backed up their system before starting. (This isn't a criticism of the instructions as such - there's probably no really safe way to upgrade from the starting point of the OP.) And I did say "at least". If there's anything much else in there, you probably should have dealt with it at an earlier stage anyway.

At least, that's my thought.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2013-11-01 08:38:12

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [Howto] Updating an old system (before /bin symlink) to current

cfr wrote:
Spider.007 wrote:

Glibc has binaries in /bin, get rid of them so we can update

# rm -Rf /bin /sbin /usr/sbin

You should at least check if anything else is there before you do this - if only so you know what you've forcibly removed!

I fully agree; and actually did that, but I wanted to strip the instructions to the parts that were actually counter-intuitive to me

Offline

#12 2013-11-18 03:03:48

mobydick
Member
Registered: 2013-08-20
Posts: 2

Re: [Howto] Updating an old system (before /bin symlink) to current

Hi all,

I haven't updated since end of 2012. I have tried the above steps and downloaded pacman via

 pacman -Sw 

and moved it to /

 # mv /var/cache/pacman/pkg/pacman-4.1.2-4-i686.pkg.tar.xz /pacman-4.1.2-4-i686.pkg.tar.xz 

.

untared by

# tar -xJvf pacman-4.1.2-4-i686.pkg.tar.xz

Then removed /bin /usr/sbin /sbin

Now when I try to force an update

# pacman -S pacman --force
pacman: error while loading shared libraries: libarchive.so.13: cannot open shared object file: No such file or directory

Can anyone suggest any further please.

Offline

#13 2013-11-18 03:19:39

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [Howto] Updating an old system (before /bin symlink) to current

Did you check what else was in /bin /usr/sbin /sbin before you removed them? You may not be updating from the same state as the OP. That's why I posted my comment above.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#14 2013-11-18 16:54:28

mobydick
Member
Registered: 2013-08-20
Posts: 2

Re: [Howto] Updating an old system (before /bin symlink) to current

Hi cfr

I have made backups but forgot to restore them so cant boot into arch anymore. I'm going to download an iso live cd so that I can restore them. The arch live cd doesn't let me mount my hard disk.

Offline

#15 2013-11-18 19:13:01

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [Howto] Updating an old system (before /bin symlink) to current

mobydick wrote:

Hi all,

I haven't updated since end of 2012. I have tried the above steps and downloaded pacman via

 pacman -Sw 

and moved it to /

 # mv /var/cache/pacman/pkg/pacman-4.1.2-4-i686.pkg.tar.xz /pacman-4.1.2-4-i686.pkg.tar.xz 

.

untared by

# tar -xJvf pacman-4.1.2-4-i686.pkg.tar.xz

Then removed /bin /usr/sbin /sbin

Now when I try to force an update

# pacman -S pacman --force
pacman: error while loading shared libraries: libarchive.so.13: cannot open shared object file: No such file or directory

Can anyone suggest any further please.

You would need to update your libarchive which will require updating dependencies to the point it may just altogether fail.  And some of the updates would have to be progressive to get to the latest updates.   This is why it is a good idea to have /usr as its' own separate partiton as well as /home and /var/cache/pacman/pkg (or /var for short).


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#16 2013-11-21 18:11:07

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [Howto] Updating an old system (before /bin symlink) to current

If you have a live-cd it might be easier to use `pacman -r /mnt -Syu` after mounting your actual system.

I couldn't use a live-cd (I had this problem originally on a vps)

Offline

Board footer

Powered by FluxBB