Kernel Compilation: Solve The Error
I compiled my kernel... RHEL5 and kernel version 2.6.18-8.el5. I compiled the new kernel 2.6.24.3. The steps i followed are:
First i unpatched the kernel into a directory /home/src and it came in a folder linux-2.6.24.3. Then i cd'd into the folder $cd /home/src/linux-2.6.24.3 After that i ran the following command: $make mproper $make xconfig (where i removed the ext3 file system, only change i made) $make dep $make clean $make bzImage $make modules $make modules_install Then i created initial ramdisk $mkinitrd /boot/initrd-2.6.24.3.img 2.6.24.3 Then i copied the kenel and the system map $cp arch/x86/boot/bzImage /boot/bzImage-2.6.24.3 $cp System.map /boot/System.map-2.6.24.3 $ln -s /boot/System.map-2.6.24.3 /boot/System.map Then i changed the grub file in /etc/grub.conf and added the following lines: title Test Kernel (2.6.24.3) root(hd0,5) //this was given as in the earlier entry kernel /bzImage-2.6.24.3 ro root=/dev/VolGroup00/LogVol00 rhgb quiet initrd /initrd-2.6.24.3.img Then i rebooted the system... and from the grub menu chose the Test Kernel.. but it gives the error... mount: error mounting /dev/root on /sysroot as ext3: No such device setuproot: moving /dev failed: No such file or directory setuproot: error mouting /proc: No such file or directory setuproot: error mouting /sys: No such file or directory swutchroot: mount failed: No such file or directory kernel panic - not sysncing : attempted to kill init! Could anyone please help me in removing this error and properly compile the kernel?:scratch: |
You forgot somethings like creating a working kernel configuration before tweaking. You also did a few extra not needed steps and preformed some undesired/unnecessary work, the steps in order and the only steps one need to do are;
make mrproper make oldconfig ;the step you missed make menuconfig (or xconfig or gconfig here) make make modules_install make install ;takes the place of the mkinitrd command, copying files and editing you did The other junk you did is not required and it sounds like you using an old HOWTO as a reference, please get the updated reference for building a 2.6 kernel from here; http://www.kernel.org/pub/linux/kern...le/gregkh/lkn/ You want(direct link): http://www.kernel.org/pub/linux/kern...kn_pdf.tar.bz2 |
All times are GMT -5. The time now is 03:28 PM. |