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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
06-10-2011, 11:04 AM
|
#16
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,867
|
Hi,
/tools should be present and is not removed during the build. Before you enter the chrooted environment, what does ls -l / show? If /tools -> /mnt/lfs/tools is not present, do the following (as root):
Code:
ln -sv $LFS/tools /
Hope this helps.
|
|
|
1 members found this post helpful.
|
06-10-2011, 12:33 PM
|
#17
|
|
Member
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 69
Original Poster
Rep:
|
Hi,
That link is there. Here is the output:
Quote:
dhcppc0:~ # ls -l /
total 108
drwxr-xr-x 2 root root 4096 May 27 09:09 bin
drwxr-xr-x 3 root root 4096 Jun 3 21:29 boot
drwxr-xr-x 19 root root 3920 Jun 10 10:21 dev
drwxr-xr-x 117 root root 12288 Jun 10 10:35 etc
drwxr-xr-x 7 root root 4096 Jun 8 11:05 home
drwxr-xr-x 20 root root 12288 Jun 3 09:58 lib
drwx------ 2 root root 16384 May 26 14:47 lost+found
drwxr-xr-x 3 root root 4096 Jun 10 10:17 media
drwxr-xr-x 3 root root 4096 Jun 8 09:03 mnt
drwxr-xr-x 2 root root 4096 Feb 18 06:48 opt
dr-xr-xr-x 166 root root 0 Jun 10 10:16 proc
drwx------ 11 root root 4096 Jun 10 11:22 root
drwxr-xr-x 3 root root 12288 Jun 3 09:58 sbin
drwxr-xr-x 2 root root 4096 Feb 18 06:48 selinux
drwxrwxrwt 2 root root 4096 Jun 8 09:43 sources
drwxr-xr-x 4 root root 4096 May 26 14:47 srv
drwxr-xr-x 12 root root 0 Jun 10 10:17 sys
drwxrwxrwt 93 root root 4096 Jun 10 11:15 tmp
lrwxrwxrwx 1 root root 14 Jun 8 11:03 tools -> /mnt/lfs/tools
drwxr-xr-x 12 root root 4096 May 26 14:47 usr
drwxr-xr-x 16 root root 4096 Jun 3 21:29 var
drwxr-xr-x 5 root root 4096 May 26 14:47 windows
d
|
What else could be causing the error? Thanks.
|
|
|
|
06-10-2011, 12:42 PM
|
#18
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,867
|
Hi,
You did verify that $LFS is mounted? df -h | grep $LFS
Does this provide any output: ls -l /tools/bin/env
Hope this helps.
|
|
|
|
06-10-2011, 02:17 PM
|
#19
|
|
Member
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 69
Original Poster
Rep:
|
Hi,
$LFS was not mounted although I did mount it this morning. Also "echo $LFS" did not work even though I fixed it this morning. Here are the latest commands and outputs:
Quote:
dhcppc0:~ # df -h | grep $LFS
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
dhcppc0:~ # echo $LFS
dhcppc0:~ # export LFS=/mnt/lfs
dhcppc0:~ # echo $LFS
/mnt/lfs
dhcppc0:~ # mount -t ext3 /dev/sdb6 $LFS
dhcppc0:~ # df -h | grep $LFS
/dev/sdb6 9.9G 265M 9.1G 3% /mnt/lfs
dhcppc0:~ # ls -l /tools/bin/env
ls: cannot access /tools/bin/env: No such file or directory
dhcppc0:~ # 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
chroot: failed to run command `/tools/bin/env': No such file or directory
|
After becoming "root user" this morning I checked "echo $LFS": no output - ran "export LFS=/mnt/lfs" - that fixed "echo" command. Ran check if LFS was mounted - no output - mounted LFS using "df -h | grep $LFS" command. Ran the other "mount" commands.
I don't know how or why they changed. Thank you for your patience and help.
|
|
|
|
06-10-2011, 02:24 PM
|
#20
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,867
|
Hi,
I might have an idea what has happened.
Unmount $LFS (umount /mnt/lfs) and post the output of ls -la /mnt/lfs/
I'm guessing you build (part of?) LFS while /dev/sdb6 was not mounted. If that is true then you need to delete everything and start from the beginning again.
Hope this helps.
|
|
|
1 members found this post helpful.
|
06-10-2011, 03:01 PM
|
#21
|
|
Member
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 69
Original Poster
Rep:
|
Hi,
Here are the results of advised actions:
Quote:
dhcppc0:~ # umount /mnt/lfs/
umount: /mnt/lfs/: not mounted
dhcppc0:~ # ls -la /mnt/lfs/
total 100
drwxr-xr-x 21 root root 4096 Jun 8 20:18 .
drwxr-xr-x 3 root root 4096 Jun 8 09:03 ..
drwxr-xr-x 2 root root 4096 Jun 9 22:12 bin
drwxr-xr-x 2 root root 4096 Jun 8 20:18 boot
drwxr-xr-x 2 root root 4096 Jun 8 20:10 dev
drwxr-xr-x 5 root root 4096 Jun 9 22:00 etc
drwxr-xr-x 2 root root 4096 Jun 8 20:18 home
drwxr-xr-x 4 root root 4096 Jun 9 21:34 lib
drwxr-xr-x 4 root root 4096 Jun 8 20:18 media
drwxr-xr-x 2 root root 4096 Jun 8 20:18 mnt
drwxr-xr-x 2 root root 4096 Jun 8 20:18 opt
drwxr-xr-x 2 root root 4096 Jun 8 20:09 proc
drwxr-x--- 2 root root 4096 Jun 8 20:23 root
drwxr-xr-x 2 root root 4096 Jun 9 22:05 sbin
drwxrwxrwt 2 lfs root 4096 Jun 9 22:27 sources
drwxr-xr-x 2 root root 4096 Jun 8 20:18 srv
drwxr-xr-x 2 root root 4096 Jun 8 20:09 sys
drwxrwxrwt 2 root root 20480 Jun 9 22:11 tmp
drwxr-xr-x 13 root root 4096 Jun 8 18:11 tools
drwxr-xr-x 9 root root 4096 Jun 8 20:18 usr
drwxr-xr-x 12 root root 4096 Jun 8 20:18 var
|
Thanks. I cd'd into /tools/bin and there is no /env directory or file.
Last edited by gdawg; 06-10-2011 at 03:06 PM.
Reason: Add info
|
|
|
|
06-10-2011, 08:12 PM
|
#22
|
|
Member
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 69
Original Poster
Rep:
|
Hi,
I've decided to start over from beginning. Thank you very much for your help.
|
|
|
|
06-11-2011, 12:54 AM
|
#23
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,867
|
Hi again,
Maybe the following will help you with you new build:
- Add the following line to your /root.bashrc file: export LFS=/mnt/lfs
- Add this to your /etc/fstab: /dev/sdb6 /mnt/lfs ext3 defaults 0 2
The above 2 suggestion need to be added to your host (Suse if I recall correctly). This way the LFS variable will always be set and LFS will be mounted when booting.
Good luck with the new build!
|
|
|
|
06-12-2011, 09:42 AM
|
#24
|
|
Member
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 69
Original Poster
Rep:
|
Hi,
Thanks again for all your help. I think some of the problem has to do with the external hard drive I'm installing lfs on. I've noticed that it doesn't light-up until I boot win 7.
Kind regards,
Glen
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:39 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|