LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-03-2001, 09:18 PM   #1
salman
Member
 
Registered: Nov 2001
Distribution: SuSE 9.1 Professional
Posts: 31

Rep: Reputation: 15
Angry Linux Kernel rebuild -- problems


I need to recompile my kernel in order to support NTFS filesystem on my desktop. I am using Red Hat 7.2 which has a kernel version of 2.4.7-10.

Being a newbiw I never did such "advance" things before. Nevertheless I downloaded 27MB source code of 2.4 kernel from kernel.org (using dial up modem !!!)

Anyway untar the source code in /usr/src and all the files from source code went into /usr/src/linux. So far so good.

Then I started using the kernel rebuild procedure given at
http://www.linuxdoc.org/HOWTO/Kernel-HOWTO-2.html

However I was always stucking duing make bzImage. I am pasting last few lines of my nohup.out (log file) so that you may see what is wrong.

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2
-fomit-frame-pointer -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=i686
-DEXPORT_SYMTAB -c ksyms.c
In file included from ksyms.c:17:
/usr/src/linux/include/linux/kernel_stat.h: In
function `kstat_irqs':
/usr/src/linux/include/linux/kernel_stat.h:48:
`smp_num_cpus' undeclared (first use in this function)
/usr/src/linux/include/linux/kernel_stat.h:48: (Each
undeclared identifier is reported only once
/usr/src/linux/include/linux/kernel_stat.h:48: for
each function it appears in.)
make[2]: *** [ksyms.o] Error 1
make[2]: Leaving directory `/usr/src/linux/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux/kernel'
make: *** [_dir_kernel] Error 2

Please let me know what is wrong !!!

Thanks
Salman
 
Old 12-04-2001, 04:32 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
your best bet is to just install the source rpm from the distro cd's and change the options you want in there, there's much more chance of it working first time that way. I'm not sure it the source's .config file is identical to that used to make the kernel rpm, if not, the config file should be something like /boot/config-2.4.7-10 load it from make xconfig and go from there.

i think ntfs read-only is supported as a module tho in most default kernels, and write support is not recommended
 
Old 12-04-2001, 04:11 PM   #3
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Ah... I did this too, and it took me a second to figure it out. Lemme guess if this is what you did:

From /usr/src/ you

tar xvzf linux-2.4.x.tar.gz right?

if you already had kernel source in there, then there was a symlink pointing to 2.4.7-10... which when you untared the other source, it went through the symlink and replaced everything that was already in the directory, except what didn't have a replacement... therefore you end up with all of these extra defs and garbage that doinked up the compile.

If you actually didn't have kernel source on the machine to start with then I'm dead off, so just ignore me. Even if you did everything exactly right, sometimes the kernel won't compile. Change the parameters and try again.

Luck,

Finegan

Wait... re-reading your post again, I'm almost certain RH7.2 will have ntfs support built as a module called, surprise: ntfs.o
try modprobe ntfs and see if its there.

Last edited by finegan; 12-04-2001 at 04:13 PM.
 
Old 12-05-2001, 12:19 PM   #4
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
Quote:
Originally posted by finegan

if you already had kernel source in there, then there was a symlink pointing to 2.4.7-10... which when you untared the other source, it went through the symlink and replaced everything that was already in the directory, except what didn't have a replacement... therefore you end up with all of these extra defs and garbage that doinked up the compile.
this was my first guess when i read the post - it's one of the oddities that anyone who messes with kernels needs to know.
 
Old 12-06-2001, 01:40 AM   #5
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
I always untar a new kernel src in my user directory, then do "mv linux/ /usr/src/linux-*version*" then "rm linux" followed by "ln-s linux-*version* linux. Of course you need to make sure any existing kernel src in /usr/src is named "linux-*version*" and "linux" is a sym link before you do this.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to rebuild kernel bhanu12 Linux - Newbie 2 10-26-2005 04:42 PM
Help (!?) with rebuild kernel 2.4.26 WoofDeF Debian 1 06-22-2005 09:11 AM
kernel rebuild Present Yoper 9 11-26-2004 06:08 PM
Rebuild kernel And then !!! left-hand Linux - Software 4 02-06-2004 09:59 AM
rebuild linux kernel need to recompile all hardware driver? gsbarry Linux - Software 4 04-01-2003 08:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:31 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
Open Source Consulting | Domain Registration