Operating System - Linux
1820484 Members
2206 Online
109624 Solutions
New Discussion юеВ

Custom built kernel from stock sources crashes on Fedora 4

 
Ralph Grothe
Honored Contributor

Custom built kernel from stock sources crashes on Fedora 4

Hi,

although I doubt that anyone here could and would be willing to help in this matter,
the deviations in PC hardware I think are too vast and unknown, I try anyway.

I have a Fujitus Siemens PC with (hyperthreading) Pentium 4 CPU and 1.5 GB RAM.
I run on it Fedora 4 Core, so far the highly modular standard Fedora 4 installation kernel,
which is 2.6.11-1.1369_FC4smp
(SMP I guess because it's hyperthreading
although I have only one CPU).

Because I need ntfs support (which isn't enabled in the install kernel),
and because I wanted to get rid of all those modules that cover hardware I wouldn't even dream of,
I downloaded the sources of 2.6.13.4 from kernel.org.

During a thorough make menuconfig session
I kicked out all the drivers I supposed I wouldn't need for my HW, and compiled into the kernel those drivers that I could identify that probably were discovered by kudzu (i.e. lookup of lsmod and lspci output, as well as the alii defined in /etc/modprobe.conf)

Because I wanted to avoid an initial ramdisk altogether I also compiled in all the meta disk drivers (all mounts are except for /boot (which is legacy fdisk slice with ext3) on LVM volumes with reiserfs, and this works fine with the install kernel and initrd.
The same thus is true for the mentioned filesystems as well as generic SCSI disk and SATA driver support.

After menuconfig I ran the usual
make all (for 2.6. kernels no make deps required anymore I'm told), and afterwards
make modules_install.

Because I wasn't sure if the kernel required a dummy /dev filesystem or anything else it would expect in / before the root LVM volume comes into play, I even ran mkinitrd for my new kernel after the modules_install and had the initrd written to /boot.
I also copied the System.map and bzImage in place and added a new grub entry for the new kernel that referred to them.

Although I passed the panic=15 bootparam when I try to boot the new compile the thing simply hangs and I need to cut off power completely to cycle my PC.
Unfortunately the boot messages don't give me any clue, and I'm not able to copy and paste or dump them somewhere (in which case I would have attached them here.

I attached my .config file to this posting
and because I suspect that I missed something or may have kicked out a driver that I considered redundant but that was vital.

I never faced such difficulties with the 2.4 kernels, and am clueless now.

Many thanks for your attention

Ralph


Madness, thy name is system administration
5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: Custom built kernel from stock sources crashes on Fedora 4

The "make install" command will do all steps needed to boot the kernel, as copy the kernel to the new location, generate the initrd and add an entry to the grub, etc. Try running that command at the end of the compilation.

Why do you want to avoid the use of initial ram disks?.

Sorry but without an error is hard to give more help.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
dirk dierickx
Honored Contributor

Re: Custom built kernel from stock sources crashes on Fedora 4

for ntfs you could give the NTFS userland tools a try, theey don't need kernel modules.
for your kernel problem, it's hard to know what is wrong since we get no panic message in your post.
Ralph Grothe
Honored Contributor

Re: Custom built kernel from stock sources crashes on Fedora 4

Hi Ivan,

I haven't yet got accustomed enough with the 2.6 kernel build.
From my 2.4 kernel builds I think to remember that the install target in the top level Makefile only provided for a LILO based boot sequence.
But it seems that they added support for Grub in the 2.6 Makefile.
I haven't looked closely enough yet at it.
That's why I preferred doing this part manually.
Because I got rid of all modules that usually were required in the initial boot strap I don't really see the need for an initrd (but I provided it anyway, only to find out after unziping and un-cpio-ing it to /tmp that as I expected mkinitrd didn't place any modules in the ramdisk's /lib and no insmod calls in the init script)

Anyway, I rebuild the kernel and this time selected another CPU type (had PentiumPro before and changed it to Pentium4).
Now the thing at least "boots" as far as outputting the words "kernel panic".

I can't really find out what I did wrong so far
because when I built a custom kernel from the sources under Fedora 4 on my PC at home things worked.
Well, of course my HW at home is probably much cheaper than what I am furnished with at work, and therefore probably reuires different drivers.
It simply looks to me as if a crucial driver or chipset flag is missing or toggled off.
I think I will restart the build from the config the Fedora 4 install kernel supplied anew, and successively kick out items I consider redundant.
This sounds pretty time consuming to arrive at a lean and in gear kernel.
That way I could as well have started with a Gentoo install.
I regret that RedHat isn't supplying the sources of their patched kernels anymore,
what they used to do with prior Fedora releases, if my memory serves me correctly.
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: Custom built kernel from stock sources crashes on Fedora 4

Dirk,

I also have heard or read about a thing called ndis wrapper.
Is it that what you are referring to when you talk about user space drivers.
I think various knoppix, kanotix and similar live distros make use of this for XP/Win32 data recovery where they embed the original Windows ntfs driver to also have safe filesystem write operations.
I have to admid that I deprecate the inclusion of close sourced, propriatary code bits in an open source os such as GNU/Linux,
let alone the virulent destabilizing or cluttering effect this may have to system stability by drivers that don't care for standards.
Anyway, though I also selected the dangerous writing enablement of the Linux kernel ntfs driver, I actually will most likely never use this feature since I'm contempt with reading access alone.
For private usage I have no need for any windows program at all, but here at work I sadly have no choice.
Madness, thy name is system administration
Ivan Ferreira
Honored Contributor

Re: Custom built kernel from stock sources crashes on Fedora 4

Another thing that you can do is to use the default config file that was installed with fedora, and just add to this the ntfs support. This way you can ensure that all modules will be selected in the same way.

To do that, use as base for the configuration file the /boot/config-2.6.11-_FC4 file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?