LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 04-12-2005, 11:25 AM   #1
zxsmonkey
LQ Newbie
 
Registered: Apr 2005
Posts: 4

Rep: Reputation: 0
A strange question about chroot


When I typed :

chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login

just the same as LFS book

then I got "bash: chroot/mnt/lfs: no such file or directory"


but when i type "/usr/bin/env" it worked well



what did this mean????? what should I do to solve this problem??????

ps: LFS=.mnt/lfs
 
Old 04-12-2005, 12:23 PM   #2
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
i'm gonna take a wild guess here and say try

LFS=/mnt/lfs

then rerun the command (and make sure there's a space between chroot and "$LFS"

i don't know Linux From Scratch but it looks like your're trying to 'change root' (chroot) to run as though /mnt/lfs is your /, and then alter/provide environmental (env -i) variables (HOME, TERM, ...) in that chrooted place.
 
Old 04-13-2005, 03:32 AM   #3
BNI
LQ Newbie
 
Registered: Sep 2004
Distribution: Linux from Scratch 6.0, ClarkConnect server/gateway
Posts: 21

Rep: Reputation: 15
Right you are, jxi.
zxsmonkey: make sure of your variable with "export LFS=/mnt/lfs" (assuming you mounted the lfs partition at /mnt/lfs...) and make sure there's a space between "chroot" and "$LFS".
 
Old 04-13-2005, 03:41 AM   #4
zxsmonkey
LQ Newbie
 
Registered: Apr 2005
Posts: 4

Original Poster
Rep: Reputation: 0
I can make sure that $LFS=/mnt/lfs
and the space between "chroot" and "$LFS". but the result is the same .....
 
Old 04-13-2005, 09:58 AM   #5
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
yours is indeed a strange question

if in fact

Quote:
the result is the same .....
then i'm confused

I think this is the 'book' reference which you mentioned initially

archived lfs manual

i see no problem with the way it's described here.

What distro are you chrooting from?

Try something like these ( and post the output)

du -sh /

chroot $LFS du -sh /

uname -a

chroot $LFS uname -a

maybe try the above with the literal value of LFS (/mnt/lfs) in place of $LFS. oR, try that with the original command.

HTH
 
Old 04-18-2005, 11:19 PM   #6
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Re: A strange question about chroot

Quote:
Originally posted by zxsmonkey
...then I got "bash: chroot/mnt/lfs: no such file or directory"

...

ps: LFS=.mnt/lfs
Try setting LFS to /mnt/lfs and not .mnt/lfs (LFS=/mnt/lfs, not LFS=.mnt/lfs) and see what happens........
 
  


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
Chroot - question ef_ Linux - Software 3 10-14-2004 05:57 AM
vsftp and chroot question blubbfish Linux - Security 2 10-04-2004 10:03 AM
strange Chroot failure huepfmonster Linux From Scratch 5 03-18-2004 02:09 PM
chroot jail question f1uke Linux - Security 3 11-10-2003 12:14 PM
chroot question akwida Linux From Scratch 8 11-05-2003 03:54 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration