Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

after kernel complation the system do not boot 2

Status
Not open for further replies.

herzel

IS-IT--Management
Mar 5, 2003
73
IL
Hi to all the gurus
i am new to linux in production envirinment although i have some experince with linux.
i installed for one of the users in our company redhat linux enterprise ws kernel 2.6.9.22 .he tried to install some rpms he got and found out the only supported kernel is 2.6.8.1 . i downloaded and compiled the kernel with the command "make oldconfig" and then i did "make".i did answer to all the question "enter", i mean i choosed the default, and then i tooked the new kernel as noted in the readme file from "usr/src/bla/bla/bla/bzImage" and put it in /boot .copy past from the grub menu the old kernel lines and also the "initrd" line and boot to the machine. found out the machine does not boot .i think the kernel is ok but my problem seem to be with the initrd file. the machine shout something with librray problems and say something about insmod and that it can not mount ext3 filesystems


what can i do please help me!!!
thnax
 
Can you boot from the old kernel by selecting a different option in grub? If so, do that.

If not (i.e. you only have one option in grub), you should have added a new entry in grub rather than just modifying the old one, that way you would have had a back-out option. Boot from CD-ROM, manually mount the root filesystem from your hard drive, restore the old grub configuration, and reboot.

Once the system is running again, look into the mkinitrd command to see how to make the initrd.

Annihilannic.
 
I believe that for RedHat under the /boot directory, there should be some files like config-2.6.x.x.x (where x.x.x denotes some version number). These are the configuration files used to build the running kernel you have installed on your machine. You should use these files as the basis for configuring your new kernel. Make small gradual changes until you achieve what you want or until something breaks.

I noticed that you didn't mention anything about copying your modules into your /lib/modules/2.6.x folder. That may be why insmod can't find your modules.

Just in case, the steps to build a new kernel would be:
1. make mrproper (removes all compiled file + .config)
2. copy a config-2.6.x.x.x from /boot and name it .config.
3. make oldconfig
4. make all
5. make modules_install
6. make install

You can now reboot with your new kernel.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Annihiliannic and zeland
Thank alot for your reply .
First of all I can boot The system with the 2.6.9.22 kernel.I did not deleted the 2.6.9.22 kernel line from the grub menu.
my problem is as follow .I do need the 2.6.8.1 kernel and not the 2.6.9.22 one.
i will try the steps zeland offered. but i have some questions
1. can i use the initrd file from the 2.6.9.22 kernel or shell i do mkinirtd? . what are the steps or some RTFM for it?
2.does the 2.6.8.1 kernel use all the rpms and file structer (like librrary and other system files) from the 2.6.9.22 kernel?
3.zeland ! you mentioned i did not copy modules to /lib/modules/2.6.xx what modules shell i copy to there if i have the 2.6.9.22 running and working and i need the 2.6.8.1 kernel?
4.zeland ! in step 6 you asked me to do make install. does this step put the new kernel in /boot and make change to the grub or shell i do that manually?


I appreciaet alot zeland and Annihiliannic you reply and took time to answer my questions thanx alot alot
i hope you will have some time to reply to those new questions
i believe it will help others as well

thanx


 
1. You must create an initrd for that specific kernel. mkinitrd --help will tell you all you need to know, including an example command-line.

2. Yes, the kernel uses the rest of the OS just like the previous one. The only parts that it needs separate copies of are the kernel modules.

3. You don't need to do this manually. The make modules_install step that Zeland described will do this for you.

4. I believe you still need to add it to grub manually. I'm not sure exactly where it will put the kernel...

Annihilannic.
 
annihilannic
Thanx for the replay
i will try tommorow your and zeland suggestions.
another question i have is
1.where shell i be in the file system structer to do all this
i understand i shouled be root and be in the home directory.make mrproper in the same directory and after that all the else steps without doing nothing special execpt the other steps zeland prouposed am i right?
2.when in the steps zeland suggested am i need to do the mkinitrd ,maybe at the end like step 7?



thanx alot annihilannic for the reply
 
Just to clear up on what the steps above do:

4. make all
As the command implies, everything that is configured is to be built. i.e. kernel image (bzImage) & kernel modules.

5. make modules_install
Kernel options that that are configured as 'Y' are compiled straight into bzImage while those configured as 'M' are built as modules. This step will copy all the built modules to the folder /lib/modules/xxx, where xxx is the kernel version that you are compiling. insmod/modprobe will look for all modules under this folder.

6. make install
This will copy bzImage & System.map to /boot, renaming them to vmlinux-xxx & System.map-xxx respectively, where xxx is the kernel version. This step will also generate initrd-xxx.img & setup GRUB for you automatically.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
zeland and annihilannic
thanx alot for yuor replays
zeland as you wrote in the tread it worked like achram but now it seems new problem was rised and my boss seem to be nervose on me and told me i should go back to the working kernel and say to the user it is his problem and not our (something i do not want to tell him)
ok the problem is that the 2.6.8.1 kernel did not recognize the lan adapter the alias for the lan is "alias etho e1000" but when i do ifconfig he sayes no interface when i do modprobe eth0 i got prompt like it loaded the module i also do modeprob e1000 i got prompt like the module loaded but again when i do "ifconfig etho 10.0.0.1 ..." i got no such interface when i do service network restart i got failed in the last section (it sayes 3 times ok and then failed)and says that the mac address was differnet as reported.
it seems like the module of e1000 in the 2.6.8.1 kernel was not loaded correctly or was not loaded at all.
what can i do?????

thnax alot in advance (zelnad or annihilannic if you see this treat please responed because 10 hours from now if you will not ,i am going to tell the user he is in his own)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top