LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2003, 04:08 PM   #1
70k51k
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Rep: Reputation: 15
Angry 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
 
Old 10-31-2003, 04:12 PM   #2
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
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

Last edited by Mikhail_16; 10-31-2003 at 04:14 PM.
 
Old 10-31-2003, 04:26 PM   #3
inode100
Member
 
Registered: Oct 2003
Location: London - England, UK
Posts: 63

Rep: Reputation: 15
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
 
Old 11-01-2003, 02:53 AM   #4
70k51k
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Original Poster
Rep: Reputation: 15
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?
 
Old 11-01-2003, 07:13 AM   #5
.300WSM
Member
 
Registered: Oct 2003
Location: Aus
Distribution: Red Hat 9
Posts: 41

Rep: Reputation: 15
http://www.linuxquestions.org/questi...355#post379355
 
Old 11-01-2003, 10:46 AM   #6
70k51k
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Original Poster
Rep: Reputation: 15
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.
 
Old 11-03-2003, 03:20 PM   #7
70k51k
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Original Poster
Rep: Reputation: 15
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
 
Old 11-04-2003, 10:33 PM   #8
70k51k
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 12:58 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration