LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2009, 11:25 PM   #1
NecromancerLV6
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
Chroot to /mnt/abc /bin/bash not found


I'm working on a project, and I have never touched linux before but basically I'm at a point where I need to Chroot to the /mnt/abc directory


I've tried creating a lib and

/mnt/abc/lib

and I found online a few files they say you need to copy into the folder

first I used

ldd bin/bash
linux-gate.so.1=> (0xb7f89000)
libncurses.so.5=> lib/libncurses.so.5
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2
libc.so.6 => /lib/tls/i686/cmov/libc.so.6
/lib/ld-linux.so.2

and I successfully copied the files

cp /lib/libncurses.so.5 /lib/libdl.so.2 /lib/libc.so.6 /lib/ld-linux.so.2 /mnt/abc/lib

I've copied the files into the folder and then I tried using Chroot

chroot /mnt/abc /bin/bash

and bin/bash not found pops up

I'm using a Ubuntu live CD and actually creating an environment to install linux into a usb without using the install packages, so basically I'm doing this entire thing on the terminal but for now I've already did the partitioning on the usb using steps given to me by a classmate, and I've installed syslinux. Just right now they say that I need to chroot the mnt/abc directory and I really hope I can understand what I'm doing wrong at least. Thank you everybody.

Last edited by NecromancerLV6; 09-06-2009 at 11:28 PM.
 
Old 09-06-2009, 11:36 PM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by NecromancerLV6 View Post
I'm working on a project, and I have never touched linux before but basically I'm at a point where I need to Chroot to the /mnt/abc directory


I've tried creating a lib and

/mnt/abc/lib

and I found online a few files they say you need to copy into the folder

first I used

ldd bin/bash
linux-gate.so.1=> (0xb7f89000)
libncurses.so.5=> lib/libncurses.so.5
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2
libc.so.6 => /lib/tls/i686/cmov/libc.so.6
/lib/ld-linux.so.2

and I successfully copied the files

cp /lib/libncurses.so.5 /lib/libdl.so.2 /lib/libc.so.6 /lib/ld-linux.so.2 /mnt/abc/lib

I've copied the files into the folder and then I tried using Chroot

chroot /mnt/abc /bin/bash

and bin/bash not found pops up

I'm using a Ubuntu live CD and actually creating an environment to install linux into a usb without using the install packages, so basically I'm doing this entire thing on the terminal but for now I've already did the partitioning on the usb using steps given to me by a classmate, and I've installed syslinux. Just right now they say that I need to chroot the mnt/abc directory and I really hope I can understand what I'm doing wrong at least. Thank you everybody.
- Make a bin folder in /mnt/abc
- Copy /bin/bash to /mnt/abc/bin and try again.
 
Old 09-06-2009, 11:46 PM   #3
NecromancerLV6
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Tried it didn't work
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/bin/bash: Permission Denied in chroot environment. aliases Linux - General 1 08-21-2009 03:13 AM
chroot; /bin/bash error raj_hcl1986@rediffma Linux - Newbie 2 11-10-2008 10:24 AM
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 11:30 AM
chroot - bin/sh not found Artanicus Slackware 8 05-16-2005 05:26 AM
Cannot Enter chroot /usr/bin/env directory not found Zero-0-Effect Linux From Scratch 2 03-13-2004 01:41 PM


All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration