Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was reading the linux book which says this

Finally, if you break your kernel or boot loader, you won't be able to get to single-user mode without extra help. You can often boot your system with a kernel from a bootable CD-ROM by passing the root parameter to the CD-ROM's kernel boot loader. Your system might look somewhat strange without your regular kernel, but you should still be able to move files around or perhaps even compile a new kernel to get yourself out of the jam.

Now i want to practically do that and see how i can recompile the broken kernel from cd.

I means i have the running fine version of centos. I do something and my system won't boot as kernel gor corrupted.

Now can i recompile the kernel as said in book so that i can bring my system in running state. or my all chnages will be lost and data as well

share|improve this question
add comment

closed as off topic by Zoredache, ThatGraemeGuy, theotherreceive, Warner, Zypher Jun 30 '10 at 20:37

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Simply delete the kernel (or move it somewhere other then /boot) and you will experience the situation described.

Unless you originally compiled your kernel from source there is no reason why you would do that while booted from a CD. Typically you would just download or reinstall the kernel package, or if you are doing what you are supposed to restore it from your backup.

share|improve this answer
    
Ok i install the centos from distribution cd. all the settings are set and i deleted the kernel. how can i recompile only kernel with all user home directories as it is –  John Jun 29 '10 at 6:53
    
I tend to strongly favor the Debian/Ubuntu distributions. I am not sure exactly what packages you need to reinstall or what tools you would use to rebuild the kernel. –  Zoredache Jun 29 '10 at 7:28
add comment