How to switch from a custom Linux kernel to a distribution kernel
Solution 1:
First, you need to assess what exactly you require your kernel to do. This means building a list of:
- Every piece of hardware in your system
- Hardware-related functions, like LVM and RAID
- Networking functions, like routing, VPNs, wireless support, etc.
- Filesystems, especially your root filesystem
- Other special kernel-level needs
Next, you should try to figure out how your current kernel is handling them, and then try translating that to a newer kernel. For this, you can look at:
- The outputs of
lspci
anddmesg
- this will help you catalog hardware and what the current kernel does on boot - What modules are loaded - look at
lsmod
- The kernel configuration, if available - sometimes this exists at
/proc/config.gz
or in/boot
Once you know your hardware, and how the current kernel is dealing with it, you can roll a new kernel from the Debian sources. Focus on getting a kernel that boots first. Once you can get into a shell with your new kernel, you can take an incremental approach to the rest of your features. Recompile, adding features or drivers as necessary (perhaps as modules to speed up this process), then test each new kernel.
One last word about RAID. You should be careful about your current RAID setup, if it's software RAID - newer kernels and systems will use mdadm for managing that kind of thing, whereas older systems tend to use the raidtab approach. Your approach will change how you deal with RAID in-kernel, especially the autodetection bits. Take a look at the excellent Software RAID Howto for more info.
Solution 2:
If the person that built your custom kernel did it the debian way they there may be a file in the directory /boot named config-2.?.? that will tell you what options where used when building the kernel.
Since you aren't sure, I guess I would start by just grabbing a Debian livecd and see if a stock kernel on a livecd allows you to boot access all your hardware, and disks. If you can get everything working from a livecd, then you just need to get that kernel installed.
You mention you tried a stock kernel and it won't boot. What exactly is the error, perhaps if you post the messages we may be able to provide more help.