LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 6.6 - chap6.7 - Linux-2.6.32.8 API Headers (problems in this step) (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-6-6-chap6-7-linux-2-6-32-8-api-headers-problems-in-this-step-809474/)

ukiuki 05-22-2010 10:04 AM

LFS 6.6 - chap6.7 - Linux-2.6.32.8 API Headers (problems in this step)
 
I just got lost here i assumed it should be done as in chap. 5,
so i untar the package into source directory and cd to there:

Code:

root:/sources/linux-2.6.32.8# make mrproper
/bin/sh: find: command not found
/bin/sh: line 5: xargs: command not found
make: *** [clean] Error 127
root:/sources/linux-2.6.32.8#

This is my 1st LFS and i dunno what is wrong , everything else been fine so far. I need some help here.

Thanks in advance

druuna 05-22-2010 10:20 AM

Hi,

After finishing chapter 5, did you enter the chrooted env correctly (chap 6.4)? Looks like a PATH problem at first glance.

BTW:
Quote:

I just got lost here i assumed it should be done as in chap. 5
Forget chap 5 and the way things are done there. Focus on 6. Some of the things are done the same as in chapter 5 but chapter 5 and 6 build different environments and should not be compared.

Hope this helps.

ukiuki 05-22-2010 11:01 AM

1 Attachment(s)
I checked all the steps through 6.2 - 6.6, all commands been done correctly,
yes i did enter the chroot environment:

Code:

dbox:~# 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
I have no name!:/#

I'm not sure what is wrong. I copied all the commands done through 6.2-6.6
and attached txt file.

Thanks in advance

druuna 05-22-2010 11:40 AM

Hi,

All the commands in the attachment and the chroot command look ok.

What does ls -l /bin and echo $PATH show (from inside the chrooted env)?

BTW: If ls also doesn't work: cd /bin && echo *

ukiuki 05-22-2010 12:12 PM

Here is the output:

Code:

root:/# ls -l /bin
total 0
lrwxrwxrwx 1 root root 15 May 22 09:03 bash -> /tools/bin/bash
lrwxrwxrwx 1 root root 14 May 22 09:03 cat -> /tools/bin/cat
lrwxrwxrwx 1 root root 15 May 22 09:03 echo -> /tools/bin/echo
lrwxrwxrwx 1 root root 14 May 22 09:03 pwd -> /tools/bin/pwd
lrwxrwxrwx 1 root root  4 May 22 09:08 sh -> bash
lrwxrwxrwx 1 root root 15 May 22 09:03 stty -> /tools/bin/stty
root:/# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
root:/# cd /bin && echo *
bash cat echo pwd sh stty
root:/bin#

Thanks in advance

druuna 05-22-2010 12:36 PM

Hi again,

That output looks ok.

What about the /tools/bin directory? Are the "missing" executables present (find and xargs two name just 2).

ukiuki 05-22-2010 01:47 PM

Hi !

Looks like that is the problem, what did i miss ?

Code:

root:/tools/bin# ls f*
factor        false  fgrep  fmt  fold
root:/tools/bin# ls x*
xtrace
root:/tools/bin#


Thanks in advance !

druuna 05-22-2010 02:27 PM

Hi,

Both find and xargs are part of the Findutils package. Guess something went wrong during the build/install (or did you unintentionally skip it?).

You are just starting chapter 6 so going back to 5 should still be possible:

- Leave the chrooted env (if you haven't already),
- Switch to the lfs user (su - lfs),
- Check if the LFS variable is still set (echo $LFS),
- Goto the sources directory (cd $LFS/sources),
- Unpack the Findutils package (tar zxf findutils-4.4.2.tar.gz)
- Enter the newly created directory and execute the steps in 5.19. Findutils-4.4.2

After that log out again and start with chap 6 again: If you did not reboot the mounts etc from chap 6.2 should still be in place, so start with chap 6.4.

Hope this helps.

ukiuki 05-22-2010 03:08 PM

Hi

Ok yes i have skipped that by accident, i look at lfs user bash_history i just saw that,
ill go back and do as you said.

here my history file: diffutils is step 5.18 and gawk 5.20 oops!
Code:

tar -zxf diffutils-2.8.1.tar.gz
cd diffutils-2.8.1
./configure --prefix=/tools
make
make check
make install
cd ..
rm -Rf diffutils-2.8.1
ls
tar -jxf gawk-3.1.7.tar.bz2
cd gawk-3.1.7
./configure --prefix=/tools
make
make install
cd ..
rm -Rf gawk-3.1.7
ls

Thanks in advance !

druuna 05-22-2010 03:20 PM

:) That happens......

Glad to see you've figured out what was wrong.

ukiuki 05-23-2010 03:42 AM

Hi

Well not as easy as i was hopping, im having problem to install findutils
i saw the permission denied line to /tools i gave the owner back to user lfs
but after that i still have the same problem.

Code:

test -z "/tools/bin" || /tools/bin/mkdir -p "/tools/bin"
  /tools/bin/install -c 'find' '/tools/bin/find'
/tools/bin/install: cannot create regular file `/tools/bin/find': Permission denied
make[3]: *** [install-binPROGRAMS] Error 1
make[3]: Leaving directory `/mnt/lfs/sources/findutils-4.4.2/find'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/mnt/lfs/sources/findutils-4.4.2/find'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/findutils-4.4.2/find'
make: *** [install-recursive] Error 1
lfs@dbox:/mnt/lfs/sources/findutils-4.4.2$

Thanks in advance !

druuna 05-23-2010 04:52 AM

Hi,

Going back to chapter 5 once you started chapter 6 isn't always possible, it depends a bit on where you are in chapter 6. I do believe it should be possible for you in this case. Worst case scenario: You need to start all over again. But lets try something else first!


The reason for the problems: One of the last steps in chapter 5 (5.32) is changing the ownership of $LFS/tools (chown -R root:root $LFS/tools), which means that the tools dir and everything inside it is given to root (owner and group) and user lfs doesn't have access anymore.

Possible solution for the problem:

- As root (normal root, not the chrooted env root) change $LFS/tools to user LFS: chown -R lfs $LFS/tools,

- Execute the findutils install steps as user lfs (chapter 5.19.) also see post #8,

- As (normal) root change the $LFS/tools permissions back to root: chown -R root:root $LFS/tools (chapter 5.32).

From tis point on you can start with chapter 6. I'm not sure if you rebooted in the meantime, so start with chapter 6.2. You will get some error messages which you can probably ignore (some of the directories already exist due to your previous visit to chapter 6).

Before you start: Remove the unpacked findutils directory first!

Hope this gets you going agagin.

ukiuki 05-23-2010 05:13 AM

Hi

I was doing this: chown -v lfs $LFS/tools , that is why it didn't work,
I got the findutils installed , got a backup of /tools, permissions are set back
to normal root and no restarts on system so i can go back to chap6 steps i guess, is it possible to just enter in the chroot invironment (6.4)
since nothing else changed?
Anything else i should be concerned about ?

Thanks in advance !

druuna 05-23-2010 05:43 AM

Hi,

If, as you mention, all is still set (especially the mounts), you can start with 6.4.

I assume you checked to see if you haven't skipped any other packages, which means you can continue. The only thing you need to be concerned about is following the book to the letter.

Have fun!

ukiuki 05-23-2010 06:31 AM

I did check for the package installation, none else missed.

Thank you very much !!


All times are GMT -5. The time now is 12:39 PM.