Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
Hi I just attempted to compile a kernel for the first time, but when I boot, I get the message Code: Kernel Panic: No init found. Try passing init= option ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Illinois, USA
    Posts
    111

    Kernel Panic


    Hi I just attempted to compile a kernel for the first time, but when I boot, I get the message
    Code:
    Kernel Panic: No init found.  Try passing init= option to kernel
    right after root is mounted in readonly and kjournald is started

    Here's part of my grub.conf
    Code:
    title Fedora Core (2.6.12.3)
            root (hd1,0)
            kernel /boot/vmlinuz-2.6.12.3 ro root=/dev/hdb2 init=5 video=vesafb:ywrap,mtrr vga=791
            initrd /boot/initrd-2.6.12.3.img
    I think I've seen some threads about this, but none that seem to help me.
    Any help is appreciated Thanks in advance.

  2. #2
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471

    Re: Kernel Panic

    Quote Originally Posted by hamburger123
    Here's part of my grub.conf
    Code:
    title Fedora Core (2.6.12.3)
            root (hd1,0)
            kernel /boot/vmlinuz-2.6.12.3 ro root=/dev/hdb2 init=5 video=vesafb:ywrap,mtrr vga=791
            initrd /boot/initrd-2.6.12.3.img
    Your kernel line says 'init=5', this should be 'init=/sbin/init' or wherever your init is located, the runlevel should just be a case of adding it to the end of the kernel line
    Code:
    kernel /boot/vmlinuz-2.6.12.3 ro root=/dev/hdb2 init=/sbin/init video=vesafb:ywrap,mtrr vga=791 5

  3. #3
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Illinois, USA
    Posts
    111
    I changed the line in my grub.conf like you said but it still isn't working
    Here is part of my grub.conf:
    Code:
    title Fedora Core-up (2.6.9-1.667)
            root (hd1,0)
            kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ vga=791
            initrd /boot/initrd-2.6.9-1.667.img
    title Fedora Core (2.6.12.3)
            root (hd1,0)
            kernel /boot/vmlinuz-2.6.12.3 ro root=/dev/hdb2 init=/sbin/init video=vesafb:ywrap,mtrr vga=791 5
            initrd /boot/initrd-2.6.12.3.img
    The top entry is my working kernel that I am currently using and the second one is the one that I can't get to boot.

    The error message I get looks something like this:
    Code:
    Warning: Unable to start an initial console
    Kernel Panic -not syncing: No init found.  Try passing init= option to kernel
    Thanks!

  4. #4
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471
    If the top one works, why not try changing root=/dev/hdb2 for root=LABEL=/ like the other one has, see if that helps

  5. #5
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Illinois, USA
    Posts
    111
    I tried that but it said something like:
    Code:
    Cannot open root device or unknown block(0,0)
    Please append a correct "root=" boot option

  6. #6
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471
    What kind of hard drive is it

  7. #7
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Illinois, USA
    Posts
    111
    From 'hdparm -I /dev/hdb' part of it says:
    Code:
    /dev/hdb:
    
    ATA device, with non-removable media
            Model Number:       WDC WD200BB-75AUA1
            Serial Number:      WD-WMA6Y5318103
            Firmware Revision:  18.20D18
    Standards:
            Supported: 5 4 3 2
            Likely used: 6
    Plus a bunch of other stuff.

    lshw says:
    Code:
     *-disk:1
                       description: ATA Disk
                       product: WDC WD200BB-75AUA1
                       vendor: Western Digital
                       physical id: 1
                       bus info: ide@0.1
                       logical name: /dev/hdb
                       version: 18.20D18
                       serial: WD-WMA6Y5318103
                       size: 18GB
                       capacity: 18GB
                       capabilities: ata dma lba iordy smart pm
                       configuration: mode=udma5 smart=on
    hope that helps.

  8. #8
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471
    First try setting your boot loader like this;
    Code:
    title Fedora Core-up (2.6.9-1.667)
            root (hd1,0)
            kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ vga=791
            initrd /boot/initrd-2.6.9-1.667.img
    title Fedora Core (2.6.12.3)
            root (hd1,0)
            kernel /boot/vmlinuz-2.6.12.3 ro root=LABEL=/ vga=791
            initrd /boot/initrd-2.6.12.3.img
    With both exactly the same, then try booting the kernel, since the first one works and the second kernel is identically set up, if you still get errors than we can work out from that, that the kernel still has some things which need to be configured. Post any error messages you get

  9. #9
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Illinois, USA
    Posts
    111
    Quote Originally Posted by Krendoshazin
    Code:
    title Fedora Core (2.6.12.3)
            root (hd1,0)
            kernel /boot/vmlinuz-2.6.12.3 ro root=LABEL=/ vga=791
            initrd /boot/initrd-2.6.12.3.img
    With both exactly the same, then try booting the kernel, since the first one works and the second kernel is identically set up, if you still get errors than we can work out from that, that the kernel still has some things which need to be configured. Post any error messages you get
    So here are the errors I'm getting:
    Code:
    VFS: Cannot open root device "LABEL=/" or unknown-block(0,0)
    Please append a correct "root=" boot option
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

  10. #10
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    144
    Quote Originally Posted by hamburger123
    Code:
    Warning: Unable to start an initial console
    Kernel Panic -not syncing: No init found.  Try passing init= option to kernel
    It sounds to me like you've forgotten to include vga console support into the kernel, which AFAIK is needed for pretty much any linux application to work.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •