Network booting couldn't find kernel image
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 nameddefault
(/tftpboot/pxelinux.cfg/default
) in your case. That file should contain something like:
LABEL linux KERNEL vmlinuz INITRD initrd APPEND root=...
The
vmlinuz
andinitrd
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.
Related videos on Youtube
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, 2022Comments
-
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 almost 4 yearsas 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 almost 10 yearsSo, I should put the kernel of client into /tftpboot folder?
-
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 almost 10 yearsBut 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 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 almost 4 yearsyou literally saved me HOURS.
-
David S almost 4 yearsDitto, and I know this isn't what comments are for and I don't care. Thank you.