You are not logged in.

#1 2012-07-15 19:15:03

vendion
Member
From: Tennessee, USA
Registered: 2010-03-10
Posts: 204
Website

[solved] Chroot fails when trying to recover an install

Hello all,

I have a system where I need to regenerate my kernel image, I booted a CD from 2001.08 and mounted all the required partitions and everything but when i get to the point where I need to run the cheroot command I get this error:

chroot: failed to run command `/bin/bash':  No such file or directory

i even tried using sh instead of bash and that was a no go.  I can see that both shells exist is the live cd environment, i am clueless as to what else to try.

Last edited by vendion (2012-07-15 23:01:58)

Offline

#2 2012-07-15 19:20:58

waldauf
Member
Registered: 2012-07-15
Posts: 133

Re: [solved] Chroot fails when trying to recover an install

I think there could be problem with your CPU - 32bit vs. 64bit. Try this command if helps:

chroot /mounted/root /bin/bash

Offline

#3 2012-07-15 19:28:21

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [solved] Chroot fails when trying to recover an install

"no such file or directory" could also mean that the linker in your chroot cannot be found. There should be a symlink /lib/ld-linux.so.2 (32bit) or /lib/ld-linux-x86-64.so.2 (64bit)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2012-07-15 20:00:51

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [solved] Chroot fails when trying to recover an install

You are not, by chance, fighting with this whole glib migration issue are you? 
Outside of the chroot environment, see if /usr/lib contains the stuff that used to be in /lib.  Now, /lib is to be a symlink to /usr/lib.

If that is the problem, you will not be able to chroot.  You can fix it, however, from the host OS.  As I found out here


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2012-07-15 23:01:36

vendion
Member
From: Tennessee, USA
Registered: 2010-03-10
Posts: 204
Website

Re: [solved] Chroot fails when trying to recover an install

I thought I had fixed that issue I followed this post but I guess I did not link it correctly or something, I was able to create the symlink from usr/lib to lib and I was able to get into a chroot environment.

Offline

Board footer

Powered by FluxBB