LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   etc of the host changes while working in chroot env (https://www.linuxquestions.org/questions/linux-from-scratch-13/etc-of-the-host-changes-while-working-in-chroot-env-333723/)

sharmashikha 06-15-2005 01:25 AM

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

kjordan 06-15-2005 01:54 AM

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.

sharmashikha 06-15-2005 03:00 AM

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

kjordan 06-15-2005 12:20 PM

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.


All times are GMT -5. The time now is 11:14 PM.