Network booting couldn't find kernel image

12,130

Solution 1

The kernel image (and initrd) must be located relative to the root folder. If you follow that how-to, then you have configured the following parameters:

  • DHCP server is configured to use /tftpboot/
  • The boot image is /pxelinux.0 (relative to the TFTP root directory, so the actual path is /tftpboot/pxelinux.0)
  • PXELinux (part of syslinux) looks for its configuration in the /pxelinux.cfg/ directory. If it does not find a file matching the client MAC address or GUID, then it will fallback to a file named default (/tftpboot/pxelinux.cfg/default) in your case.
  • That file should contain something like:

    LABEL linux
      KERNEL vmlinuz
      INITRD initrd
      APPEND root=...
    

    The vmlinuz and initrd files are then looked up relative to the TFTP root directory, so ensure that the file /tftpboot/vmlinuz and /tftpboot/initrd exist. You can find these files in /boot/.

I would also suggest not to use /tftpboot/ as root directory for TFTP files, but /srv/tftpboot/. That is a more suitable location for site-specific data.

For debugging, be sure to have a look at your syslog. I have used the dnsmasq DHCP server which sends its logs to syslog (/var/log/syslog). ISC's DHCP sever should do something similar.

Solution 2

I know this thread is older than dirt but I wanted to add in that my problem was SELinux / Apparmour related. Note that TFTP PXE booting won't say "permission denied." Instead it will say "couldn't find" which can be confusing. Make sure permissions are correct including SELinux and Apparmour.

Share:
12,130

Related videos on Youtube

Andreikkaa
Author by

Andreikkaa

Love sportive programming. Took silver medals on the following olympiads in informatics: Russian olympiad 2015, Russian open olympiad 2015, Moscow olympiad 2015, Russian team olympiad 2015, international tournament in Shumen (Bulgaria) 2015. Going to participate in ACM ACPC very soon.

Updated on September 18, 2022

Comments

  • Andreikkaa
    Andreikkaa over 1 year

    I have a problem with PXE booting. I followed these instructions on the Ubuntu help wiki. But I get an error on client machine:

    Could not find kernel image: vmlinuz-3.13.0-24-generic
    

    And now, question. This image should be in pxelinux.cfg folder, am I right?

    • Emad Saeed
      Emad Saeed almost 4 years
      as per @BoeroBoy answer's, make sure you gave it proper permissions. PXE won't identify permissions problem, instead it yields couldn't find file msg
  • Andreikkaa
    Andreikkaa almost 10 years
    So, I should put the kernel of client into /tftpboot folder?
  • Lekensteyn
    Lekensteyn almost 10 years
    @ZapretZone When your question is answered, please press the tick on the left of the answer to mark it as accepted.
  • Andreikkaa
    Andreikkaa almost 10 years
    But I have a new issue. It isn't able to load ubuntu because of error: mount: mounting /nfsroot on /root failed: no such file or directory. So, it loads just initramfs. Can u help me, please?
  • Lekensteyn
    Lekensteyn almost 10 years
    @ZapretZone You should open a new question for that, but I am not a NFS expert. Have you carefully read the instructions on the wiki page?
  • Emad Saeed
    Emad Saeed almost 4 years
    you literally saved me HOURS.
  • David S
    David S almost 4 years
    Ditto, and I know this isn't what comments are for and I don't care. Thank you.