LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 02-28-2007, 04:42 PM   #1
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

Rep: Reputation: 0
Angry Patch redhat kernel from 2.6.9 to 2.6.20


Hi

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!
 
Old 02-28-2007, 05:07 PM   #2
cpd05
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 90

Rep: Reputation: 15
Hey,

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.

chris.
 
Old 02-28-2007, 05:11 PM   #3
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
Hi Chris

Thank you for your answer. I am going to try both advices now,

Thank you

Last edited by retox; 02-28-2007 at 05:13 PM.
 
Old 02-28-2007, 07:46 PM   #4
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
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 ?
 
Old 02-28-2007, 08:20 PM   #5
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Try also running "make install".
This should add the new kernel to the /boot directory ... and possibly even update you grub/lilo config file.
 
Old 02-28-2007, 09:18 PM   #6
cpd05
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 90

Rep: Reputation: 15
Hey,

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:

title kernel-version
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.
 
Old 03-01-2007, 05:18 AM   #7
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
Hey guys thanks so much for backing me. I will try all of the above tonight, fingers crossed!
 
Old 03-01-2007, 05:54 PM   #8
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

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

Last edited by retox; 03-01-2007 at 06:15 PM.
 
Old 03-01-2007, 06:35 PM   #9
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
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!
 
Old 03-01-2007, 10:20 PM   #10
cpd05
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 90

Rep: Reputation: 15
Hey,

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:

make menuconfig

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:

lspci -v

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.

Chris.
 
Old 03-02-2007, 08:13 AM   #11
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
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????
 
Old 03-02-2007, 08:46 AM   #12
TheOracle
Member
 
Registered: Nov 2004
Posts: 87

Rep: Reputation: 15
RH kernel, rpm & yum

Hi there

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.

http://www.brandonhutchinson.com/Upg..._with_yum.html


2. Download the Fedora Core 3 version of fedora-release and yum from one of the Fedora Core mirrors.

Example:

$ 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
Graeme
 
Old 03-02-2007, 11:28 AM   #13
cpd05
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 90

Rep: Reputation: 15
Hey,

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??

Cheers

Chris

Last edited by cpd05; 03-02-2007 at 11:37 AM.
 
Old 03-03-2007, 05:56 AM   #14
retox
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
Hi

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! (((
 
Old 03-03-2007, 09:55 AM   #15
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
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:
Code:
# lspci
It should show your wireless card.
 
  


Reply

Tags
kernel, redhat, yum


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do i patch 2.4.21-37 kernel with antidote2 security patch suchi Linux - Kernel 4 09-05-2006 03:29 AM
Openswan NAT-T patch conflicts with RedHat 2.4.21 kernel barisdemiray Linux - Networking 1 07-14-2005 10:17 AM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 07:33 AM
How to Install patch-o-matic(a iptables patch) on redhat 9? itebooks Linux - Security 1 07-23-2004 09:51 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 02:21 PM


All times are GMT -5. The time now is 11:43 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration