You are not logged in.

#1 2012-07-17 10:48:19

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

upgrade pwned my system, how to recover?

A failed upgrade destroyed not only my /lib but also my /bin (and probably /sbin /usr/bin and so on)

I'm not sure about that, but since everything else seems intact, i think there should be a way to recover the system, boothing from usb, manually installing pacman somehow and then reinstalling all the package that were installed.

Any idea on how can i pratically do that?

Offline

#2 2012-07-17 10:50:12

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: upgrade pwned my system, how to recover?

How exactly did it fail? What did you do?

Offline

#3 2012-07-17 10:55:57

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

Well it started with the problem of glibc not upgrading but then i'm not sure, i was doing like 3-4 things at the same time and i was quite distracted

Offline

#4 2012-07-17 11:11:25

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: upgrade pwned my system, how to recover?

Did you force the update?

Offline

#5 2012-07-17 11:47:07

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

Yeah, of course.

Relax guys, this is not an archlinux bug (apart from the known glibc upgrade glitch) this is me doing too many things at once.

Offline

#6 2012-07-17 12:05:48

ethail
Member
From: Spain
Registered: 2011-02-10
Posts: 225

Re: upgrade pwned my system, how to recover?

riccardocagnasso wrote:

Yeah, of course.

How many times does it has to be said that you should NEVER force an update unless said to do so? You didn't read the news, did you?

Boot from an arch install iso chroot into your system and reinstall those packages that broke

Last edited by ethail (2012-07-17 12:07:15)


My GitHub Page

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I'm serious here, it's not an April 1st joke.

Offline

#7 2012-07-17 12:15:40

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

ethail wrote:

How many times does it has to be said that you should NEVER force an update unless said to do so? You didn't read the news, did you?

No i dont, do you have a bad opinion about anyone that don't read the news?

I messed up my system because i made a mistake, yep i did, never happened to you? Wow you must be really amazing.

Boot from an arch install iso chroot into your system and reinstall those packages that broke

Gee tanks. I boot from arch install, then i root in my system and then what, since there's no a single executable anymore?

I shall find i way to (manually?) reinstall at least what is needed to let pacman work - and i don't know how to do that.

Then - heh - every package is missing, so i need a way to tell pacman "hey, now take the list of what was installed before and reinstall every packet" - and i don't know how to do that.

Offline

#8 2012-07-17 12:23:47

ethail
Member
From: Spain
Registered: 2011-02-10
Posts: 225

Re: upgrade pwned my system, how to recover?

https://wiki.archlinux.org/index.php/Pa … tall_it.3F

in case you need to reinstall pacman.

And, unless you nuked your /var I'd say your pacman databases should be ok, also, there is a way to rebuild the database from the log, that was in the wiki too.


My GitHub Page

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I'm serious here, it's not an April 1st joke.

Offline

#9 2012-07-17 12:25:59

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: upgrade pwned my system, how to recover?

Boot a livecd, mount your partitions, and set about reinstalling packages. No need to chroot.

Offline

#10 2012-07-17 12:27:47

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

Barrucadu wrote:

Boot a livecd, mount your partitions, and set about reinstalling packages. No need to chroot.

uh? i don't follow you.

Offline

#11 2012-07-17 12:41:28

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: upgrade pwned my system, how to recover?

If you mount your root partition to, say, /borked_install, you can have pacman use that as if it were / with the -b and -r parameters.

man pacman wrote:

       -b, --dbpath <path>
           Specify an alternative database location (a typical default is /var/lib/pacman). This should not be
           used unless you know what you are doing.  NOTE: if specified, this is an absolute path and the root
           path is not automatically prepended.

       -r, --root <path>
           Specify an alternative installation root (default is /). This should not be used as a way to install
           software into /usr/local instead of /usr. This option is used if you want to install a package on a
           temporary mounted partition that is "owned" by another system.  NOTE: if database path or logfile are
           not specified on either the command line or in pacman.conf(5), their default location will be inside
           this root path.

So, for instance, the following should find a list of packages with missing files in your system:

pacman -r /borked_install -b /borked_install/var/lib/pacman -Qk | grep -v "0 missing files"

And the following can install a package for you:

pacman -r /borked_install -b /borked_install/var/lib/pacman -S package_name

Last edited by Barrucadu (2012-07-17 12:43:10)

Offline

#12 2012-07-17 12:45:50

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

Oh, sweet

Offline

#13 2012-07-17 13:18:33

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

Strange, booting and mounting the old filesystem i see that "only" libs are missing, i don't know why before it claimed that it couldn't file the executables at all, maybe some problem with bash missing libraries i don't know.

Still, pacman -Qk claims that only clamav is missing files, and that's strange. Is there a way to tell it to reinstall everything?

