[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Kernel recompile woes



Hello there, long time lurker, first time poster.

As you may have gathered, I'm having trouble getting a new kernel working on my (pretty bog standard) Woody install, which after much trial and tribulation got downgraded back to 2.4.18-bf2.4. I'd love to use one of the stock kernel images, but can't for several reasons:
Most don't have support for my 3ware RAID card built in
None that I've used have support for my motherboard chipset(s) - it's a (single K7 CPU) Tyan 2466 with an AMD 460 MPX nbridge and a 462 sbridge IIRC, so I'm stuck with PIO for IDE access (argh!) - trying to activate DMA with hdparm gives me an error I'd like to disable loadable modules support in the interest of security; this isn't a prerequisite, but would be nice.

Obviously, the PIO-only is a major issue. Although the bulk of disk access is done via the 3ware, the system disk is a bog-standard 30GB IDE drive, and any access to it at all thrashes the CPU. So I took the plunge and started downloading kernel sources - I've compiled million and one kernels for Gentoo, and on the face of it the Debian method seemed much easier.

Kernel sources I've tried include Debian 2.4.18, vanilla 2.4.22 and vanilla 2.4.25 (kernels above 2.4.20 supposedly support both my mobo and 3ware card better). Kernel configuration was always based on the 2.4.18-bf2.4 .config so that I didn't fail to turn on something vital; most modules were removed, the few I needed (SMBFS, 3com driver and Natsemi 83820 driver, ext2&3) were compiled in statically.

As I couldn't find any "official" guides for kernel compile, Google offered a wealth of HOWTO's, including:

http://www.osnews.com/story.php?news_id=2949
http://myrddin.org/howto/debian-kernel-recompile.html
http://members.datafast.net.au/tmccoy/kernel_compile.html
http://www.projektfarm.com/en/support/howto/debian_kernel_compile.html
http://newbiedoc.sourceforge.net/system/kernel-pkg.html

None of these tuts give the same set of instructions, but the Newbiedoc one seemed the best of all, so it was that one I followed the most. So on to how I compiled my kernel...

Download and untar the kernel to /usr/src/linux-2.4.xx-blah, create linux symlink make menuconfig, load old config file from /boot, reconfigure to my requirements (e.g. K7 rather than P3, blahblahblah)
Save kernel config, quit
fakeroot make-mpkg clean
fakeroot make-mpkg --append-to-version=.hostname040325 kernel_image
cd ../ && dpkg -i kernel-image-2.4.xx-blahblah

If the install script moaned, I would move /lib/modules/2.4.xx out of the way
New kernel image installed at /boot
Create boot floppy? No (no floppy on this machine - must figure out a way of kludging the script to output to file rather than floppy, so I can make a bootable CD)
Install boot block using existing lilo.conf? Yes
Installation successful (Hah!)

This would usually result in either an unbootable system (where LILO doesn't even run), or a kernel that panic at boot (unable to mount root fs, which is ext3). I've also tried using the --initrd option when I build the package, again with no success. After yet another reinstall (sometimes I am unable to rescue the system as even the rescue mode on the Debian CD doesn't let me boot properly either), I read (again) the man pages for kernel packaging, and it told me that vanilla kernels used a different version of cramfs for initrd to the stock Debian sources, which led me to believe that if I tried the whole thing again with Deb sources (or patched vanilla) it would all work fine; alas no.

The only thing I could think of that could have resulted in these problems is that my version of modutils is slightly behind the minimal requirements for the vanilla kernels, but since I wasn't compiling any modules, I didn't think it'd be much bother. Sorry I've not documented this thing properly, but it's just going to be a file server and as such I didn't see the point in installing X, web browsers et al on it, esp as plugging this thing into a monitor is a serious PITA. On a "maybe this is what's wrong...?" note, there was an unanswered post on google groups with a guy with similar probs to mine, in that he had unbootable kernels in combination with his boot drive light on permanently, which he though might be a DMA problem (ie he'd enabled DMA, and thought that the drive might be failing mount as DMA, hence the unreadable root fs - anyone else had experiences like this?).

If anyone has any idea what I'm doing wrong, any help would be much appreciated! I'd really love to figure out how the hell to get this whole thing working, and ad yet another "Here's the One True Way to compile a Debian kernel!" page to the fray... failing that, is there anything stopping me from installing a kernel the "Gentoo way"?

Thanks in advance for any light you can shed on this murky matter!

Tait

P.S. if anyone has any 733t-haXx0r3d kernel debs for my exact hardware, I will pay you in mortal souls to get one ;^)



Reply to: