Tuesday, May 13, 2008

Compilation problems with 2.4 kernel

Downloaded kernel 2.4.21

steps:

1. make clean
2. make mrproper
3. make menuconfig
4. make dep
5. make && make modules
6. make modules_install
7. make bzImage
8. cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.21
9. mkinitrd /boot/initrd-2.4.21.img 2.4.21
10. added entry in /etc/grub.conf

Problem on booting:
mounting /proc filesystem
creating block devices
mounting root filesystem
mount : erro 19 mounting exts
pivotroot : pivot_root (/sysroot, /sysroot/initrd) failed:2
umount /initrd/proc failed :2
freeing unused kernel memory : 128k freed
Kernel panic: no init found. Try passing init= option to kernel

Googled solutions that didn't work:

1. add init=3 in the booting options
2. add init=/bin/sh (or your default shell)
3. replace "root=LABEL=/" by "root=/dev/hdX"
4. add rhgb quiet

What finally worked

1. ext3 file system was included as a module, changed it to be a part of the kernel
2. added options while creating initrd -> mkinitrd --fstab=/etc/fstab -v -f /boot/initrd-2.4.21 2.4.21

No comments: