LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-10-2003, 03:54 AM   #1
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Rep: Reputation: 30
kernel panic, init related, found cause, but cant fix...help :)


hi, i reinstall my mdk 9.0, just try to compile kernel, and make sure i can learn from it. but looks like i got problem, heres what i done so far:

1) downloaded source, 2) make xconfig, 3)make dep 4) make clean 5) make bzImage 6) cp bzImage to /boot,
7) fix lilo.conf under /etc ---> 8) lilo -v, 9) lilo -q 10) reboot

boot=/dev/hda
map=/boot/map
default=allen
keytable=/boot/us-latin1.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
ignore-table
image=/boot/bzImage.09dec03
label=allen
root=/dev/hdb1
initrd=/boot/initrd.img
append="devfs=mount"
read-only

reboot computer, kernel panic, cant mount this and that.... unable to load init, pass option....

then i try the other method: 1) make dep, 2) make bzImage 3) make modules 4)make modules_install, 5) make install

and i got the follower error msg at the end of compile:

Root device is (3, 65)
Boot sector 512 bytes.
Setup is 4794 bytes.
System is 858 kB
sh -x ./install.sh 2.4.19-36mdkcustom bzImage /usr/src/linux-2.4.19-36mdk/System.map ""
+ '[' -x /root/bin/installkernel ']'
+ '[' -x /sbin/installkernel ']'
+ exec /sbin/installkernel 2.4.19-36mdkcustom bzImage /usr/src/linux-2.4.19-36mdk/System.map ''
mke2fs 1.32 (09-Nov-2002)
mke2fs 1.32 (09-Nov-2002)
look like there was a problem, the default vmlinuz version is not the same
of the initrd
which mean you have a mdk kernel and not a mdk initrd you may go in trouble
make[1]: Leaving directory `/usr/src/linux-2.4.19-36mdk/arch/i386/boot'
[root@localhost linux-2.4.19-36mdk]#


looks like compiling kernel is quite an art. one must really know whats going on.
thanks for ur help

p.s: there was no compile error, when i was doing make dep and bzImage

Last edited by sirpelidor; 12-10-2003 at 04:10 AM.
 
Old 12-10-2003, 04:06 AM   #2
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
Did you leave out make modules and make modules_install from your first attempt? Maybe that's all that was missing.

The second message might not be an actual error, just do a mkinitrd to match your new kernel and update your lilo.conf. I think you can even leave out initrd support on most systems now. But get a second opinion on that!

I never do make install, I prefer to just copy over the bzImage, and edit lilo.conf/grub.conf myself.

Doing a make mproper at the start of the compilation process means you're starting with a clean sheet and not carrying anything over from your previous compilation. Make sure to back-up your .config file first though so you don't have to go through everything in xconfig every time.

Also, if you change the EXTRAVERSION= line in Makefile, you can keep each of your compilations separate. You can put in anything you like, e.g. the date/time, a keyword to remind you about a major change, and it really helps in keeping track of what you've tried.

Good luck,

John
 
Old 12-10-2003, 05:18 AM   #3
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
instead of make install, I usually copy the files manually myself, but that's a different question

however, this seams to be related an initrd issue. I'm not familliar with mandrake, but does it use an initrd image? this is a ramdisk image, it can be used by the kernel to load certain files before it can access the hard drive. I've used initrd once to store a nice console background image there, gentoo linux also seams to use it to store a complete root partition structure, I guess because devfs needs some special treatment before it can be used (gentoo uses devfs)


I see you have a devfs line in your lilo.conf. I find this a little confusing, did you try to use devfs, or was that line already there? Did you add another image= entry to lino? please post your entire lilo.conf where, inside a code block.

Last edited by yapp; 12-10-2003 at 05:19 AM.
 
Old 12-10-2003, 02:08 PM   #4
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Original Poster
Rep: Reputation: 30
thanks for ur reply jkobrien and yapp. sorry i couldn't reply last night cause for some weird reason, my box magically lost internet access !? i was unable to check msg til i arrive from work today heh.

this is what i did after i login under failed safe mode: i go back to /etc/lilo.conf, i put default=linux back, then i put image=/boot/vmlinuz back just like before it was modified. lilo -v, lilo -q, reboot system, now my system reboot again but it won't connect to internet anymore.... due to the fact that i was able to boot the system again with my old vmlinuz, i think it has to do with image problem? i don't know...

ok, jkobrien, i didn't do make modules and make modules_install when i first try, because kernel-HOWTO didn't say so. i didn't know if it has a impact on it? what does make modules and make modules_install really doing?

would u plz explain a little about "make mproper" what does it do ? (can't check man page now heheh)

as i said, i clean re-install mdk just try to learn how compile kernel work, i fugred this is the final exame i need to take for me to pass my linux newbie level heh.


yapp, thanks for ur reply. since u and jkobrien both agree not to use "make install", i will make sure i cross that outta my list and according to the research i've been looking through google, i think it maybe a initrd problem, because i was able to boot system again after i put default=linux and /boot/vmlinuz back to my lilo.conf

as for devfs, i didn't know exactly what it does. it got it from mandrake-update, it was 1 of those optional update packages i got, ... i didn't have it before, as for if mdk uses initrd image? i don't know, are there ways to check? when i go into /initrd, there's nothing in there .....

i will go ahead and get my lilo.conf post tonight, thanks for ur help, learning how to compile kernel seems more fun then learn how to compile software from source heheh
 
Old 12-10-2003, 04:17 PM   #5
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Original Poster
Rep: Reputation: 30
hum... i slacked off alot today trying to figure out what i can do, i think i just found out this has to do with LILO problem, not really a kernel problem?
 
Old 12-10-2003, 11:26 PM   #6
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Original Poster
Rep: Reputation: 30
hi yapp, heres the /etc/lilo.conf, the one which cost me crash. your advise and help is appreicated

(i have 2 hd, win98 on first one, and linux on second one)

boot=/dev/hda
map=/boot/map
default=allen
keytable=/boot/us-latin1.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
ignore-table
image=/boot/bzImage.09dec03
label=linux
root=/dev/hdb1
initrd=/boot/initrd.img
append="devfs=mount"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hdb1
initrd=/boot/initrd.img
append="devfs=nomount failsafe"
read-only
other=/dev/hda1
label=dos
table=/dev/hda
other=/dev/fd0
label=floppy
unsafe
[allen@localhost allen]$
 
Old 12-11-2003, 06:24 AM   #7
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
Hi,

There's a good thread on this board about how to recompile. Probably worth checking out, as the LDP HOW-TO is under review at the moment.

You can have certain parts of your kernel as modules, which means they're only loaded up when they're needed. My understanding of it is that this makes your kernel that bit smaller and faster. So "make module" compiles all the code you need for that and "make modules_install" copies all the files over to /lib/modules/<kernel_version>, and probably does some other stuff that I'm not aware of. You can disable modules (first or second step of make xconfig), in which case neither of these two steps apply.

"make mrproper" cleans up _all_ the files generated from your last compilation. "make clean" just cleans up most of them. mrproper is named after some kind of cleaning product - more geek humour!

It seems to me, looking back at your orginal post, that you left out, or didn't put into your lilo.conf, an updated initrd. Again, this is something that can be left out during compilation, but it might be that your system requires it. You can check this under "man mkinitrd" but it's something like...

cd /boot
mkinitrd <image_name> <kernel_version>

The kernel version is the name of the directory under /lib/modules (actually it's the name from the first few lines of the file /usr/src/linux/Makefile) and the image name is whatever you want, but it makes sense to name it something like initrd_<version>.img. When you update your lilo.conf, update the line about the initrd file.

Anyway, hope that helps (and makes some kind of sense!). Well done on sticking with this. You're right that learning how to compile your kernel advances you up a grade towards guru-hood . I think just about everyone has difficulties with their first attempt the difference is whether they see it through or not.

John
 
Old 12-24-2003, 07:28 PM   #8
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Original Poster
Rep: Reputation: 30
jkobrien, thank you very much for showing me that thread, that mini-howto is so useful, i found where my problem was.

the first few steps are same as kernel-howto. but kernel howtos never tells us about modify initrd, change System.map, and change vmlinuz.

all it said was about putting vmlinuz in lilo.conf, well... after i added those extra steps on it. IT COMPILED AND RUN!!! YAY

----salute to Linux and LQ----
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need to fix kernel panic: No init found dima789 Linux - Software 16 08-10-2004 10:53 AM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
kernel panic: no init found. Try passing init= option to kernel rroorroo Red Hat 7 03-07-2004 04:19 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM
Compiled own kernel and got: Kernel panic: No init found. Try passing init= option to fbl Linux - General 12 01-14-2003 03:38 AM


All times are GMT -5. The time now is 10:45 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration