LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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-10-2011, 12:04 PM   #16
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374

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.
Old 06-10-2011, 01:33 PM   #17
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
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.
 
Old 06-10-2011, 01:42 PM   #18
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
Old 06-10-2011, 03:17 PM   #19
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
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.
 
Old 06-10-2011, 03:24 PM   #20
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
Old 06-10-2011, 04:01 PM   #21
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
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 04:06 PM. Reason: Add info
 
Old 06-10-2011, 09:12 PM   #22
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
Hi,

I've decided to start over from beginning. Thank you very much for your help.
 
Old 06-11-2011, 01:54 AM   #23
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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!
 
Old 06-12-2011, 10:42 AM   #24
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
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
 
  


Reply

Tags
lfs


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
remove the gcc-build, binutils-build, etc after make @d4M Linux From Scratch 6 01-26-2009 05:29 AM
My 1st Attempt at Software RAID on Debian carlosinfl Debian 6 04-10-2007 10:00 AM
LFS binutils-build error : Pass 1 ramlnx Linux From Scratch 1 07-12-2006 08:06 AM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 05:07 AM
1st attempt at samba thetruevoice Linux - Networking 8 09-11-2001 04:13 PM


All times are GMT -5. The time now is 07:25 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration