re-entering chroot correctly

IraqiGeek geek at IraqiGeek.com
Sun Oct 9 09:35:25 PDT 2005


Albert, some charecters are lost in MIME coding, or something. Anyway, enter 
the comands EXACTLY the way they are in the book, just make sure that $LFS 
is defined if u r using it when chrooting. If anything doesnt work, then you 
have screwed up something previously. Take my word for it cause I am in my 
THIRD trial in making LFS.

IraqiGeek

----- Original Message ----- 
From: "Albert" <albertwagner at cox.net>
To: "LFS Support List" <lfs-support at linuxfromscratch.org>
Sent: Sunday, October 09, 2005 5:29 PM
Subject: re-entering chroot correctly


> Sorry to bother everyone with this again, but I am on my third host and
> have lost the previous emails that address this.  Could someone please 
> verify that the commands below are the correct way to re-enter chroot, 
> chptr 6, after rebooting host:
>
> export LFS=/mnt/hda6.lfs61
>
> # 6.2. Mounting Virtual Kernel File Systems
> mount -t proc proc $LFS/proc
> mount -t sysfs sysfs $LFS/sys
>
> # 6.3. Entering the Chroot Environment
> chroot "$LFS" /tools/bin/env -i \
>     HOME=/root TERM="$TERM" PS1='\[\033[1;33m\]# \w\n\r# \[\033[0m\]' \
>     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
>     /tools/bin/bash --login +h
>
> # 6.8.1. Creating Initial Device Nodes
> mknod -m 600 /dev/console c 5 1
> mknod -m 666 /dev/null c 1 3
>
> # 6.8.2. Mounting tmpfs and Populating /dev
> mount -n -t tmpfs none /dev
> mknod -m 622 /dev/console c 5 1
> mknod -m 666 /dev/null c 1 3
> mknod -m 666 /dev/zero c 1 5
> mknod -m 666 /dev/ptmx c 5 2
> mknod -m 666 /dev/tty c 5 0
> mknod -m 444 /dev/random c 1 8
> mknod -m 444 /dev/urandom c 1 9
> chown root:tty /dev/{console,ptmx,tty}
>
> ln -s /proc/self/fd /dev/fd
> ln -s /proc/self/fd/0 /dev/stdin
> ln -s /proc/self/fd/1 /dev/stdout
> ln -s /proc/self/fd/2 /dev/stderr
> ln -s /proc/kcore /dev/core
> mkdir /dev/pts
> mkdir /dev/shm
>
> mount -t devpts -o gid=4,mode=620 none /dev/pts
> mount -t tmpfs none /dev/shm
>
>
> -- 
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
> 




More information about the lfs-support mailing list