LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Chroot to /mnt/abc /bin/bash not found (https://www.linuxquestions.org/questions/linux-newbie-8/chroot-to-mnt-abc-bin-bash-not-found-753197/)

NecromancerLV6 09-06-2009 10:25 PM

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.

quanta 09-06-2009 10:36 PM

Quote:

Originally Posted by NecromancerLV6 (Post 3672447)
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.

NecromancerLV6 09-06-2009 10:46 PM

Tried it didn't work


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