Solved Booting to a Centos7 Image File
Hi all, I’ve been working on getting a working Centos Image file set up as a menu option on my fog server using this great guide by @george1421 but I seem to be running in to an issue pulling the image file down via TFTP. It attempts to load the file but times out as if it can’t reach it. The files are in the same directory as the rest of the files that are able to be copied via TFTP, but these ones dont work. I had thought it was a permission issue, and set the permissions to match the other files, but no luck.
Here’s a copy of the config:
imgargs vmlinuz initrd=initrd.img root=live:nfs://$[serverip]:/images/os/centos/7/LiveOS/squashfs.img ip=dhcp inst.repo=nfs:$[serverip]:/images/os/centos/7 splash quiet
boot || goto MENU
Here is the path to the boot files, ftp / tftp directories are all set to the default:
username@serverip:/images/os/centos/7/images/pxeboot$ pwd & ls
initrd.img TRANS.TBL vmlinuz
Anyone have any ideas? Am I missing a setting somewhere. Let me know if more info is needed
That was totally it! I was confusing myself with the /images directory for tftp. After changing the command to match the /tftpboot directory everything works perfectly. Thanks for your help!
george1421 Moderator last edited by
@madnm said in Booting to a Centos7 Image File:
So you need to be aware of protocol document roots.
For tftp its /tftpboot
for nfs its /images
for http its /var/www/html
So what IPXE will do is download vmlinuz (kernel) and initrd.img (hard drive) over tftp so according to your ipxe command these files should exist in
/tftpboot/os/centos/7/images/pxeboot/on the fog server (confirm please).
If they exist in that spot the tftpd program will send them to the target computer. The target computer will then boot them. Once the Centos kernel starts and mounts the initrd.img file it will connect over NFS to grab the squashfs which contains the centos installer files. Once the centos kernel starts then FOG and iPXE are out of the picture.
So do you see vmlinuz get transferred just after iPXE banner is displayed? You have to have a quick eye to see both the kernel and initrd file get transferred. In the kernel parameters you can also add
log=7and as the centos kernel boots it will send out status messages so you can see its doing something.