# [**SOLVED**] Request for an "init=" on boot

## Odd_Bloke

I've just installed Gentoo, and downloaded the source for kernel 2.6.15-gentoo-r1. I have configured and installed this (to the best of my knowledge) as detailed in the Installation Guide. However, whenever I attempt to boot using it, I get a kernel panic with a complaint about there being no init. The error message suggests I try using 'init=" so I tried both 'init=3' and 'init=default' at the end of my boot options (though only within GRUB) to no avail, at which point my limited knowledge failed.

I'd greatly appreciate someone helping me out (or at least giving me a shove in the general direction I should be looking, if it's something blindingly stupid. I didn't choose Gentoo to have my hand held (though I may take that back later  :Razz: ))

Cheers,

DanLast edited by Odd_Bloke on Mon Feb 13, 2006 7:20 am; edited 1 time in total

----------

## paulbarker

Have you installed an init program. Boot from the cd and look for the file "/sbin/init" on your gentoo system. The "init=xxx" line is not a runlevel but the location of the init program. I'm not 100% sure of this but I'm pretty confident.

Paul Barker

----------

## Odd_Bloke

 *paulbarker wrote:*   

> Have you installed an init program. Boot from the cd and look for the file "/sbin/init" on your gentoo system. The "init=xxx" line is not a runlevel but the location of the init program. I'm not 100% sure of this but I'm pretty confident.

  I neglected to mention that I already have a booting 2.6.12 kernel (which is what I'm running on ATM), but I will try this as soon as I'm able to reboot.

Thanks,

Dan

----------

## nixnut

Post more of the error output. It probably has a bit more useful info.

And post your grub.conf and fstab.

----------

## Earthwings

Sounds like you're using an initrd but don't have the init=/linuxrc parameter in the kernel line in grub.conf. Please post grub.conf and the exact error message if that doesn't help.

Moved from Kernel & Hardware to Installing Gentoo - you'll probably get more help here.

----------

## Odd_Bloke

The error message verbatim reads:

```
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
```

My grub.conf is as follows:

```
default 0

timeout 1

title=Gentoo Linux 2.6.15

root (hd0, 0)

kernel /boot/linux-2.6.15-gentoo-r1 root=/dev/sda3 init=/linuxrc

title=Gentoo Linux 2.6.12

root (hd0, 0)

kernel /boot/linux-2.6.12-gentoo-r6 root=/dev/sda3
```

Another thing I've noticed is that /boot has stopped mounting at boot (if you see what I mean).

Dan

----------

## Earthwings

Remove the init=/linuxrc from the kernel line. It is needed when you have an initrd image, because the kernel has to call the linuxrc command from the initrd which later calls /sbin/init (the "real" init). If you don't use an initrd image (which you do not do according to your grub.conf) then you have to omit it init= part. The kernel will call /sbin/init on its own.

----------

## Odd_Bloke

 *Earthwings wrote:*   

> Remove the init=/linuxrc from the kernel line. It is needed when you have an initrd image, because the kernel has to call the linuxrc command from the initrd which later calls /sbin/init (the "real" init). If you don't use an initrd image (which you do not do according to your grub.conf) then you have to omit it init= part. The kernel will call /sbin/init on its own.

  That part has only been added in due to recommendations within this thread. With or without it, the problem stands...

UPDATE:

I've tried deleting the new kernel and starting over. Having installed the newly-compiled kernel into /boot, the system will boot to exactly the same point as before, but display no error message.

----------

## Odd_Bloke

This is a combined bump and post of my fstab:

```

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to

# switch between notail / tail freely.

#

# See the manpage fstab(5) for more information.

#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda1               /boot           ext2            noauto,noatime  1 2

/dev/sda3               /               ext3            noatime         0 1

/dev/sda2               none            swap            sw              0 0

/dev/cdroms/cdrom0      /mnt/cdrom      auto            noauto,ro       0 0

/dev/fd0                /mnt/floppy     auto            noauto          0 0

/dev/sdb1               /mnt/backup     ext3            noauto,noatime  0 0

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

```

----------

## Zakharov

Are you sure the right options in the kernel are compiled in, e.g. the drivers for your harddisk controller and the filesystem drivers (ext2 and ext3 in your case)?

----------

## Odd_Bloke

 *Zakharov wrote:*   

> Are you sure the right options in the kernel are compiled in, e.g. the drivers for your harddisk controller and the filesystem drivers (ext2 and ext3 in your case)?

  AFA I can tell, they are (both fs and SATA), though I've double checked and am now compiling again in the hopes that this will help.

----------

## Odd_Bloke

**BUMP**

The recompile did not help matters at all. I've tried booting the new kernel up a couple of times (because I don't have sound support compiled into this kernel and am having to resort to singing  :Shocked: ) and I've noticed that when I pass "init=/sbin/init" in GRUB, there is an additional error line telling me that it was unable to run it and is checking defaults...

