On Wed, Oct 15, 2008 at 3:10 PM, Bruce Dubbs <[EMAIL PROTECTED]> wrote: > After jhalfs completed, I followed the instructions to chroot and set the root > passwd. I used: > > /usr/sbin/chroot "$LFS" /usr/bin/env -i \ > HOME=/root TERM=linux PS1='\u:\w\$ ' \ > PATH=/bin:/usr/bin:/sbin:/usr/sbin \ > /bin/bash --login > > It's been a while and I don't remember -- The login is in / and not /root. IS > that normal?
Yes. `/bin/bash --login' doesn't change the directory, and when it's run, the current directory is / (in the chroot). A session manager like login, ssh or a display manager specifically do this for you. Try looking at the cwd symlink in /proc/$pid for your session leader process. > I can't use less or passwd. less displays the file and immediately > terminates. > passwd gives: > > # passwd > Changing password for root > Enter the new password (minimum of 5 characters) > Please use a combination of upper and lower case letters and numbers. > Bad password: too short. > Warning: weak password (enter it again to use it anyway). > Password changed. You need devices, specifically /dev/tty for passwd (see getpass(3)). jhalfs tears down the chroot when it's done, and the only way to get it back is to do it manually like in the book. This has come up a bunch of times in the past. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page