LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RH 9.0 Kernel 2.4.22 (https://www.linuxquestions.org/questions/linux-newbie-8/rh-9-0-kernel-2-4-22-a-110919/)

70k51k 10-31-2003 04:08 PM

RH 9.0 Kernel 2.4.22
 
Ok, after about two hours last night I finally got the Kernel to compile sucessfully. BTW, I am pretty new to Linux. after I do a "make bzImage" it goes through all the compiling stuff and then I get this:

tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
Root device is (3, 1)
Boot sector 512 bytes.
Setup is 2662 bytes.
System is 1214 kB
warning: kernel is too big for standalone boot from floppy

ok yay, I am proud of myself for getting that far. so I open up grub.conf as root and make it look like this

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/hda1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.22)
root (hd0,0)
kernel /boot/vmlinuz-2.4.22 ro root=LABEL=/ hdc=ide-scsi
title Red Hat Linux (2.4.20-20.9)
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdc=ide-scsi
initrd /boot/initrd-2.4.20-20.9.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /boot/initrd-2.4.20-8.img

All proud of myself I goto restart and when I choose "Red Hat Linux (2.4.22)" grub comes back with Error 13 "File is not correct type of Executable" or something like that. I went into /boot and looked at the type of program that vmlinuz-2.4.22 is compared to my previous two kernels. The kernel I compiled myself is a binary program while the other two Kernels I have are "unknown type". The previous Kernels were RH stock that I updated via up2date. I am trying to compile my own Kernel because I want to use wineX to play Starcraft. I have been told that the RH Kernel doesn't play well with Wine and this is probably true since I had no speed problems with Mandrake.

My questions is: should a bzImage be a binary program? or is my GCC 3.2.2 compiling it wrong?

Any help would be greatly appreciated. I love the idea of open source and have been using Linux very happily since the beginning of the summer. This is the first time I have ever tried to compile my own kernel.

70k

Mikhail_16 10-31-2003 04:12 PM

its all very simple: you do not have initrd line in grup.conf. Try that, it just might help

# kernel /boot/vmlinuz-version ro root=/dev/hda1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.22)
root (hd0,0)
kernel /boot/vmlinuz-2.4.22 ro root=LABEL=/ hdc=ide-scsi

[insert here /boot/initrd/whatever it is]

title Red Hat Linux (2.4.20-20.9)
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdc=ide-scsi
initrd /boot/initrd

inode100 10-31-2003 04:26 PM

not exactly sure what you're doing wrong, but there is defo a problem with your bzimage file


from :- http://www.gnu.org/manual/grub-0.92/...e2-errors.html

"13 : Invalid or unsupported executable format
This error is returned if the kernel image being loaded is not recognized as Multiboot or one of the supported native formats (Linux zImage or bzImage, FreeBSD, or NetBSD)"

This may help you check your steps again..

http://en.tldp.org/HOWTO/Kernel-HOWTO/

good luck, keep at it, it took me a few times trying to compile my first kernel... but when it all works its so worth it!

inode
:jawa:

70k51k 11-01-2003 02:53 AM

How do I generate the initrd file? The Kernel Compilation compiled the bzImage but no initrd file to go with it? It is somet type of command in grub?

.300WSM 11-01-2003 07:13 AM

http://www.linuxquestions.org/questi...355#post379355

70k51k 11-01-2003 10:46 AM

Yay, thank you. I figured out last night what I was doing wrong. The make bzImage creates a file called vmlinux. I was getting confused and putting that in my /boot, not the arch/i386/boot/bzImage or whatever. After I put what was under arch/i386/boot/bzImage grub was able to boot off of the the bzImage. I am not very experianced with Kernels (this is the first time I have tried to do my own) so I am using the RH config file from the last Kernel and just answering the new questions with "make oldconfig". I am going to try to boot off the kernel tonight (my family will get mad if I kill their internet access) following the steps above. Another one of the mistakes I was making was that I was not untaring the Kernel source into /usr/src. The above document has been very helpful in getting me going. Hopefully tonight I will write a status update after booting from my new Kernel.

70k51k 11-03-2003 03:20 PM

Gave up on the make oldconfig. Used make xconfig and configured everything the way I thought it should be. Made the initrd file and rebooted. USB gave me trouble so I compiled the Kernel without iforce. That got it a little bit further. I also compiled everything USB as a module because that is how my RH works. Now when I restart, it says can't find some USB module in /lib/modules. Normally this wouldnt be a problem but since my Cable modem is a USB modem I am dead in the water when I boot with this Kernel. Thank you for getting me this far, I should be able to do it myself. Just wanted to let yall know that your advice worked. =)

70k

70k51k 11-04-2003 10:33 PM

Ok, Red Hat has a lot more stuff compiled as modules than I thought. Here is what I did to get everything working (I know it works cause I am writing this under my newest Kernel). I know everyone who reads this is going to be like "of course stupid" but I hate it when people say "ok I got it" without explaining what they did and I don't want to be hypocritical.

copied /boot/config-2.4.20-20.9 to /usr/src/linux/.config
Ignored the make mrproper.
-make mrproper would have reset .config to be generic and not system specific
instead of typing make config or xconfig or menuconfig I typed make oldconfig.
-make oldconfig takes whatever was in the .config in your toplevel and uses that as the basis then only prompts you for new stuff.

After that it was a simple following of the steps which .300WSM posted a link to. Rebooted and I got no bitching from RedHat about missing modules. Wine is now working perfectly. Now that I have a Kernel that actually speaks to Wine, my next goal is to get iTunes working under MOL or Wine. Thanx to everyone who posted to help me out. Linuxquestions.org is the reason I have been able to stay windows free since June.

If any n00bs like me need help (with this topic), email me at benh@dcci.com or post a new thread =)

70k51k


All times are GMT -5. The time now is 10:55 AM.