Cheers,

Dan

----------

## jmbsvicetto

Hi.

Are you still getting the same error? Are your /etc/fstab and /boot/grub/grub.conf the same you've posted?

Please post 10 to 15 lines before the error message. Are you still able to boot with the 2.6.12 kernel?

----------

## Odd_Bloke

 *jmbsvicetto wrote:*   

> Are you still getting the same error?

  Yup, identical.

 *Quote:*   

> Are your /etc/fstab and /boot/grub/grub.conf the same you've posted?

  fstab is identical and grub.conf is:

```
default 1

timeout 3

title=Gentoo Linux 2.6.15

root (hd0,0)

kernel /boot/linux-2.6.15-gentoo-r3 root=/dev/sda3

title=Gentoo Linux 2.6.12

root (hd0,0)

kernel /boot/linux-2.6.12-gentoo-r6 root=/dev/sda3

title=GenKernel

root (hd0,0)

kernel /boot/kernel-genkernel-x86_64-2.6.15-gentoo-r1 root=/dev/sda3 initrd=/boot/initramfs-genkernel-x86_64-2.6.15-gentoo-r1

```

 *Quote:*   

> Please post 10 to 15 lines before the error message. Are you still able to boot with the 2.6.12 kernel?

  I'll reboot and copy them down, but I'm fairly sure this is at the point the kernel hands off to init to do it's thing.

Thanks for the quick reply and the help,

Dan

----------

## Odd_Bloke

The exact output before this error is as follows, preceded by some ALSA and some network stuff:

```

powernow-k8: Found 1 AMD Athlon 64/Opteron processors (version 1.50.4)

powernow-k8: BIOS error - no PSB or ACPI _PSS objects

ACPI wakeup devices:

PCI0 PS2K UARI AC97 USB1 USB2 USB3 USB4 EHCI PWRB SLPB

ACPI: (supports S0 S1 S3 S4 S5)

kjournald starting. Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Freeing unused kernel memory: 180k freed

Kernel panic - not syncing: No init found. Try passing init= option to kernel.

```

I hope this helps,

Dan

----------

## jmbsvicetto

From that output, this clearly isn't a GRUB error, but a kernel error.

Repeating previous posts, did you enable the support in the kernel <*> and not as a module <M> for the disk controller and the / filesystem? Are you using udev?

Are you able to boot with the 2.6.12 kernel?

----------

## Odd_Bloke

 *jmbsvicetto wrote:*   

> Repeating previous posts, did you enable the support in the kernel <*> and not as a module <M> for the disk controller and the / filesystem?

 Yup, on both counts. Not to mention the fact that the kernel says that it has mount an ext3 partition, which presumably means both are available to the kernel.  *Quote:*   

> Are you using udev?

  I can confidently say I haven't a clue.  :Razz:  How do I check this out?

 *Quote:*   

> Are you able to boot with the 2.6.12 kernel?

  Yup, I'm running on it ATM.

----------

## jmbsvicetto

 *Odd_Bloke wrote:*   

>  *jmbsvicetto wrote:*   Repeating previous posts, did you enable the support in the kernel <*> and not as a module <M> for the disk controller and the / filesystem? Yup, on both counts. Not to mention the fact that the kernel says that it has mount an ext3 partition, which presumably means both are available to the kernel.

 

