Results 1 to 10 of 12
ok, this is getting frustrating as all get out.
Redhat 9.0, current installed kernel is 2.4.20-24. I am using Grub as my boot loader.
This is the method I am ...
- 01-06-2004 #1Just Joined!
- Join Date
- Dec 2002
- Posts
- 33
Cant get kernel to compile right
ok, this is getting frustrating as all get out.
Redhat 9.0, current installed kernel is 2.4.20-24. I am using Grub as my boot loader.
This is the method I am using, but I am finding some descrepenices out there. Someone tell me if I am adding too much, missing something, etc.
1. Download kernel source from kernel.org
2. cp to /usr/src
3. unpack
4. cd <new linux directory>
5. make mrproper
6. make menuconfig
7. Now here is where opinions vary.
make?
or
make modules_install?
or
make install?
Also some bit about a new module configuration file called "modprobe.conf"
That was the end of one doc.
Here is another one I tried.
1. Download kernel source from kernel.org
2. cp to /usr/src
3. unpack
4. cd <new linux directory>
5. make mrproper
6. make menuconfig
7. make bzImage
8. make modules
9. make modules_install
10. mkinitrd /boot/newinitrd.img /<newkernelname>
Oh yeah, what about editing the "Makefile" in /usr/src/linux to show the "new name of the kernel" you are building???? Is this still necessary???
What about mkinitrd? Is it necessary???
What about using VI to edit /etc/grub.conf or /boot/grub/grub.conf???
In closing, things seem to go ok until "mkinitrd" When I try
mkinitrd -v /boot/2.6.0.img 2.6.0 it says "2.6.0 is not a directory. Am I missing something, or should I take another approach?
Any thoughts? What method should I use for RH 9.0 using Grub???
Thankyou,
GMAN
- 01-06-2004 #2Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
It seems like the last one you did should be fine but you never copied over the actual kernel. This is what I do (inside the kernel source directory):
mrproper - handles all the machine related dependencicesCode:make mrproper make gconfig (xconfig, menuconfig also works here. it's all the same) make bzImage make modules make modules_install cp arch/i386/boot/bzImage /boot/vmlinuz-<version of the kernel> cp System.map /boot/System.map-<version of the kernel> cp .config /boot/config-<version of the kernel>
gconfig - GTK editing interface for the kernel
bzImage - actually compiles the kernel into a bz format
modules - compiles the modules
modules_install - installs the modules
First copy is copying the actual kernel (again, in bz form) to the boot directory. Note the bracket should contain the kernel version i,e: vmlinuz-2.4.23. The other two files are also necessary for copying as well.
You do NOT need to ever change the makefile that comes with the linux kernel source.
Now once that's all done, all that is left to do is edit menu.list or grub.conf (which ever one you call it). In mine, the new kernel entry would look something like this:
If you are unfamiliar with GRUB, let us know. I think if you do "make install" rather than "make bzImage", this is automatically taken care of but I've never had any success with it. Perhaps I need to make a soft link in called /etc/grub.conf and link it to /boot/grub/menu.lst. Does anyone hav any thoughts on that?Code:title Debian GNU/Linux 2.6.0 root (hd0,1) # mounts the first IDE, 2nd partition kernel /boot/vmlinuz-2.6.0 root=/dev/hda2 ro # load kernel and set root directory
The best things in life are free.
- 01-06-2004 #3Just Joined!
- Join Date
- Dec 2002
- Posts
- 33
Yeah, that is what I thought too.
Supposedly with 2.6.0, no more "make dep", some even say "make modules" and "make modules_install".
"make install" is suppose to take care of all that too now.
Anyhow, is there still a need to mkinitrd?
As for Grub, what is the proper method for that?
yes, /etc/grub.conf is a s link to /boot/grub/grub.conf
I would assume I just need to edit the file to point to the new kernel.
Ever heard of vi'ing the "Makefile" in the new linux directory.
Here is a cut and paste of what I am talking about.
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 0
EXTRAVERSION = <replace this crap with new kernel name>
Anyhow, I think I will try this tonight:
make mrproper
make gconfig (xconfig, menuconfig also works here. it's all the same)
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-<version of the kernel>
cp System.map /boot/System.map-<version of the kernel>
cp .config /boot/config-<version of the kernel>
Only thing I am missing now is how to deal with Grub properly.
Thanks,
GMAN
- 01-06-2004 #4Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
I'm not too sure about mkinitrd.
In 2.6, "make dep" is no longer an available option.
As for GRUB, if you replace one of the steps "make bzImage" and replace it with "make install" it should automatically configure grub.conf as well as copy the System.map and .config files to /boot and renmaing them automatically.
As for editing the makefile, I'd suggest staying away from it unless you know what you are doing. The makefile is basically an autogenerator that uses gcc to comiple the kernel. I'd leave it alone.The best things in life are free.
- 01-07-2004 #5
Just a tip you dont need to type make so much this will do
Code:make mrproper menuconfig clean bzImage modules modules_install
- 01-07-2004 #6Just Joined!
- Join Date
- Dec 2002
- Posts
- 33
It worked
Well, that all worked, but now I need to work through some module issues. I have some issues with modutil (I believe) I remember seeing a message about "You might need to install "modutils", which I had done earlier, but I must have missed something.
Also noticed errors on boot about USB modules failing, etc.
I'm almost there.
Thanks,
GMAN
- 01-07-2004 #7Just Joined!
- Join Date
- Dec 2002
- Posts
- 33
Ok, I found this.
http://thomer.com/linux/migrate-to-2.6.html
Some of this fits for my module issues and possibly USB issues.
Another task for later tonight.
GMAN
- 01-07-2004 #8Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
I'm guessing that you don't have modules-init-tools installed. I believe you need this (as opposed to modutils) for the latest stable kernel 2.6.0.
USB names have been changed. It's just a matter of loading the right modules (well, if they are modules).The best things in life are free.
- 01-07-2004 #9Just Joined!
- Join Date
- Dec 2002
- Posts
- 33
well, I actually did have it (0.9.14) but did not run the generate-modprobe.conf script.
# ./generate-modprobe.conf /etc/modprobe.conf
- 01-07-2004 #10Linux Engineer
- Join Date
- Dec 2002
- Location
- New Zealand
- Posts
- 766
not sure abotu 2.6 but in 2.4 the usb2 drivers wel listed as experimanetal, meaning if u selected the option at the start of config for ignore experiment configs, it woudl nto compile usb2 support, causing the boot messages to show them as failed to startup.


Reply With Quote
