LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2005, 12:15 AM   #1
TempleOwl1999
LQ Newbie
 
Registered: Feb 2005
Posts: 21

Rep: Reputation: 15
RH 9.0 recompiling issues with kernel 2.6.11


I've been trying for two weeks to compile a new kernel 2.6.11 with module-init-tools. I am getting a kernel panic - not syncing: no init found try passing init = option to kernel. I am currently running 2.4.20-8. Ive googled myself to death with help topics on the subject at hand but I have not found any recent threads that provide the information i need to get the results I want. I even did a search in this forum and used existing threads but none that I came across gave me the answers I need.

Can someone help me out. Remember I am a novice at Linux so break it down for me please step by step. Any suggestions?

Here are the instructions I used from www.crucialparadigm.com I thought they were well written but I still have the kernel panic issue.

http://www.crucialparadigm.com/resou...init-tools.php

********start*******************

Compile 2.6.7 Kernel w/module-init-tools

Compiling the kernel
Wanted to try out the 2.6 edition kernel? Never knew how to do it? Well heres how! Includes everything from compiling the kernel to configuring your bootloader.

Lets Begin!

cd /usr/src
wget -c http://kernel.org/pub/linux/kernel/v...-2.6.7.tar.bz2
tar xvfj linux-2.6.7.tar.bz2
cd linux-2.6.7
make clean && make mrproper
make oldconfig ( or make menuconfig )
make bzImage
make modules
make modules_install

( i prefer this method rather then just "make" )

If you get alot of errors about .ko modules when you run make modules_install you need to update your modutils package with module-init-tools, see below.

Now to copy the files over for the kernel itself.

cp .config /boot/config-2.6.7
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.7
cp System.map /boot/System.map-2.6.7
mkinitrd /boot/initrd-2.6.7.img 2.6.7

You may experience an error such as this:

/dev/mapper/control: open failed: No such file or directory

if you receive that error run the following commands:

rm -rf /boot/initrd-2.6.7.img
mkinitrd --omit-lvm-modules /boot/initrd-2.6.7.img 2.6.7

Now to add it to the grub / lilo configuration.
[Grub]

Your config will look something like this. Please note you need to follow the format for your current config.

title Red Hat Linux (2.6.7)
root (hd0,0)
kernel /vmlinuz-2.6.7 ro root=LABEL=/
initrd /initrd-2.6.7.img

Add your new entry to the top of the kernel list. Set the default to your working kernel. NOTE: the first kernel in the list is "0". (ex. default=1)

Now exit. Type "grub" at the bash prompt.

savedefault --default=0 --once

issue that at the grub prompt then use quit to exit. Once your reboot you need to go back in and set the default to the 2.6 kernel by setting default=0
[lilo]

Your config will look something like this. Please note you need to follow the format for your current config.

image=/boot/vmlinuz-2.6.7
label=2.6.7
append="root=LABEL=/"
read-only
initrd=/boot/initrd-2.6.7.img

Leave the default as is.

/sbin/lilo -v -v
/sbin/lilo -R 2.6.7

Once it reboots and comes back online you can change the default to be 2.6.7 and /sbin/lilo -v -v

The above tells you how to enable failsafe in your kernels. SO that if the box panics the dc tech does not have to console in he just has to reboot the box.
How to install module-init-tools:

cd /usr/src
wget -c http://www.kernel.org/pub/linux/kern...ols-3.0.tar.gz
tar -zxvf module-init-tools-3.0.tar.gz
cd module-init-tools-3.0
./configure --prefix=""
make moveold
make install
./generate-modprobe.conf /etc/modprobe.conf
How to determine what boot loader you are using?

dd if=/dev/hda bs=512 count=1 2>&1 | grep GRUB
dd if=/dev/hda bs=512 count=1 2>&1 | grep LILO

one of them will kick back something like:

root@w00t [~]# dd if=/dev/hda bs=512 count=1 2>&1 | grep GRUB
Binary file (standard input) matches
root@w00t [~]#

which means its using grub.


*******finish*********************



Here is my grub.conf:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#init=options
#
#boot=/dev/hda

init=0
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.6.11)
root (hd0,0)
kernel /vmlinuz-2.6.11 ro root=LABEL=/ hdb=ide-scsi
initrd /initrd-2.6.11.img
title Red Hat Linux (2.4.20-8smp)
root (hd0,0)
kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ hdb=ide-scsi
initrd /initrd-2.4.20-8smp.img
title Red Hat Linux-up (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdb=ide-scsi
initrd /initrd-2.4.20-8.img

Last edited by TempleOwl1999; 03-31-2005 at 12:17 AM.
 
Old 03-31-2005, 04:17 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
Have you updated all the tools in
Documentation/Changes ?

Have you looked here?
http://www.digitalhermit.com/linux/K...ild-HOWTO.html
 
Old 03-31-2005, 09:19 AM   #3
TempleOwl1999
LQ Newbie
 
Registered: Feb 2005
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for responding..........I tried the URL you sent me already, a week ago. I havent tried to update all the tools in Documentation/Changes? How do I do that? Where do I find it? All I did was install the module - init - tools.
 
Old 03-31-2005, 09:30 AM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
I havent tried to update all the tools in Documentation/Changes?
AHA!

Quote:
How do I do that?
In Documentation/Changes it tells you which versions of which tools you need.
Check them. Kernel HOWTO tells you how.
If not, download and compile them and install them.



Quote:
Where do I find it?
Google of course! Many will be in sourceforge.
 
Old 03-31-2005, 09:38 AM   #5
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
have you looked at this? :
http://kerneltrap.org/node/4762

it might be the same problem. If you can, post the messages before you get the kernel panic so people can have a better idea of what might be going wrong. I think there is a good chance that the file system type of your root partition is not supported by the kernel. You'll have to change some of the kernel configs with
make xconfig
or make menuconfig
 
Old 04-05-2005, 10:58 PM   #6
TempleOwl1999
LQ Newbie
 
Registered: Feb 2005
Posts: 21

Original Poster
Rep: Reputation: 15
Ok here is the message line by line:

Starting balanced_irq
md: Autodetecting RAID arrays
md: autorun
md: ........autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext 2 filesystem).
Red Hat nash version 3.4.42 starting
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
mount: error 19 mounting ext 3
pivot root: pivot_root (/sysroot, /sysroot/initrd)failed:2
unmount /initrd/proc failed:2
freeing unused kernel memory: 296K freed
kernel panic - not syncing: No init found. Try passing init = option to kernel

after seeing the message do you still think I need to change some of the kernel configs with
make xconfig or make menuconfig?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recompiling a kernel Nylex Linux - General 5 09-08-2005 04:48 PM
Recompiling issues 2.6.8.1 on Thinkpad - screen goes blank after boot halgorithm Slackware 2 10-10-2004 04:37 PM
recompiling kernel DaveyB Linux - Newbie 3 08-10-2004 09:45 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
recompiling the kernel gui10 Linux - General 25 12-29-2001 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration