Diskless boot: Unable to locate disklessrc

General support questions including new installations
Posts: 7
Joined: 2009/11/06 14:50:46

Diskless boot: Unable to locate disklessrc

Postby tuco » 2010/10/01 03:34:10

I am attempting to set up a diskless boot for a set of machines and have basically followed the process outlined in http://www.linuxquestions.org/questions ... ter-765393 . I have pretty much everything set up but am encountering a problem during the boot. In essence, the diskless client starts booting and eventually hangs and gives the following message.

Write protecting the kernel read-only data: 504k
Failed to execute /init
Failed to execute disklessrc. Attemtping defaults...
Kernel Panic - not syncing: No init found. Try passing init= option to kernel.

My pxelinux.cfg file for this system is:

default centos5ssi

label centos5ssi
kernel centos5ssi/vmlinuz
append initrd=centos5ssi/initrd.img root=/dev/ram0 init=disklessrc NFSROOT= ramdisk_size=32768 ETHERNET=eth0 SNAPSHOT=node003

Here is some background on the setup. The machine that is acting as the server is an old machine that presently has CentOS 5.4 (i386) installed. On the client, I am attempting to boot and run CentOS 5.5 (x86_64). I've got DHCP and TFTP set up on the server which all seems to be working. During the client boot, it gets its IP address from the server and I can see that it is passed the vmlinuz and initrd.img file.Then as mentioned above it eventually hangs. I have mounted the initrd.img file (after uncompressing and cpio extraction) and see that there is a "init" file present in the top level directory but there is no file named "disklessrc". However, the contents of the "init" file are the same as /usr/share/system-config-netboot/diskless/disklessrc that is present on the server machine. Also, I have confirmed that busybox-anaconda is installed on both client and server.

Now as a comparison, a few months earlier, someone else used the same server machine but with a different client machine and was using CentOS 5.4 (i386) for each and was able to get a diskless boot to work. I was, in fact, able to use this setup for the present client and it is able to boot. (However, for my present client I need to have a 64-bit OS installed and want to make sure the proper drivers are installed). I took a look at the initrd.img that was created by pxeos for this earlier setup (config. A) and compared somethings with the initrd.img from my present setup (config. B). I noticed that the /lib directory from config. A had several libraries present while the /lib directory from config. B was completely empty except for a modules subdirectory. I came across an old bugzilla report (2005 timeframe: https://bugzilla.redhat.com/show_bug.cgi?id=135411) that seemed to indicate that due to the lack of libraries present in the initrd that bash was unable to get started and resulted in an Kernel panic and error (i.e. unable to find disklessrc) similar to that mentioned above.

Does anyone know why the pxeos command is not copying over all the necessary files when it creates the initrd.img in this present setup? Is there any reason that having the server be a 32-bit OS would cause problems/issues when trying to create a setup for a 64-bit client. (The initial client image was setup using 64-bit CentOS 5.5 and then rsync'd over to the server NFS diskless export directory.) As I mentioned above, the server in this case is an old machine with only a 32-bit processor. Ultimately I would like to know what to try next.

Posts: 2
Joined: 2010/10/06 07:46:55

Re: Diskless boot: Unable to locate disklessrc

Postby nixx » 2010/10/06 08:12:18


Known issue. There a bug @system-config-netboot-cmd rpm. Mean, that you makes preparations correctly, and without any errrors.

I'm using CentOS 5.3 i386 with diskless boot over network for flashing BIOS on a Intel's rack-mountable servers.

When all preparations done, I execute
[root@dc-iso system-config-netboot]# /usr/sbin/pxeos -a -p NFS -D 1 -k 2.6.18-164.el5PAE -s -L /home/tftpboot/diskless/i386/CentOS5.3_sr1500_BIOS/ BIOS1500
[root@dc-iso system-config-netboot]# /usr/sbin/pxeboot -a -O BIOS1500

[root@dc-iso system-config-netboot]# cp /tftboot/linux-install/BIOS1500/* /tftpboot/diskless/i386/CentOS5.3_sr1500_BIOS/

Its a custom environment I needed. So I must slightly copy/edit ;) Finally - edit a pxelinux.cfg/default
[root@dc-iso system-config-netboot]# vim /tftpboot/pxelinux.cfg/default
# Intel Utilites
MENU BEGIN Intel Platform Utilites
MENU TITLE Intel Platform Utilites
LABEL sr1500bios
MENU LABEL Intel sr1500 BIOS Upgrade (BIOS98,BMC65,FAL48)
kernel diskless/i386/CentOS5.3_sr1500_BIOS/vmlinuz
append initrd=diskless/i386/CentOS5.3_sr1500_BIOS/initrd.img root=/dev/ram0 init=disklessrc NFSROOT= ramdisk_size=30000 ETHERNET=eth0 ramdisk_blocksize=1024

Issue bolded. mkinitrd makes a memdisk image with blocksize=1024 bytes (RAMFS), when kernel expects ext2fs with 2K-blocks.

Just add ramdisk_blocksize=1024 to a initrd string - it helps in my case.

PS. Sorry for my ugly English ;)

Posts: 7
Joined: 2009/11/06 14:50:46

Re: Diskless boot: Unable to locate disklessrc

Postby tuco » 2010/10/06 15:41:05

I had already tried adding the ramdisk_blocksize=1024 option and that didn't make any difference.

As an additional data point. I went through the process and took one of the 64-bit machines and set it up to be a server. Everything is basically the same as the 32-bit server machine. I copied over the same diskless root system files but then used pxeos and pxeboot on the 64-bit machine to create the initrd.img and boot file. If I then boot the diskless client using this 64-bit machine as the server it boots up ok.

This however doesn't necessarily mean the problem is solved. This was just a test setup to work through the process of getting a diskless client to boot.

Posts: 2
Joined: 2010/10/06 07:46:55

Re: Diskless boot: Unable to locate disklessrc

Postby nixx » 2010/10/07 15:45:07

Sorry, I forgot one important thing.

It's about system-config-netboot-cmd rpm. Seems to be that it was installed manually by myself from RedHat repo, because it was also buggy when I installed Centos 5.3. Nevertheless this rpm updated at current release (5.5).

$ cat /etc/redhat-release
CentOS release 5.3 (Final)

Try to check version:

$ yum info system-config-netboot-cmd
Loaded plugins: fastestmirror
Installed Packages
Name : system-config-netboot-cmd
Arch : noarch
Version :
Release : 1.el5
Size : 1.3 M
Repo : installed
Summary : network booting/install configuration utility
URL : http://www.redhat.com/
License : GPLv2+
Description: system-config-netboot is a utility which allows you to configure diskless environments and network installations.
: This package contains only command line utilities.

If you uses an older version (or maybe Centos version of RPM - can't remember exactly) - there is a bug with a correct building init scripts for an initrd.img (its don't creates disklessrc init-script). Try to update that package with a RedHat repo.

I think, thats you already cheсked correctness of transfer initrd.img via TFTP...

Posts: 1
Joined: 2011/02/04 22:46:48

Re: Diskless boot: Unable to locate disklessrc

Postby cngp » 2011/02/04 22:50:42

Did you ever come to any resolution on this problem?
It is the exact same situation and problem I am having.