You are not logged in.

#1 2011-06-04 19:50:51

sfabius
Member
Registered: 2007-07-07
Posts: 153

Upgraded to wrong kernel

OK I know it was stupid, but now I need suggestions on the best way to get out of it.

I managed to copy a 64-bit kernel pacman.conf onto my 32-bit machine, which now refuses to boot. Does anyone have suggestions on the best way to remedy this without doing a complete reinstall? I suppose a CD or USB is the place to start.

Offline

#2 2011-06-04 19:54:33

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

Re: Upgraded to wrong kernel

sfabius wrote:

64-bit kernel pacman.conf

I'm not sure if I get this right: you copied 64-bit kernel to a 32-bit system? If so, try this: use a liveCD/ liveUSB to boot your computer, chroot into your Arch install and use pacman to install the right kernel.

Last edited by karol (2011-06-04 19:56:39)

Offline

#3 2011-06-04 19:56:11

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Upgraded to wrong kernel

Your statements are confusing. Did you upgrade the kernel and pacman from a 64 bit repo?

A 64 bit kernel should be able to work with a 32 bit userland, but I suppose it needs some further tweaking beyond a measle pacman -Syu.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2011-06-04 20:01:37

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

Yeah I used the 64-bit repo when I did pacman -Syu

Offline

#5 2011-06-04 20:03:46

Maki
Member
From: Skopje, Macedonia
Registered: 2007-10-16
Posts: 353
Website

Re: Upgraded to wrong kernel

boot into a live cd, check in the logs which packages you installed from the wrong arch, fix pacman.conf, chroot into arch and reinstall them. You can check which packages you messed up by running

ls /var/cache/pacman/pkg/ |grep x86_64 

https://wiki.archlinux.org/index.php/Mi … installing

this may help also


If it ain't broke, broke it then fix it.

Offline

#6 2011-06-04 20:08:27

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

Yeah that wiki will help thanks.

Offline

#7 2011-06-05 21:52:21

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

OK tried to chroot but I got a "chroot: cannot run command '/bin/bash': Exec format error" error. The chroot wiki says this is because the two architectures don't match. Well, probably because I put the x64 system on there. I used a 32-bit live CD of course. Any ideas how to get around this? Surely a 64-bit liveCD won't work. Argh.

Update. I tried

setarch linux32 chroot . /bin/bash 

but I got the same error.

Last edited by sfabius (2011-06-05 23:47:06)

Offline

#8 2011-06-06 00:15:11

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

I am going to try some of the pacman options. Since I was going to chroot, I have mounted my original system on /mnt/arch. So, I will fix the pacman.conf, then:

pacman --dbpath /mnt/arch/var/lib/pacman --root /mnt/arch -v --arch i686 --cachedir /mnt/arch/var/cache/pacman/pkg \
--config /mnt/arch/etc/pacman.conf -Syyu

.

Offline

#9 2011-06-06 00:19:48

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Upgraded to wrong kernel

You can reinstall bash using:

pacman -S --arch i686 -r /mnt/<arch_install>/ bash

Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#10 2011-06-06 00:45:22

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

Stebalien wrote:

You can reinstall bash using:

pacman -S --arch i686 -r /mnt/<arch_install>/ bash

"--arch" seems not to be an option anymore...

Offline

#11 2011-06-06 12:58:52

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

OK so I tried this:

pacman --dbpath /mnt/arch/var/lib/pacman --root /mnt/arch -v --cachedir /mnt/arch/var/cache/pacman/pkg \
--config /mnt/arch/etc/pacman.conf -Syy <list of packages>

But I get an error for every package in the local directory:

error: could not open file /mnt/arch/var/lib/pacman/local/<pkg-name>/depends: No such file or directory

There's one for 'depends' and 'files' for every package in the directory. I tried it with a single package and it reports an error every package there too, but then it downloads the package (giving me hope...) but then gives me the same error but just for the package I'm trying to install, reports that it is installing the package, and then

error: command failed to execute correctly

Suggestions are quite welcome; I may need to reinstall

Offline

#12 2011-06-06 13:04:56

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

Tried pacman-db-upgrade (pacman was v3.3 on the live CD), but apparently the local repo was in the old format. Anyone know how to run pacman-db-upgrade and specify the db?

Offline

#13 2011-06-06 13:08:21

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

Tried pacman-db-upgrade (pacman was v3.3 on the live CD), but apparently the local repo was in the old format. Anyone know how to run pacman-db-upgrade and specify the db?

Offline

#14 2011-06-06 13:11:21

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

sfabius wrote:

Tried pacman-db-upgrade (pacman was v3.3 on the live CD), but apparently the local repo was in the old format. Anyone know how to run pacman-db-upgrade and specify the db?

Edit: And the answer is

pacman-db-upgrade /mnt/arch/var/lib/pacman

OK did this and then ran the previously mentioned pacman command. Now I get

call to execv failed (Exec format error)

Offline

#15 2011-06-08 13:49:40

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Upgraded to wrong kernel

Would it work to simply copy a 32 bit repo onto the machine and then pacman -S <everything> (in the correct place of course)?

Offline

Board footer

Powered by FluxBB