LinuxQuestions.org
Visit Jeremy's Blog.
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 06-15-2005, 01:25 AM   #1
sharmashikha
Member
 
Registered: Jun 2005
Location: india
Distribution: fedora core2
Posts: 34

Rep: Reputation: 15
etc of the host changes while working in chroot env


hi i m working on the sixth chapter of lfs 6.0 but as soon as i run the commands

cat > /etc/passwd << "EOF"
root:x:0:0:root:/root:/bin/bash
EOF
and

cat > /etc/group << "EOF"
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
tty:x:4:
tape:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
video:x:12:
utmp:x:13:
usb:x:14:
EOF

the changes are reflected in the etc file of the host system as well
which at later stage leads to crashing of my system
while entering the chroot env i do

su
which gets the root:/$
then cd /mnt/lfs which gets root:/mnt/lfs:$
and we are running all the command of chapter 6 at this prompt only
is this the reason for such a problem?
looking forward to a quick reply!
please help as i have to finish the project within june
 
Old 06-15-2005, 01:54 AM   #2
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
Sounds like you haven't done the chroot. You're supposed to chroot before typing those commands since you chroot in 6.3 and you create those files in 6.7.
 
Old 06-15-2005, 03:00 AM   #3
sharmashikha
Member
 
Registered: Jun 2005
Location: india
Distribution: fedora core2
Posts: 34

Original Poster
Rep: Reputation: 15
still facing the same prb

hi
i first did su
then cd /mnt/lfs and then
ran this command given in 6.3

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
and then i started modifying etc files

i have followed all the instructions as it is given in this chapter but still getting the same problem thrice.
can i take the backup of the work done in chapter 5 and run that on some other drive or partition.



please help
 
Old 06-15-2005, 12:20 PM   #4
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
I don't see how you could be overwriting your etc files in your host system if $LFS is defined correctly and if /mnt/lfs points to a different partition than your host environment.
 
  


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: cannot run command `/tools/bin/env': No such file or directory Basel Linux From Scratch 10 06-09-2018 02:15 PM
intaling GCC-3.3.3. in chroot env FAILS tests xtrem Linux From Scratch 1 02-18-2005 12:24 PM
help? gettext fails test under chroot env jobesd Linux From Scratch 2 01-19-2005 07:13 PM
Cannot Enter chroot /usr/bin/env directory not found Zero-0-Effect Linux From Scratch 2 03-13-2004 12:41 PM
chroot problem (thinks 'env' is a directory) d33pdream Linux - General 1 02-23-2003 02:11 PM

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

All times are GMT -5. The time now is 06:06 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