LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-18-2004, 10:30 AM   #1
Cocolan
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian- Knoppix
Posts: 3

Rep: Reputation: 0
problem with chroot on chapter 6 ! help please !


Could you help me please ???
I try the LFS version 5 and the LFS version 4.1 and I have the same problem :

The chroot doesn't work : /mnt/lfs/static/bin/env : it's not a directory.

root@plouf:~# chroot /mnt/lfs/static/bin/env -i \
> HOME=/root TERM=$TERM PS1='\u:\w\$' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
> /static/bin/bash --login
chroot: ne changer le répertoire racine vers /mnt/lfs/static/bin/env: N'est pas un répertoire
root@plouf:~# file /mnt/lfs/static/bin/env
/mnt/lfs/static/bin/env: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, statically linked, stripped
root@plouf:~# file /mnt/lfs/static/bin/bash
/mnt/lfs/static/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, statically linked, stripped
root@plouf:~# chroot --v
chroot (GNU coreutils) 4.5.2
Écrit par Roland McGrath.

Copyright (C) 2002 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de
reproduction. AUCUNE garantie n'est donnée; tant pour des raisons
COMMERCIALES que pour RÉPONDRE À UN BESOIN PARTICULIER.
 
Old 03-18-2004, 01:25 PM   #2
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
It looks as if you put static as the directory instead of tools so this should be what you want:

chroot /mnt/lfs /static/bin/env -i \
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
/static/bin/bash +h

The only difference is on the first line... space between /mnt/lfs and static and the last line +h is added. The reason for your errors is because of the first line (I think; cant read that language). But adding +h turns off hashing - look in the book for their explanation on that.

And the book warns about remembering to remount the proc and devpts filesystems when you enter chroot after leaving.

* Because you have the /static/bin in your path I assume your at the begging of chapter 6. ... not the end where a diff chroot command is used. *

Last edited by Zero-0-Effect; 03-18-2004 at 01:44 PM.
 
Old 03-19-2004, 09:12 AM   #3
Cocolan
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian- Knoppix
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your response, but i try with a space between /mnt/lfs and /static/bin/env -i and it's not working too !
 
Old 03-19-2004, 10:21 PM   #4
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
What errors are you getting now that you put the space there? Your original error of that not being a directory should not come up now.

Last edited by Zero-0-Effect; 03-20-2004 at 02:26 AM.
 
Old 03-21-2004, 11:31 AM   #5
Cocolan
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian- Knoppix
Posts: 3

Original Poster
Rep: Reputation: 0
i have exactly the same error :
The chroot doesn't work : /static/bin/env : it's not a directory.
thanks for your response !
 
Old 03-24-2004, 02:42 PM   #6
Visko
LQ Newbie
 
Registered: Mar 2004
Posts: 18

Rep: Reputation: 0
Same problem here

I'm pretty sure this is the same problem.

After typing in the string (assume it's the same; typing it out would be redundant) I get the following:

chroot: /bin/bash: no such file or directory

This makes sense; the bin directory is located in tools, which is both above and below the new /. If I symlink the tools/bin directory in the top level structure, I've broken the separation between build utilities and distro utilities. Any ideas why this isn't working as the text says/how to fix it? Thanks

-Visko
 
  


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
LFS 6 Chapter 6.3 chroot error gatblast45 Linux From Scratch 8 01-01-2008 03:12 AM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
kernel problem in chapter 8.3 Soltar Linux From Scratch 1 07-24-2005 03:35 PM
Problem with Glibc-2.3.4 chapter 6.11 adancoco Linux From Scratch 1 02-14-2005 12:04 PM
glibc problem in chapter 6 alaios Linux From Scratch 5 04-04-2004 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:09 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
Open Source Consulting | Domain Registration