How do I patch and then recompile, or rebuild, my linux kernel

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Well, It produced an rpm, but for i386 instead of i686 and also a src.rpm. I installed it but it gave a "grubby" error and when I rebooted the system hung trying to find boot info.

So I started over, went through the instructions I had gathered and installed the resulting rpm with # rpm -ivh kernel-blah.rpm

It installed with no errors, but when I reboot there is only the option for the two default kernels already there. I think I saw what to do when a kernel install doesn't update your grub configuration, so I will have to look into that.

edit: Well that was easy enough just did:
# mkinitrd /boot/initrd-2.6.13-DeadGatewayDetection.img 2.6.13-DeadGatewayDetection
and added the info (copying the existing entries) to /boot/grub/grub.conf

Now I would just like to have it compiled for i686 instead of i386. running
rpmbuid --rebuild --target=i686 kernel-2.6.13DeadGatewayDetection-1.src.rpm
on the src.rpm created with the kernel rpm.
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Well the above rebuild did not work! :|
....
INSTALL sound/pci/snd-via82xx.ko
INSTALL sound/pci/trident/snd-trident-synth.ko
INSTALL sound/pci/trident/snd-trident.ko
INSTALL sound/pci/vx222/snd-vx222.ko
INSTALL sound/pci/ymfpci/snd-ymfpci.ko
INSTALL sound/pcmcia/pdaudiocf/snd-pdaudiocf.ko
INSTALL sound/soundcore.ko
INSTALL sound/synth/emux/snd-emux-synth.ko
INSTALL sound/synth/snd-util-mem.ko
INSTALL sound/usb/snd-usb-audio.ko
INSTALL sound/usb/snd-usb-lib.ko
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map -b /var/tmp/kernel-2.6.13dgd-root -r 2.6.13-dgd; fi
+ cp /var/tmp/kernel-2.6.13dgd-root/boot/vmlinuz-2.6.13-dgd
cp: missing destination file
Try `cp --help' for more information.
error: Bad exit status from /var/tmp/rpm-tmp.44759 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.44759 (%install)
Does anybody know what these errors mean? It almost looks like if I just create the vmlinuz file and put it in /var/tmp/kernel.../boot/ then maybe it would work? Anybody have any other ideas? Is there a way to create the vmlinuz file that it appears to be looking for?
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: Seeruk
:laugh:

oOOH linux how I love your simpleness

My ultimate goal is to have a dual wan router with dead gateway detection for failover ability. Can you do that with Windows? :D
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Here's the important part:
+ cp /var/tmp/kernel-2.6.13dgd-root/boot/vmlinuz-2.6.13-dgd
cp: missing destination file
Try `cp --help' for more information.

Not sure how to fix it, I haven't messed with RPMs much.
 

Seeruk

Senior member
Nov 16, 2003
986
0
0
Originally posted by: Brazen
Originally posted by: Seeruk
:laugh:

oOOH linux how I love your simpleness

My ultimate goal is to have a dual wan router with dead gateway detection for failover ability. Can you do that with Windows? :D


No reason why not :)

Anyway sounds cool :)
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: Seeruk
Originally posted by: Brazen
Originally posted by: Seeruk
:laugh:

oOOH linux how I love your simpleness

My ultimate goal is to have a dual wan router with dead gateway detection for failover ability. Can you do that with Windows? :D


No reason why not :)

Anyway sounds cool :)

I'm beginning to wonder if it can really be done in linux. I'm having troubles, even after patching the kernel, it doesn't seem to want to fail over.
 

M00T

Golden Member
Mar 12, 2000
1,214
1
0
write a bash script to change the metric on the dead port and cycle the ethX init scripts.