Thanks a lot for your reply!
You inspired me to test some thingies with the chroot command. I made a new file, testchroot, it has this contents:
Code:
mount proc $LFS/proc -t proc
mount devpts $LFS/dev/pts -t devpts
echo "Proc and Devpts mounted. Now going into the Chroot Environment.......";
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
dir /
echo "Choot Environment Loaded!";
So now it loads proc and devpts again, and then it does dir in root. It gives this output:
Code:
Proc and Devpts mounted. Now going into the Chroot Environment.......
binutils-build dobash lfs-packages-5.1.1.tar sources startchroot tools
dev lfs-5.1.1.wget proc src testchroot yorinfmbroad.asx
Choot Environment Loaded!
(this gives the same output as when i do dir in /drives/lmc-linux)
Which means that it actually does work. I'll change testchroot to make it do "dir /tools/bin" instead. Gives this output:
Code:
Proc and Devpts mounted. Now going into the Chroot Environment.......
[ catchsegv env grep localedef msguniq pwd sum wc
addr2line cc envsubst groups locate mtrace ranlib sync who
ar chgrp expand gunzip logname mv readelf tac whoami
arch chmod expect gzexe ls ngettext readlink tail xargs
as chown expr gzip make nice rm tar xgettext
autopoint chroot factor head md5sum nl rmdir tclsh xtrace
awk cksum false hostid mkdir nm rpcgen tclsh8.4 yes
basename cmp fgrep hostname mkfifo nohup runtest tee zcat
bash comm find i686-pc-linux-gnu-c++ mknod objcopy sdiff test zcmp
bashbug cp fmt i686-pc-linux-gnu-g++ more objdump sed touch zdiff
bunzip2 cpp fold i686-pc-linux-gnu-gcc mount od seq tr zegrep
bzcat csplit g++ i686-pc-linux-gnu-gcc-3.3.3 msgattrib paste sh true zfgrep
bzcmp cut gawk iconv msgcat patch sha1sum tsort zforce
bzdiff date gawk-3.1.3 id msgcmp pathchk shred tty zgrep
bzegrep dd gcc igawk msgcomm pcprofiledump size tzselect zless
bzfgrep df gccbug install msgconv perl sleep umount zmore
bzgrep diff gcov join msgen pgawk sort uname znew
bzip2 diff3 gencat kill msgexec pgawk-3.1.3 split unexpand
bzip2recover dir getconf ld msgfilter pinky sprof uniq
bzless dircolors getent ldd msgfmt pod2man stat unlink
bzmore dirname gettext lddlibc4 msggrep pr strings updatedb
c++ du gettext.sh link msginit printenv strip uptime
c++filt echo gettextize ln msgmerge printf stty users
cat egrep gprof locale msgunfmt ptx su vdir
Choot Environment Loaded!
As you see, 'bash' exists.
So I tried to make a dobash file in the /drives/lmc-linux directory.
I made the command "/./dobash"; gives the output
Code:
Proc and Devpts mounted. Now going into the Chroot Environment.......
/tools/bin/env: /./dobash: No such file or directory
Choot Environment Loaded!
With the command as "./dobash" it gives this output:
Code:
Proc and Devpts mounted. Now going into the Chroot Environment.......
/tools/bin/env: ./dobash: No such file or directory
Choot Environment Loaded!
Which actually means that the 'chroot' command works, but it can't run any file. Correction -- it can't FIND any file.
Maybe i'll just make a file dobash in the current, normal root.
doing command: "cp dobash /"
Trying startchroot:
Code:
Proc and Devpts mounted. Now going into the Chroot Environment.......
/tools/bin/env: ./dobash: No such file or directory
Choot Environment Loaded!
ONE NOTE: Each time (except for the first time) it tells me that proc and devpts are already mounted, i do not show them between the CODE tags because its not the problem, i think. Its normal, so that's not the problem.
Okay. So now I can chroot but I can't run any commands. What if I try to modify the chroot command in a way that it doesn't chroot "$LFS" but it chroots "/drives/lmc-linux"...
...
...
Gives the same output.
But... Hmm... it is "/drives/lmc-linux" in the command. If i make it /drives/lmc-linux (so without the "") then it gives ...
...
...
The same output.
Do you know what the problem is now?
Thanks,
DaZjorz.