chroot problems
Gday everyone, This may not be a LFS issue but I will ask here first since it happened with the LFS build. I am at the stage where I am chroot'ing into the temporary LFS environment but I am having problems. If I run the command: chroot $LFS /tools/bin/env -i \ HOME=/root TERM=$TERM PS1='\u:\w\$ ' \ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login +h I get the following error; chroot: cannot run command `/tools/bin/env': No such file or directory This is very unusual since the env binary does exist at that location. To try and debug this I try running: chroot $LFS /tools/bin/bash This runs but something strange happens... I have been chroot'ed into a directory that doesn't contain anything, no files, no directories, no nothing. All I can do is run the commands built-in to the bash shell. Now this may be a problem with the chroot provided by my host system so I tried: /tools/bin/chroot / /tools/bin/bash This works perfectly fine. I am at a loss to figure out what has gone wrong does anyone else have a clue? Thanks Russ _ POP access for Hotmail is here! Click here to find out more http://windowslive.ninemsn.com.au/article.aspx?id=802246-- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: chroot problems
Russell Stockhammer wrote: Gday everyone, This may not be a LFS issue but I will ask here first since it happened with the LFS build. I am at the stage where I am chroot'ing into the temporary LFS environment but I am having problems. If I run the command: chroot $LFS /tools/bin/env -i \ HOME=/root TERM=$TERM PS1='\u:\w\$ ' \ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login +h I get the following error; chroot: cannot run command `/tools/bin/env': No such file or directory This is very unusual since the env binary does exist at that location. To try and debug this I try running: chroot $LFS /tools/bin/bash This runs but something strange happens... I have been chroot'ed into a directory that doesn't contain anything, no files, no directories, no nothing. All I can do is run the commands built-in to the bash shell. Now this may be a problem with the chroot provided by my host system so I tried: /tools/bin/chroot / /tools/bin/bash This works perfectly fine. I am at a loss to figure out what has gone wrong does anyone else have a clue? Thanks Russ Click here to find out more POP access for Hotmail is here! http://windowslive.ninemsn.com.au/article.aspx?id=802246 you need the coreutils package. Justin P. Mattock -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: chroot problems
Russell Stockhammer wrote: Gday everyone, I am at the stage where I am chroot'ing into the temporary LFS environment but I am having problems. If I run the command: chroot $LFS /tools/bin/env -i \ HOME=/root TERM=$TERM PS1='\u:\w\$ ' \ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login +h chroot: cannot run command `/tools/bin/env': No such file or directory What does 'echo $LFS' give you? -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
RE: chroot problems
What does 'echo $LFS' give you? /mnt/lfs Russ _ Looking for a place to rent, share or buy this winter? Find your next place with Ninemsn property http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Edomain%2Ecom%2Eau%2F%3Fs%5Fcid%3DFDMedia%3ANineMSN%5FHotmail%5FTagline_t=774152450_r=Domain_tagline_m=EXT-- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
RE: chroot problems
What about 'ls /tools/bin'? [ falsemkfifo stty addr2line fgrepmknodsu arfind more sum asfmt mountsu-tools awk fold msgfmt sync basename gawk mtrace tac bash gawk-3.1.6 mv tack bashbug gcc ncurses5-config tail bunzip2 gccbug nice tar bzcat gcov nl tclsh bzcmp gencat nm tclsh8.5 bzdiffgetconf nohuptee bzegrep getent objcopy test bzfgrep gprofobjdump texi2dvi bzgrepgrep od texi2pdf bzip2 groups oldfind texindex bzip2recover gunzip pastetic bzlessgzexepatchtoe bzmoregzip pathchk touch captoinfo head pcprofiledumptput cat hostid pdftexi2dvi tr catchsegv hostname perl true cci686-pc-linux-gnu-gccpgawktset c++filt i686-pc-linux-gnu-gcc-4.3.2 pgawk-3.1.6 tsort chgrp iconvpinkytty chmod id pod2man tzselect chown igawkpr umount chrootinfo printenv uname cksum infocmp printf uncompress clear infokey ptx unexpand cmp infotocappwd uniq comm install ranlib unlink compile_etinstall-info readelf updatedb cpjoin readlink uptime cpp kill resetusers csplitld rm vdir cut ldd rmdirwc date lddlibc4 rpcgen who ddld-new runtest whoami dfld-old sdiffxargs diff link sed xtrace diff3 ln seq yes dir locale sh zcat dircolors localedefsha1sum zcmp dirname locate shredzdiff dulogname size zegrep echo ls sleepzfgrep egrep m4 sort zforce env make splitzgrep expandmakeinfo sprofzless expectmd5sum stat zmore expr mk_cmds strings znew factormkdirstrip Russ _ POP access for Hotmail is here! Click here to find out more http://windowslive.ninemsn.com.au/article.aspx?id=802246-- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: chroot problems
Russell Stockhammer wrote: What about 'ls /tools/bin'? That looks OK. Does 'ls -l /tools; look like: lrwxrwxrwx 1 root root 14 Jul 16 10:59 /tools - /mnt/lfs/tools If that is OK, then I don't know what is wrong. The files programs env and bash are there. Of course you need to run chroot as root. You could also check the libraries: $ ldd /tools/bin/env linux-gate.so.1 = (0xe000) libc.so.6 = /tools/lib/libc.so.6 (0xb7e6e000) /tools/lib/ld-linux.so.2 (0xb7fbd000) You could also remove one level of indirection with: chroot /mnt/lfs /tools/bin/env -i ... -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
RE: chroot problems
You could also check the libraries: $ ldd /tools/bin/env linux-gate.so.1 = (0xe000) libc.so.6 = /tools/lib/libc.so.6 (0xb7e6e000) /tools/lib/ld-linux.so.2 (0xb7fbd000) There we go! # ldd /tools/bin/env linux-gate.so.1 = (0x006cb000) libc.so.6 = /lib/libc.so.6 (0x007df000) /lib/ld-linux.so.2 (0x007c1000) For some reason the coreutils executables have linked to /lib/ld-linux.so.2. If I make a symlink of /tools/lib/ld-linux.so.2 - /lib/ld-linux.so.2 everything in coreutils works perfectly. Now I suspect since glibc is the first thing to be built that this one symlink isn't going to effect the system since it will be replaced by the real thing before anything else gets compiled. Am I right in thinking this or will I need to fix coreutils before I continue? Thanks Russ _ POP access for Hotmail is here! Click here to find out more http://windowslive.ninemsn.com.au/article.aspx?id=802246-- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: chroot problems
Russell Stockhammer wrote: For some reason the coreutils executables have linked to /lib/ld-linux.so.2. If I make a symlink of /tools/lib/ld-linux.so.2 - /lib/ld-linux.so.2 everything in coreutils works perfectly. Now I suspect since glibc is the first thing to be built that this one symlink isn't going to effect the system since it will be replaced by the real thing before anything else gets compiled. Am I right in thinking this or will I need to fix coreutils before I continue? Double check the other applications. If it is only coreutils, then you can try fixing that. The safe way is to start over... -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Chroot problems
I've gotten through chapter 5 with no problems, but I have trouble once I'm in the chroot environment. No apparent problems mounting the kernel virtual filesystems, goes into chroot fine, but once I'm in it I have trouble. I enter a command, the command goes through and does it's thing, but then it hangs and won't return to the prompt. Can't kill it, either, it just sits there doing nothing. ps shows it as defunct. So I can't do any of chapter 6 because of this. My host is Ubuntu. Any thoughts on what I must do? -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: Chroot problems
ray [EMAIL PROTECTED] wrote in news:269921d905031616426770f0f9 @mail.gmail.com: I've gotten through chapter 5 with no problems, but I have trouble once I'm in the chroot environment. No apparent problems mounting the kernel virtual filesystems, goes into chroot fine, but once I'm in it I have trouble. I enter a command, the command goes through and does it's thing, but then it hangs and won't return to the prompt. Can't kill it, either, it just sits there doing nothing. ps shows it as defunct. So I can't do any of chapter 6 because of this. My host is Ubuntu. Any thoughts on what I must do? This is a known issue - bash has a bug, fixed in the WCONTINUED patch you can find on the LFS website. Just rebuild Chapter 5 bash with this patch, and the hangs should disappear. -- - Steve Crosby -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page