Yes, I presumed that. If you hadn't compiled the drivers in the kernel, you should be getting the "unknown block device" message, but I just wanted to check.

 *Odd_Bloke wrote:*   

>  *Quote:*   Are you using udev?  I can confidently say I haven't a clue.  How do I check this out?

 

Well, you should look at emerge -s udev. Is it installed? Then you should make sure that you have RC_DEVICES set to auto or udev in /etc/conf.d/rc - grep RC_DEVICES /etc/conf.d/rc.

Have you tried booting with a more recent kernel? Have you tried a 2.6.14 kernel?

----------

## Odd_Bloke

 *jmbsvicetto wrote:*   

> Well, you should look at emerge -s udev. Is it installed?

 Yup.  *Quote:*   

> Then you should make sure that you have RC_DEVICES set to auto or udev in /etc/conf.d/rc

  Set to auto.

 *Quote:*   

> Have you tried booting with a more recent kernel? Have you tried a 2.6.14 kernel?

  I have not. What emerge command should I give it for a 2.6.14 kernel?

----------

## jmbsvicetto

Whenever you want to install a specific package version, you should do emerge -av =package-version. So if you want to install the 2.6.14-r5 kernel, you should do emerge -av =gentoo-sources-2.6.14-r5.

----------

## Odd_Bloke

While installing the 2.6.14 kernel sources, I noticed and interesting and potentially relevant message at the end of the emerge proces:

```

As of 2.6.13 the support for devfs has been removed.

You will be required to either manage a static /dev

or to ensure that udev is starting on boot.

```

As the only booting kernel I have is pre-2.6.13 (2.6.12 to be exact), and the problems I have are at the udev/dev/devfs stage of the booting process on a post 2.6.13 (2.6.15 to be exact) kernel, this could very well be the problem.

How do I absolutely ensure that I will not be attempting to use devfs and that udev will start on boot? I have tried simply appending 'udev' to the end of my GRUB line for the specific kernel, to no avail.

Dan, hopeful

----------

## jmbsvicetto

Well, since post 2.6.12 kernels do not include devfsd in the kernel tree, you simply won't be able to use it - afaik. To use udev, you need to emerge it and configure the init scripts to use it - the /etc/conf.d/rc script. You should check if you have hotplug and coldplug installed and added to the boot and default run-level. I've been told that it isn't necessary to have hotplug and coldplug, but I'm convinced that unless you really want to do things by hand, you do need to have them.

----------

## Odd_Bloke

 *jmbsvicetto wrote:*   

> Well, since post 2.6.12 kernels do not include devfsd in the kernel tree, you simply won't be able to use it - afaik. To use udev, you need to emerge it and configure the init scripts to use it - the /etc/conf.d/rc script. You should check if you have hotplug and coldplug installed and added to the boot and default run-level. I've been told that it isn't necessary to have hotplug and coldplug, but I'm convinced that unless you really want to do things by hand, you do need to have them.

  Even with all this I'm not able to boot.

In addition, I've recompiled the 2.6.12 kernel with options as close to what I had for the 2.6.15 kernel, and it has booted without issue. That said, I can boot a genkernel version of 2.6.15 and that will boot up, although there are still issues with it.

Finally, as this is definitely a kernel issue, I'm going to start a new topic in the Kernel forum, as it would be more appropriate there.

EDIT: The new topic can be found at https://forums.gentoo.org/viewtopic-t-432741.html.

Thanks for the help thus far,

Dan

----------

## Deathwing00

Moved from Installing Gentoo to Kernel & Hardware.

Moved by request.

----------

## js78

Hello ,

I have exactly the same problem but  ELF support is in my kernel and it does not resolv the problem:

..no init found try passing= ...

I succeed to boot with a genkernel initramfs but not with my kernel  :Sad: 

Someone have an idea?

thanks

----------

## smadasam

ELF was the fix for me too!  :Very Happy:  I guess this is what happens when you don't what ELF is when you are compiling your kernel!  Does this mean that I sholdn't be compiling my own kernel?  I know what it is now!  That is why I keep on building my own kernels.

----------

