# diskless nodes kernel panic - No init found [SOLVED]

## alexice

Hello everybody,

I am about to setup some diskless nodes to run as a cluster, well and I follow the gentoo howto for diskless nodes. 

When I boot my diskless node I get this error:

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

well I found one posting in the forum which describes the same problem but no answer.

https://forums.gentoo.org/viewtopic-t-179954.html

xanthax mentions that he only had to change some permissions. I had a look at them but could not find something wrong.

Any help or suggestions more than welcome, thanks in advance

alexice

----------

## anonybosh

What method are you using to netboot (NFS, initrd, floppy, etc.)?

----------

## alexice

I use NFS. PXE and dhcp to asign ips and tftp server ...

----------

## Albert_Alligator

 *alexice wrote:*   

> I use NFS. PXE and dhcp to asign ips and tftp server ...

 

Hi, well, the current diskless instructions are very specific to a single type system, and I had to modify mine to build a diskless system.

did you make your /diskless/pxelinux.cfg directory properly? I was getting errors until I made my script name the MAC address of the PXE node and put this inside;

name = 01-50-e0-a1-3f-a6-af

```

DEFAULT /bzImage

APPEND ip=dhcp root=/dev/nfs nfsroot=10.111.11.1:/diskless/node_1

```

Did you remember when you compile your kernel for the slave node that you must make sure that there are no modules compiled in? It won't work if you've got modules compiled in.

Are you still getting that error?

Al

----------

## alexice

I checked the points you mentioned, I still get the error. I checked the kernel, no modules inside but i have the modules support activated.

I also changed the pxelinux.cfg file to the MAC adress of the slave and have the same setup as the code in the last post.

this is the error

```

IP-Config: Complete:

          device=eth0, addr=192.168.1.11, mask=255.255.255.0, gw=192.168.1.11,

         host=node1, domain=, nis-domain=(none)

         bootserver=192.168.1.10, rootserver=192.168.1.10, rootpath=/diskless/192.168.1.11

Looking up port of RPC 100003/2 on 192.168.1.10

Looking up port of RPC 100005/1 on 192.168.1.10

VFS: Mounted root (nfs filesystem) readonly.

Freeing unused kernel memory: 196k freed

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

```

so it looks like the dhcp and the nfs works, or am I wrong?

alexice

----------

## anonybosh

What is the content of the /tftp/pxelinux.cfg/* file the netboot system is using?

Have you tried appending 'init=/sbin/init' to it?

----------

## alexice

I redid the gentoo howto, reworked my /diskless/192.168.1.11 directory and repopulated it. Now it works   :Very Happy:  .

I also made two seperate kernels, one for the master with NFS server enabled and NFS client disabled, and a kernel for the slaves with NFS server disabled and NFS client enabled, of course all other kernel options as in the gentoo howto, which suggests this setup anyway, but I thought I could get away with one kernel for both.

I'm not sure if it was the kernel which had both in it NFS server and client, or if it was reworking the howto, but now it works.

my dhcpd.conf looks like this, I modified it and took out all the etherboot stuff

```

# DHCP configuration file for DHCP ISC 3.0

ddns-update-style none;

# Definition of PXE-specific options

# Code 1: Multicast IP address of boot file server

# Code 2: UDP port that client should monitor for MTFTP responses

# Code 3: UDP port that MTFTP servers are using to listen for MTFTP requests

# Code 4: Number of seconds a client must listen for activity before trying

#         to start a new MTFTP transfer

# Code 5: Number of seconds a client must listen before trying to restart

#         a MTFTP transfer

option space PXE;

option PXE.mtftp-ip               code 1 = ip-address;

option PXE.mtftp-cport            code 2 = unsigned integer 16;

option PXE.mtftp-sport            code 3 = unsigned integer 16;

option PXE.mtftp-tmout            code 4 = unsigned integer 8;

option PXE.mtftp-delay            code 5 = unsigned integer 8;

option PXE.discovery-control      code 6 = unsigned integer 8;

option PXE.discovery-mcast-addr   code 7 = ip-address;

subnet 192.168.1.0 netmask 255.255.255.0 {

  class "pxeclients" {

    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

    option vendor-class-identifier "PXEClient";

    vendor-option-space PXE;

    # At least one of the vendor-specific PXE options must be set in

    # order for the client boot ROMs to realize that we are a PXE-compliant

    # server.  We set the MCAST IP address to 0.0.0.0 to tell the boot ROM

    # that we can't provide multicast TFTP (address 0.0.0.0 means no

    # address).

    option PXE.mtftp-ip 0.0.0.0;

    # This is the name of the file the boot ROMs should download.

    filename "pxelinux.0";

    # This is the name of the server they should get it from.

    # Use the master's IP

    next-server 192.168.1.10;

  }

 # If you are using etherboot with a non specific image

  #class "etherboot" {

  #      if substring (option vendor-class-identifier, 0, 9) = "Etherboot" {

  #      filename "/diskless/vmlinuz";

  #      }

  #}

  pool {

    max-lease-time 86400;

    default-lease-time 86400;

    # This prevents unlisted machines from getting an IP

    range 192.168.1.1 192.168.1.255;

    deny unknown-clients;

  }

  host node1 {

       # Use your slave's MAC address

       hardware ethernet                00:00:00:00:00:00;

       # Give your slave a static IP

       fixed-address                    192.168.1.11;

       server-name                      "master";

       # Use your gateway IP, if required

       option routers                   192.168.1.11;

       # Use your DNS IP, if required

       #option domain-name-servers       192.168.1.1;

       #option domain-name               "mydomain.com";

       # Use your slave hostname

       option host-name                 "node1";

       # Etherboot and pxe boot with a mac specific image

       option root-path                 "/diskless/192.168.1.11";

       #if substring (option vendor-class-identifier, 0, 9) = "Etherboot" {

                        filename "/vmlinuz_arch";

       # } else if substring (option vendor-class-identifier, 0,9) ="PXEClient" {

                        filename "/pxelinux.0";

       # }

  }

}

```

During the bootup of the slave I got errors like keymap not found and so on, so I populated the /diskless/192.168.1.11 with all the stuff needed to boot, e.g. usr/share/keymaps for the keymap problem. I only copied the files really needed to run the boot sequence into /diskless/192.168.1.11/usr and after the /usr is mounted from the master with nfs, everything what should be in /usr is in there, and it works smoothly.

Thanks for all the hints and tips!!   :Smile: 

alexice

----------

