You are not logged in.

#1 2013-08-08 13:26:06

Ageyy
Member
Registered: 2012-08-30
Posts: 9

Chroot Repair - Pacman Installing incorrect Architecture?!

Hi Guys,

This is my first post, as its the first time I've hit a problem without someone already having an answer.

I have an encrypted USB drive, running Arch. A few days ago, I did a full system update. This update changed the filesystem and removed /bin and /sbin etc. Anyway, after the update, my X server had no keyboard or mouse functionality.

So on my Arch linux laptop, i have booted Arch normally on my laptop, mounted proc, sysfs, dev and dev/pts and chrooted to the broken usb arch install.

Now, I decided to rebuild xorg, so I ran

pacman -S xorg

(which uses the updated pacman.conf and mirrorlist) and it went on its way and installed xorg. On booting the drive, startx, xauth and X binaries do not run, giving the error "No Such File Or Directory".... strange.

So i chrooted back into it, and checked the architecture of the chroot environment (uname -m) AND my laptop, both are x86_64. Now when I force pacman to get i686 version via

pacman -S --arch i686 xorg-server 

it returns:
package xorg-server-1.14.2-2-x86_64 does not have a valid architecture <- which makes me think its downloading i686 thinking its x64 and when trying to get x64 its downloading i686?!?!.

I've set Architecture = x86_64 in pacman.conf.

Now I assumed maybe pacman was being dodgey and stupidly ran pacman -S pacman. Which is went and installed. Now upon running the command

pacman

I get:

bash: /usr/bin/pacman: No such file or directory. 

I'm assuming the 32 bit binary has been installed on the 64bit OS sad.

Can anyone help me?!?1

Offline

#2 2013-08-08 14:34:14

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

Re: Chroot Repair - Pacman Installing incorrect Architecture?!

'pacman -S xorg' is usually not necessary and may be harmful because it downloads the whole xorg group which includes the drivers for all the graphics cards.

When you got the error "No Such File Or Directory", did you check the files were there? What' the output of

file /usr/bin/pacman

?

Offline

#3 2013-08-08 14:48:23

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Chroot Repair - Pacman Installing incorrect Architecture?!

Sanity check: did you do the update properly as per the news article?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2013-08-08 15:09:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,671

Re: Chroot Repair - Pacman Installing incorrect Architecture?!

"removed /bin and /sbin"? It should have replaced them with symlinks. Tell us exactly what you did during that upgrade.

"No such file or directory." Doesn't mean it's the wrong architecture, it means it's not there.

Last edited by Scimmia (2013-08-08 15:18:18)

Offline

#5 2013-08-08 23:19:22

Ageyy
Member
Registered: 2012-08-30
Posts: 9

Re: Chroot Repair - Pacman Installing incorrect Architecture?!

Hi guys, thanks for the quick replies!
Scimmia -> Yes they have been replaced by symlinks. My wording was wrong when I said "removed". 
alphaniner .> Yes I followed that article as I had completed an upgrade on my computers previously without issue.
Karol -> The output of

 file /usr/bin/pacman 

is

pacman: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=59be7dc0ed9616129c704fde04b23a4ae6d4e7c7, stripped 

which does imply it installed the correct architecture.

Also sorry guys, I wrote the error wrong. Its not giving me "No Such file or Directory", when I try to boot or run from shell its giving me the error

 cannot execute binary file 

I get this from bash, however if I try to run the binary through ZSH I get the error

 exec format error 

I am going to try and copy a pacman binary from a fresh install to this broken install and attempt another full system upgrade and see if it helps. Any other suggestions would be appreciated.

Thanks for the help smile

Offline

#6 2013-08-09 00:05:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,671

Re: Chroot Repair - Pacman Installing incorrect Architecture?!

My suggestion would be to try reinstalling pacman from a different mirror and from outside of the chroot (assuming you're using an Arch install disk). Change the mirrorlist and run:

pacman --root <mountpoint> -Syyu pacman

Offline

#7 2013-08-09 05:07:21

Ageyy
Member
Registered: 2012-08-30
Posts: 9

Re: Chroot Repair - Pacman Installing incorrect Architecture?!

So i found the error(s) were due to missing symlink /lib64.

Upon further inspection half of the 64-bit libraries were buggered... If the library for a binary doesn't exist, bash will give you the File not found error, or binary cannot run sort of thing.

I've decided to cut my loses and just do a fresh install.

Not sure what happened, but ahh well smile

Offline

#8 2013-08-09 08:21:20

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Chroot Repair - Pacman Installing incorrect Architecture?!

there is usually no need if you find the fault.

have you updated?

have you included multilib in your pacman.conf.

always install what you need gfx(32 bit versions) included; and the dependencies will be included.

things are not always the fault of the user but it is good to know one way or the other. trouble shooting is a way of diserning that helps you in that and others. imagine reinstalling and having the same issue.

Offline

Board footer

Powered by FluxBB