LinuxQuestions.org
Review your favorite Linux distribution.
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 01-07-2003, 05:02 AM   #1
Obi Perrin
Member
 
Registered: Nov 2002
Posts: 136

Rep: Reputation: 15
Chapter 6: Kernel Headers Problem


I'm at a bit of a loss here. I've got to the bit where it says about not installing the kernel, but installing the headers because some programs need them to compile. It said before this that I needed to move the source tarballs to wherever I wanted, so I moved them all to /usr/src/lfstarballs.

I wasn't quite sure where to decompress the kernel (this will not after all be installing it, so I'm not sure where it goes at the moment) - so I made a new directory for it with the tarballs, moved the compressed kernel in there and decompress. The final decompressed kernel lands in /usr/src/lfstarballs/kernel/linux-2.4.19/

First problem: I'm told to make a symlink from /static/bin/pwd to /bin/pwd, but this already exists (symlink).

Second problem: the line: make include/linux/version.h fails as well. Haven't got past this line so I don't know if any of the following will also fail. The above line gave me a:

I have no name!:/usr/src/lfstarballs/kernel/linux-2.4.19# make include/linux/version.h
/bin/sh: /dev/null: Permission denied
/bin/sh: /dev/null: Permission denied
KERNELRELEASE "2.4.19" exceeds 64 characters
make: *** [include/linux/version.h] Error 1


It is a bit of a convoluted directory structure, so I thought it might be a bit long. *shrug* Never successfully compiled a kernel before, so a guess is as good as anything else. So I then decompressed the kernel in /usr/src/linux-2.4.19. Avoided the first step as per above, mrproper went fine, then I got this on the make include/linux/version.h:

I have no name!:/usr/src/linux-2.4.19# make include/linux/version.h
/bin/sh: /dev/null: Permission denied
/bin/sh: /dev/null: Permission denied
KERNELRELEASE "2.4.19" exceeds 64 characters
make: *** [include/linux/version.h] Error 1
I have no name!:/usr/src/linux-2.4.19#


The same problem. Ran a search on this and nothing came up. Hope someone out there knows the source of my woes

Also, another kernel related question. When (If?) I get around to compiling the kernel, can I apply the packet-writing patch which it says on the sourceforge site is for 2.4.0-test10? 'Cause that's the latest version of it I can find.

Thanks all
 
Old 01-07-2003, 05:36 AM   #2
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Rep: Reputation: 30
Could you post the permissions to /dev/null and are you positive that your chrooted as root?

Are you positive that you followed this step to create all of the devices under /dev/?

http://www.au.linuxfromscratch.org/v...6/makedev.html


Also, just to be on the safe side, remove the symlink to /bin/pwd and re-create it...
 
Old 01-07-2003, 05:51 AM   #3
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
I, I um am a little confused. Grim's gotta good question, are you in the chrooted env? It would appear so, especially with the "I have no name" goin on.

I'd go back a pinch, make sure you didn't miss a step. Did you symlink bash to sh? http://www.linuxfromscratch.org/view...eatefiles.html

That just seems like a very odd message..

Cool
 
Old 01-07-2003, 01:15 PM   #4
Obi Perrin
Member
 
Registered: Nov 2002
Posts: 136

Original Poster
Rep: Reputation: 15
Yup, done all of these at least once. Some of them twice by now. Went back through all the steps from Chapter 6 again in case I had done something wrong. Here's how it went:

An - I'm assuming small - iritation arose when chrooting itself, the PATH variable wasn't set properly, as it couldn't find any programs, but I just used the export PATH=/static/bin:$PATH when I was in chroot and all seemed fine from there.

chown -R 0:0 /static went off with no complaints.

Making the directory tree gave a bunch load of errors, all along the lines of, "these already exist".

Changing the permissions of /root /tmp and /var/tmp went fine also. Did an ls -l in the various directories to confirm:

Code:
drwxr-x---    2 0        0            4096 Jan  7 18:24 root
drwxrwxrwt    2 0        0            4096 Jan  7 18:35 tmp
And in /var/tmp:

Code:
drwxrwxrwt    2 0        0            4096 Jan  7 09:01 tmp
Now I'll admit I never did fully get the hang of what each of the numbers on chmod are to mean in ls -l permissions, but the general gist of higher numbers equals less permissions required got through, which seems to hold for the the above.

Mounting proc simply said that it was already mounted.

Creating the mtab symlink from /proc/mount with: ln -sf /proc/mounts /etc/mtab went fine, only thing odd was that it didn't give an error about it already existing.

I deleted everything in the /bin dir, as there were all symlinks anyway. Made the /bin/bash and /bin/sh symlinks without problems.

Then I deleted the group and passwd files in /etc to make them again with those mini-scripts. They both passed without error.

So onto the MAKEDEV script. used MAKEDEV -v generic and it filled the screen pretty quickly with what it was up to. It looked exactly the same as before, right down to what during the first time I assumed where not important, about 20 of these lines interspersed themselves throughout the output:

Code:
./MAKEDEV: /dev/null: Permission denied
NOTICE: Resolving user/group names manually using /etc/group and /etc/passwd
Not sure if this indicates a problem or not as the script continues regardless until it's done. Yet after all of this, and remaking the symlink /bin/pwd, I still get the same output from the make include/linux/version.h.

My spidy sense tells me that /dev/null's something to do with it. Here are the permissions for those that understand them better:

Code:
crw-rw-rw-    1 0        0          1,   3 Jan  7 18:46 null
Thanks for your replies guys
 
Old 01-07-2003, 02:43 PM   #5
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Rep: Reputation: 30
Lets give /dev/null a test...

create a simple little file that contains anything, say "hello" somewhere. Then type this:

mv /path/to/little/file /dev/null

and tell us if the file disappears or gives you errors..
 
Old 01-07-2003, 07:50 PM   #6
Obi Perrin
Member
 
Registered: Nov 2002
Posts: 136

Original Poster
Rep: Reputation: 15
Strangely enough, it just decided to work.

Tried the /dev/null thing and it trashed the file put into it. So with that working perfectly, I rm -R * the kernel directory, rmdir linux-2.4.19 and then untar the kernel again. Ran the usual commands and it worked first time. I guess I must have forgotten something the first time around.

Thanks guys
 
Old 01-07-2003, 08:34 PM   #7
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Nice catch Grim! Glad you got it working Obi.

Cool
 
Old 01-08-2003, 01:23 AM   #8
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Rep: Reputation: 30
hehe, w00t! I semi-helped somebody for the first time with a LFS (and in general, a linux) problem
 
Old 01-08-2003, 02:44 AM   #9
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
he he, feels good doesn't it? That's what keeps me comin back. It's addicting, trust me:
Hi room, I'm Chad, and I'm an LQ Addict



Cool
 
  


Reply


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
Kernel Headers Problem Daejavu Ubuntu 1 10-01-2005 06:18 AM
kernel problem in chapter 8.3 Soltar Linux From Scratch 1 07-24-2005 03:35 PM
compiling kernel chapter 8.3 ..urgent sharmashikha Linux From Scratch 1 06-21-2005 03:11 AM
send packets with kernel routing and without kernel messing with headers bassdemon Programming 5 02-08-2005 06:29 PM
LFS 5.0 - chapter 5 - installing the kernel: error message hecresper Linux From Scratch 2 02-04-2004 11:36 PM


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

Main Menu
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