Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Linux in General => Linux Kernel => Topic started by: mohit.saha on March 06, 2008, 07:00:07 AM

Title: Kernel Compilation: Solve The Error
Post by: mohit.saha on March 06, 2008, 07:00:07 AM
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? ???