creating new menu option in fog PXE
-
hi all,
i think i know how to create a new menu in FOG for my linux kickstart file
in FOG management web under “FOG configuration > iPXE new menu entry”
https://i.postimg.cc/Vvzv9Jms/ipxe-menu.png
obviously i will copy “centos7_1804” on my fog server
where do you think i should add it, under
/root/centos7_1804 OR
/var/www/html/fog/centos7_1804
after that i will edit my parameters so it points to the right path
what do you guys think?
cheers,
rob
-
@robertkwild When a client does PXE boot it needs to be able to load the files from the PXE server. This is usually done via TFTP protocol which can be a bit slow. iPXE which we use is also able to load files via HTTP and other protocols. But still the files need to be in the right places. /root/… definitely makes no sense!
I think you need to read up on this topic. We have many posts about PXE booting Ubuntu in the forums. Give it a try. If you can’t get it to work then post here with specific errors or problems you see. We should be able to help.
-
think i have solved it -
cat /tftpboot/pxelinux.cfg/default
DEFAULT vesamenu.c32
LABEL fog
MENU DEFAULT
kernel ipxe.krn dhcp && chainLABEL centos7_1804
menu label centos7_1804
# Load the correct kernel
kernel centos7_1804/images/pxeboot/vmlinuz
# Boot options
append initrd=centos7_1804/images/pxeboot/initrd.img ks=PROMPT 0
TIMEOUT 01
ls /tftpboot/centos7_1804/images/pxeboot/
initrd.img vmlinuz
so i edited the file “default” and i added a new boot option for my centos7 kickstart file
once i edited the default file i added the centos 7 1804 folder to the “/tftpboot/” which holds the pxeboot files
i also made my fog server a http directory listing server so it can read the kickstart script
what do you guys think
i will test tomorrow and see if it works
-
@robertkwild Why are you using syslinux to pxe boot? That is not even within the scope of FOG. FOG uses iPXE for its boot environment not syslinux. You are making things way to hard for your self.
You might want to review this post to see if there is a different way to go about it even if you are not using FOG for imaging: https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-images
Typically to launch the distro’s installer its a kernel parameter passed from the boot launcher. With iPXE you can use tftp, http, or nfs protocols. I think that post above uses all three at different times. As Sebastian said, you just need to use the right directory root based on the protocol.
tftp == /tftpboot
http == /var/www/html
nfs == /images -
so i was right in the first place
instead of editing the file - “/tftpboot/pxelinux.cfg/default” i add a new custom menu on the fog web gui?
can i then enter this under “paramenters”
LABEL centos7_1804
menu label centos7_1804Load the correct kernel
kernel http://fog/listing/centos7_1804/images/pxeboot/vmlinuz
Boot options
append initrd=http://fog/listing/centos7_1804/images/pxeboot/initrd.img ks=http://fog/listing/centos7_1804/ks.cfg
-
@robertkwild The syntax is slightly different from SYSLINUX style, but there are a lot of examples of how to create menu’s throughout the forums and on the WIKI.
https://wiki.fogproject.org/wiki/index.php/Advanced_Boot_Menu_Configuration_options
https://forums.fogproject.org/topic/10403/boot-iso-from-ipxe-menu
https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-imagesThese are just some of the many numbers of examples that hopefully can help you out.
-
kernel http://fog/listing/centos7_1804/images/pxeboot/vmlinuz
initrd http://fog/listing/centos7_1804/images/pxeboot/initrd.img ks http://fog/listing/centos7_1804/ks.cfg
boot || goto MENUBut i dont understand if i need these added extras-
Chain
imgargs vmlinuz
initrd=initrd.imgAm I putting my kickstart file in the right place?
-
lovely stuff, job done -
kernel http://fog/listing/centos7_1804/images/pxeboot/vmlinuz ks=http://fog/listing/centos7_1804/ks.cfg
initrd http://fog/listing/centos7_1804/images/pxeboot/initrd.img
boot || goto MENU