Patch redhat kernel from 2.6.9 to 2.6.20
I have installed Red Hat 4 on my laptop and I have run in a number of problems: No audio, no compatibility with my wifi card, not even able to install YUM. Tried few versions of YUM including the reccomended 2.6.1. I get some errors trying installing it and when I try to run it it says module not installed.
It is obvious that I am a totally new to this and guys.. it is painful.
To overcome all of this I am now trying to update the kernel from 2.6.9 to 2.6.20. I have read around and found that all I have to do is to copy the kernel to the kernel/version folder and then run path -p1 patch-2.6.20 However this hangs giving no errors..
Any ideas?? Thanks in advance!
Can't you just download the 2.6.20 from kernel.org and compile that rather than trying to patch?
Also have a look in the 2.6.9 source directory for the documentation directory, inside the documentation one is a 'applying-patches.txt' file that has the best patching instructions.
Hope that some help.
Thank you for your answer. I am going to try both advices now,
I have managed to install the kernel (make all, make modules_install)
reebotted a couple of times and noticed that the old kernel was still booting. I have edited grub in order to fetch the new kernel however I did not find a file called vmlinuz and put vmlinux (an exec located in the new kernel).
Status: Broke, it wont boot. I will reinstall it tomorrow but I dont understand what I did wrong. Any ideas?
PS:As for desperation I have tried to install CentOs, it did not find my hard drive.. ( I know why)
I am sure now it cannot get any worse! Can it :S ?
Try also running "make install".
This should add the new kernel to the /boot directory ... and possibly even update you grub/lilo config file.
Once you have made the bzImage of your kernel it should be in /usr/src/linux-2.6.20/arch/i386/boot/ now in the terminal copy the bzImage to /boot/bzImage-2.6.20, with (as root):
cp bzImage /boot/bzImage-2.6.20
Then go to the /usr/src/linux-2.6.20 directory and there should be a file called System.map copy that file to /boot/System.map-2.6.20, again as root:
cp System.map /boot/System.map-2.6.20
You now have to make a initrd image, do this with (as root):
mkinitrd -o /boot/initrd.img-2.6.20 2.6.20
Now you should have three files in the /boot directory: bzImage-2.6.20, System.map-2.6.20 and initrd.img-2.6.20.
Next thing you have to do is edit the grub menu, so that you can select the 2.6.20 kernel to boot. There should be a directory /boot/grub and in that there is a file called grub.conf, now open that in an editor, like gedit, as root. There should already be stuff in there like:
boot /boot/bzImage-kernel version
Copy everything written for the other kernel entries except change the kernel version to 2.6.20. So you should have the two files bzImage and initrd.img that are in the /boot dir pointed to by grub.conf.
Right that should be it reboot and see what happens. If you want to know more about what init images are etc see man init, man boot, they explain loads.
Hey guys thanks so much for backing me. I will try all of the above tonight, fingers crossed!
Hi cpd05 dxqcanada
mkinitrd -o will not work, I get some man page description. mkinitrd on its own complaints about the absence of the lib/modules/2.6.20 folder in fact only lib does exist the other 2 subfolders are not there...
make install fails with the same error
Have I missed something?
Finally got all the bits into /boot/ Thank you for that!!
However I now have
mkrootdev: label / not found
mount: error 2 mounting ext3
mount: error 2 mounting none
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!
Kernel Panic - I've only ever got them when I have taken something out of the kernel which it actually really needs, so when you configured it did you use the stock Red Hat config file as a starting point?
If you didn't I suggest that you do:-) An easy way to do this is the copy the .config file from the redhat kernel folder in /usr/src, or it might be in /boot/. To the /usr/src/2.6.20 folder then run menuconfig with:
Also in menuconfig make use of the help it tells you loads.
Have got the /lib/modules/2.6.20 folder yet? If you haven't did you run (as root):
make modules_install !!remember the underscore!!
After you built the modules with make modules.
Also you need to find out what hardware you actually hard inside your pc, the easiest way to find out without using a screwdriver is the lspci command. As root run:
Look for makers names and numbers of the 'chips' that are printed out then when configuring the kernel make sure you include modules for those chips.
Also check your grub.conf file to make sure that the entry you made is the same as the other ones except for the kernel version. Even an extra space in your entry could be the problem.
And another thing when you configure the kernel don't bother trying to take to much stuff out keep it nice and bloated so that things will boot. You can refine things later - this is the mistake I made when first trying to compile the kernel.
Thanks again Chris
Re-installed again recompiled the module but make install gives me this error "linux questions No module ata_piix found for kernel 2.6.20"
I have used the old .config (saved it from the boot to the release folder) and I have checked 100 times that the sata drivers are indeed selected as Y (*) especially the ata_piix.
I am sure that this is the reason of the kernel panic, I recall the drive listed as hd rather than sda.
What is wrong this time????
RH kernel, rpm & yum
Try this, boot on the old kernel, cd to /usr/src/linux or whatever dir you're using and then "# make oldinstall".
About yum, this is the first hit that i rec. off google.
2. Download the Fedora Core 3 version of fedora-release and yum from one of the Fedora Core mirrors.
$ wget http://fedora.glorb.com/core/3/i386/...e-3-8.i386.rpm
$ wget http://fedora.glorb.com/core/3/i386/...1-3.noarch.rpm
3. Install the Fedora Core 3 version of fedora-release and yum.
You may need to use the --force flag when installing the RPMs as /etc/sysconfig/rhn/sources from the Fedora Core 3 fedora-release conflicts with up2date.
# rpm -Uvh fedora-release-3-8.i386.rpm yum-2.1.11-3.noarch.rpm
Preparing... ########################################### [100%]
file /etc/sysconfig/rhn/sources from install of fedora-release-3-8 conflicts with file from package up2date-4.3.19-1
# rpm -Uvh --force fedora-release-3-8.i386.rpm yum-2.1.11-3.noarch.rpm
Something else, may I ask why you're using Red Hat on your laptop? I am a fan and all however Fedora 6 will sort all these nagging issues for you. In my opinion Red Hat is more an Enterprise (read server) bundle and not always suited to laptops. For example my new laptop won;t even boot on Red Hat or Oracle's Enterprise Linux.
Hope this helps
One thing that I just noticed, are you using make menuconfig if so when your selecting the ata_piix driver are you using Y so that there is a <*> beside or are you using M so that there is a <M> beside it?
The Y means compile the driver directly inside the kernel and M makes it compile outside the kernel as a module which can then be loaded in.
So when do you get the "linux questions No module ata_piix found for kernel 2.6.20" is that after doing make modules_install??
If it is try configuring the kernel with a M beside the ata_piix driver in menuconfig. So then when you make modules_install hopefully the ata_piix module will be where its supposed to be.
You could try make oldconfig but it just asks you questions at the command prompt and because your upgrading from 2.6.9 to 2.6.20 there will probably be a lot of questions - I usually loose interest after five questions and start just answering randomly :-)
Also what make and model is your laptop??
Finally I have selected all laptop sata/pata drivers and it was still complaining. However on reboot it worked.
What did not work instead was the startup screen it looked like it had a grid on top and u could hardly read it, then after the booting process I noticed that the usb didnt work any longer so I have recompiled the kernel with all USB divers on the kernel and still it didnt work.
Unfortunately that put me off the idea of running RH any longer, I have now gone back to fedora 6 and I am still struggling to get the wifi card to work.
The documentation on my laptop is scarse is an Advent 7113.
The card as per hardware browser is a Ralink, I dont know which model but I think I will have to open the laptop to find out :P
On the ralink site I have found some drivers but I was not able to install them, I had errors after errors. I wish they made rpms! :((((
I think FC6 will be better for you than RHEL4.
Note: if you want the kernel sources read the Release Noteson the Fedora website
The following command should display all your pci hardware:
|All times are GMT -5. The time now is 10:49 AM.|