LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-02-2008, 03:33 PM   #1
deian
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
RHEL 5 recompile kernel (with jmicron module)


Hi,
I'm new to rhel (gentoo user ). My drives are pretty slow (even after
setting 32-bit IO_support flag to 3):

Code:
# hdparm -tT /dev/hdd

/dev/hdd:
 Timing cached reads:   13708 MB in  2.00 seconds = 6869.92 MB/sec
 Timing buffered disk reads:   22 MB in  3.24 seconds =   6.79 MB/sec
Can't set DMA:
Code:
# hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
Here is some info on the controllers
Code:
# lspci | grep -i ide
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)
04:00.1 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)
and the drive:

Code:
# hdparm -i /dev/hdd

/dev/hdd:

 Model=WDC WD1500AHFD-00RAR5, FwRev=21.07QR5, SerialNo=WD-WMAP42009977
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=48
 BuffType=DualPortCache, BuffSize=16384kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 published, ANSI INCITS 397-2005:  ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

 * signifies the current active mode
I'm pretty sure that the only thing that I need to do is recompile the kernel with the pata_jmicron module. Anybody have a better solution?

I've been trying to recompile the default kernel (2.6.18-120.el5PAE) to set CONFIG_PATA_JMICRON=m but I'm not very familiar with the rhel kernel compilation process. I did install kernel-PAE-devel, but trying to make in /usr

/src/kernels/2.6.18-120.el5PAE-i686
gives me the following error:

Code:
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
make[1]: *** No rule to make target `init/main.o', needed by `init/built-in.o'.  Stop.
make: *** [init] Error 2
I could grab the sources from kernel.org and compile everything from scratch, but then I would've just installed Gentoo on this box

Anybody have a short step-by-step on just (preparing and) recompiling the current kernel?

Thanks!

Last edited by deian; 11-03-2008 at 01:51 AM.
 
Old 11-03-2008, 01:36 PM   #2
BlueC
Member
 
Registered: Aug 2007
Posts: 122

Rep: Reputation: 17
These instructions are pretty in-depth and are applicable to CentOS as well as fedora:

http://fedoraproject.org/wiki/Docs/CustomKernel

Alternatively, this is a (simpler) guide I wrote for recompiling the YDL kernel to support FUSE, again it equally applies to CentOS - you just need to change the appropriate parts.

http://www.cenolan.com/2008/05/build...pm-fuse-ydl-6/

HTH
C
 
Old 11-03-2008, 11:04 PM   #3
deian
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
BlueC tnx for the reply.

Anyway for those who care and might run into the same problem:
I had trouble getting kernel-<version>.src.rpm using yumdownloader --source kernel
so here is how you can do it:
go to rhn.redhat.com, log in, go to packages, search for kernel (or kernel-PAE), then select the actual version (in my case kernel-PAE-2.6.18-120.el5.i686.rpm) and finally at the bottom you will see " Download Source Package".

Once you have the source you can follow any of the compilation process (checkout rhel 4 release notes) or here it is:
  1. rpm -ivh kernel-2.6.18-120.el5.src.rpm
  2. cd /usr/src/redhat/SPECS/
  3. rpmbuild -bp --target=i686 kernel-2.6.spec
  4. cp -a /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686 /usr/src
  5. cd /usr/src/
  6. ln -s linux-2.6.18.i686 linux
  7. cp configs/kernel-2.6.18-i686-PAE.config ./.config
  8. make oldconfig
  9. make menuconfig
  10. reconfigure the kernel as you wish
  11. make
  12. make modules_install
  13. make install

You might also have to modify /boot/grub/menu.lst to append
hda=noprobe hdb=noprobe hdd=noprobe
and ata_generic to /etc/modprobe.d/blacklist -- newer kernel versions shouldn't have this problem, which I think is because of the ICH9 driver support.

Be careful if your root is on lvm because on reboot these will be sd[abd] and you will have to use the rescue disk to fix it up (checkout this article on lvm/raid recovery
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
JMicron controller issues + how do I permanently remove a module from the kernel? xtknight Linux - Hardware 10 03-28-2007 08:25 AM
not recompile kernel, but 1 module -possible? deNiro Debian 4 01-31-2005 03:48 PM
Kernel / module recompile for 5.1 ? how ? Wynand1 Linux - Newbie 6 03-09-2004 01:33 AM
Module Install without Kernel Recompile? bongski55 Linux - General 4 09-29-2003 12:30 AM
How to remove module from kernel without recompile? Stoic Linux - Software 10 09-23-2003 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:37 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