Offline

#14 2012-07-17 13:37:50

ethail
Member
From: Spain
Registered: 2011-02-10
Posts: 225

Re: upgrade pwned my system, how to recover?

https://wiki.archlinux.org/index.php/Pa … d_packages

Searching before asking doesn't hurt


My GitHub Page

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I'm serious here, it's not an April 1st joke.

Offline

#15 2012-07-17 15:26:43

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

heh well, i found a script in this thread https://bbs.archlinux.org/viewtopic.php?pid=263443 because - of course - i had foreign installed packages.

downloading ~3gb of stuff, let see how it ends

Offline

#16 2012-07-17 15:46:42

sonoran
Member
From: sonoran desert
Registered: 2009-01-12
Posts: 192

Re: upgrade pwned my system, how to recover?

Barrucadu wrote:

If you mount your root partition to, say, /borked_install, you can have pacman use that as if it were / with the -b and -r parameters.

man pacman wrote:

       -b, --dbpath <path>
           Specify an alternative database location (a typical default is /var/lib/pacman). This should not be
           used unless you know what you are doing.  NOTE: if specified, this is an absolute path and the root
           path is not automatically prepended.

       -r, --root <path>
           Specify an alternative installation root (default is /). This should not be used as a way to install
           software into /usr/local instead of /usr. This option is used if you want to install a package on a
           temporary mounted partition that is "owned" by another system.  NOTE: if database path or logfile are
           not specified on either the command line or in pacman.conf(5), their default location will be inside
           this root path.

So, for instance, the following should find a list of packages with missing files in your system:

pacman -r /borked_install -b /borked_install/var/lib/pacman -Qk | grep -v "0 missing files"

And the following can install a package for you:

pacman -r /borked_install -b /borked_install/var/lib/pacman -S package_name

In the interest of greater pacman understanding and appreciation, is the -b option necessary here? On my two Arch systems using "pacman -r /my_other_arch_root" is sufficient to tell pacman to use that root to find its database.

If that interpretation of the manual is correct, "-b /borked_install/var/lib/pacman" is not wrong, but it is superfluous.

-r, --root <path>
Specify an alternative installation root (default is /).
...
NOTE: if database path or logfile are not specified on either the command line or in pacman.conf(5), their default location will be inside this root path.

Offline

#17 2012-07-17 15:47:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: upgrade pwned my system, how to recover?

I can't help with the direct problem, but I hope my input on discussion tones may prove useful.

Riccardo screwed up ... and he readily admits as much and is seeking help undoing the mistake.  This should be met with a reminder of why it is important to check the news when something seems out of the ordinary, but beyond that he doesn't need to be chastized for an honest mistake.

That said, Riccardo, if you take a look around the forums you'll see many people in a similar spot as you - unfortunately, many of them are quick to blame everyone else saying arch is buggy, the devs aren't doing their jobs, or pacman is poorly written, or all sorts of other nonsense; very few of them accept responsibilty for their own actions as you have.  This may lead some community members to be a bit on edge and quick to react to someone they think might also join that choir.

Last edited by Trilby (2012-07-17 15:47:57)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#18 2012-07-17 16:11:05

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

No need to apologize, i've probably been somewhat rude myself.

And i realize now that probably there was a misunderstanding, when i said "Yeah, of course", probably ethail read that as "yeah, of course i forced the update, it was the right thing to do", while i meant "Yeah, of course i forced the update, otherwise this mess wouldn't happen".

Last edited by riccardocagnasso (2012-07-17 16:14:05)

Offline

#19 2012-07-17 16:34:56

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

Ok at this point i downloaded the packages but it's stuck upgrading glib with

error: extract: not overwriting dir with file lib
error: problem occurred while upgrading glibc
call to execv failed (No such file or directory)
error: command failed to execute correctly
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Erros occurred no packages were upgraded

but i'm not sure that using pacman -S glibc --ignore in my case is correct

Last edited by riccardocagnasso (2012-07-17 16:43:48)

Offline

#20 2012-07-17 16:40:39

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: upgrade pwned my system, how to recover?

sonoran wrote:

NOTE: if database path or logfile are not specified on either the command line or in pacman.conf(5), their default location will be inside this root path.

Yes, just -r is enough if the database path isn't specified in pacman.conf. I don't know if it is or not in the livecd, and don't have one on me to check.

Offline

#21 2012-07-17 17:23:57

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: upgrade pwned my system, how to recover?

Well. i just removed /lib... it was empty anyway...

after reinstall... it worked! omg i don't believe it, it works O_O

I didn't believe for a single moment that this would end without reinstalling the whole distro from scratch

Offline

Board footer

Powered by FluxBB