Click to See Complete Forum and Search --> : Custom 2.6.10 in Fedora Core 3


Merovech
03-01-2005, 11:58 PM
I've compiled a custom kernel for my Fedora Core 3 box, and I'm trying unsuccessfully to get it to boot.

I get "Kernel panic - not syncing: no init found" -- I find no error messages before this as far as I can tell.

I'm trying to use GRUB to load this kernel.

I'm not sure if this has to do with my fstab, since "/" is defined as "LABEL=/" rather than "/dev/hda1" (apparently a Fedora convention)-- would it hurt to add a second entry for the root directory? (I think it might, but I could be wrong).

Alternately, what else ought I be doing, and what info should I provide you?

Thanks again for your help!

je_fro
03-02-2005, 12:01 AM
try adding
init=/sbin/init

on the line that has "kernel" in it.

bwkaz
03-02-2005, 07:54 PM
Originally posted by Merovech
I find no error messages before this as far as I can tell. What is before it?

The error you quoted isn't usually the root problem, it's usually just a symptom of something else being wrong. Most of the times that I've seen it, it's been because I forgot to include either the driver for my root filesystem, or the driver for my IDE chipset. You CAN'T build these as modules (unless you make a new initrd), they both HAVE to be built in.

soulestream
03-02-2005, 08:01 PM
did you do a default install of fedora the first time.

it wants to use logical volumes by default. I dont know if that has anything to do with it, but when I installed FC3 the other day i noticed that.



soule

Merovech
03-02-2005, 08:40 PM
1) tried setting the init=/sbin/init with no success.

2) yes this was a stock FC3 setup, but as far as I know does not use logical volumes: I set up all the partitions myself.

3) where can I find an error log from my last failed boot? dmesg shows me only my current working boot.

~W

retsaw
03-02-2005, 09:09 PM
Originally posted by Merovech
I'm not sure if this has to do with my fstab, since "/" is defined as "LABEL=/" rather than "/dev/hda1" (apparently a Fedora convention)-- would it hurt to add a second entry for the root directory? (I think it might, but I could be wrong).

Adding a second entry would probably be bad, but replacing "LABEL=/" with "/dev/hda1" won't cause any problems.

Have you added "root=/dev/hda1" after the kernel in your GRUB conf?

Merovech
03-02-2005, 09:20 PM
Mostly because I wasn't paying attention to what I was doing.

Turns out root is /dev/hda3 <--Whoops!

Anyhoo, I made the requisite correction to my grub.conf file and fired it up again. This time, I got as far as:

Freeing unused kernel memory: 176k freed.
Warning: unable to open an initial console.

And then the thing freezes.

As far as I can see on screen there are no error messages preceeding this (new) failure.

Perhaps my kernel is too large, with a bzImage weighing in at just a hair under 2MB -- (2047Kb)?

Other thoughts?
I really appreciate the feedback so far!

~W

bwkaz
03-03-2005, 07:50 PM
Originally posted by Merovech
Freeing unused kernel memory: 176k freed.
Warning: unable to open an initial console.

And then the thing freezes. I've seen this when I didn't have a /dev/console file available at boot time. Were you running devfs before, that you maybe didn't have a /dev/console file sitting on your disk? Or might it have been deleted?

(BTW, you'll also need a /dev/zero file, but if you're using udev you won't need anything else, assuming "udevstart" is run extremely early in the bootscripts.)

Try booting to a rescue CD, then mount hda3 somewhere, and check /mount/point/you/used/dev/ to see whether it has "console" and "zero" files. If it doesn't, you can create them with:

mknod /mount/point/you/used/dev/console c 5 1
mknod /mount/point/you/used/dev/zero c 1 5
chmod 0622 /mount/point/you/used/dev/console
chmod 0666 /mount/point/you/used/dev/zero

(The chmod on console probably isn't required, but AFAIK it shouldn't hurt either.)

Then, umount /dev/hda3 and try booting to it.

Merovech
03-18-2005, 07:05 PM
So it turns out to be all caused by udev, which creates /dev/console and /dev/zero dynamically, after the kernel loads up. Unfortunately, the kernel needs console before udev has a chance to create it!

The solution that I have put together is an initrd.img to ease the kernel out and let udev come in and do its job, then pivot the root from ram to the actual root (much like the Fedora stock installation).

Another solution, as indicated above, would have been to mknod a permanent /dev/zero and /dev/console onto the root partition after booting from something like a liveCD. That way on future boots the kernel has what it needs before udev loads, and udev will be able to deal with the existing nodes.

Thanks for your help, all. I'm finally up and running on my first self-compiled kernel.

~W