Richard Hubbell
2005-Dec-11 23:37 UTC
[CentOS] building a new kernel, problems booting without initrd
Hello all, Grabbed a new kernel (from kernel.org) to build a custom kernel but it won't boot. I followed the directions at redhat to setup a box without initrd (which I don't want and don't need to use). But the system hangs. Has anyone built a custom kernel without using initrd? I'm using CentOS 4.2. It hangs at or after "Freeing unused memory" Thanks. excerpt from the page: (http://fedora.redhat.com/docs/udev/) Udev without initrd Install Fedore Core as usual and reboot. Execute the following commands mkdir /tmp/dev mount --move /dev /tmp/dev sbin/MAKEDEV null console zero mount --move /tmp/dev /dev Install your kernel without an initrd. Reboot. You will get some SELinux errors, and syslogd will not work as expected.
Jim Perrin
2005-Dec-11 23:54 UTC
[CentOS] building a new kernel, problems booting without initrd
On 12/11/05, Richard Hubbell <richard.hubbell at gmail.com> wrote:> Hello all, > > Grabbed a new kernel (from kernel.org) to build a custom kernel > but it won't boot. I followed the directions at redhat to setup a box without > initrd (which I don't want and don't need to use). But the system hangs. > Has anyone built a custom kernel without using initrd? I'm using CentOS 4.2. > It hangs at or after "Freeing unused memory" > > Thanks. > > excerpt from the page: > (http://fedora.redhat.com/docs/udev/) > > Udev without initrd > > Install Fedore Core as usual and reboot. Execute the following commands > > > mkdir /tmp/dev > mount --move /dev /tmp/dev > sbin/MAKEDEV null console zero > mount --move /tmp/dev /dev > > Install your kernel without an initrd. Reboot. > > You will get some SELinux errors, and syslogd will not work as expected.Why is it that you feel the need to rebuild the kernel? The centos/rhel system is built atop a very heavily patched kernel. If you build from straight vanilla source from kernel.org, expect breakage. There are things like selinux, nptl, etc that will break for you, and may or may not cause apps to fail or behave erratically, the system to hang (seems like you found that one already) etc. basically, if you need to rebuild the kernel, you should do so from within the most recent kernel source rpm. Anything else is going to cause issues, and you're likely to be on your own for help. All that negativity aside, there's a tutorial on how to rebuild kernels via source rpm here: crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/ Please. centos isn't gentoo and I'd advice not treating it as such if it's possible. If what you need isn't in the stock kernel, then look to the centosplus kernel. If it's not there, ask on the mailing list or on irc. Others may need what you're after if you have a valid reason. -- Jim Perrin System Architect - UIT Ft Gordon & US Army Signal Center