centos 7 kickstart - were to put ks file
-
@robertkwild You can change it if you want. It should work as long as world has read access. You can test by a second computer, just open a browser and connect to the FOG ip address and then the name of the file to see if you can download it with a browser.
-
thanks @george1421 i can access the kickstart script via the web gui so all is good
i can view it but i cant download it
if i go here
i can view it on the web
but if i go here
it re directs me to the fog dashboard, ie
https://fog-ip//fog/management/index.php?node=home
i was hoping it would list the dir listing of apache and when i click the file i could download it
maybe i need to make a dir and put the file in the dir and then i can download it
many thanks,
rob -
@robertkwild If you can access the file via a web browser then you should be pretty confident that the centos linux kernel can get it when its time. As for directory browsing of the apache docroot that is turned off. The redirect asking for no specific file and then being redirected to the fog web ui is by design. You would need to do some changing in the web configuration if you wanted to do that. I would advise against changing the web configuration in apache because it may stop fog from operating.
-
@george1421 im getting closer, ive tried all different variants but this is the best one, this one actually tries to load the “kickstart” file
kernel tftp://${fog-ip}/os/centos/7/vmlinuz ks=http://${fog-ip}/listing/ks.cfg
initrd tftp://${fog-ip}/os/centos/7/initrd.img
boot || goto MENUbut this is the error i get when trying it out
-
changed it like so and so far so good, will let you know the outcome, big shout out to @george1421
kernel tftp://${fog-ip}/os/centos/7/vmlinuz ks=nfs:${fog-ip}:/images/os/centos/7/ks.cfg
initrd tftp://${fog-ip}/os/centos/7/initrd.img
boot || goto MENU -
@robertkwild Again I would confirm if you can download the config file via a browser first. If you can and you are on the same subnet as the pxe booting computer then the problem is elsewhere. I see you’ve taken the minimalist approach to the kernel args. If that’s kind of working for you, I think I might just tack a few on for good measure since some kernels get cranky without the initrd line.
Using your ipxe menu config.
kernel tftp://${fog-ip}/os/centos/7/vmlinuz initrd=initrd.img ip=dhcp ks=http://${fog-ip}/listing/ks.cfg initrd tftp://${fog-ip}/os/centos/7/initrd.img boot || goto MENU
And since we don’t know if it can’t pull the config file because of the http server or the client lets add in
ip=dhcp
for good measure.FWIW
imgargs
command should do the same thing as appending the values after the kernel call, but I’ve seen some kernels not accept the imgargs line but take the kernel parameters the way you have presented them.EDIT: I just noticed the certificate error. Your fog server is running configured under https:// but your curl call is using http:// This might also cause the error. Its not clear if all you need to do is change the kernel call to the ks file to https or have to do something different because fog is using a privately created certificate for https.
-
Hey,
Recently I have been doing exactly same think as you are doing now and in my case worked:
kernel tftp://${fog-ip}/os/centos/7/vmlinuz
initrd tftp://${fog-ip}/os/centos/7/initrd.img
imgargs vmlinuz initrd=initrd.img root=live:nfs://${fog-ip}:/images/os/centos/7/LiveOS/squashfs.img ip=dhcp inst.repo=nfs:${fog-ip}:/images/os/centos/7 inst.ks=nfs:${fog-ip}:/images/dev/ks.cfg splash quiet
boot || goto MENUNote, that in my case I had to have kickstart file located in /images/dev.
-
ive tested it and all works perfect!!!
heres my kickstart script
#platform=x86, AMD64, or Intel EM64T #version=DEVEL # Install OS instead of upgrade install # Keyboard layouts keyboard 'uk' # Root password rootpw --iscrypted # System language lang en_GB # System authorization information auth --useshadow --passalgo=sha512 # Use text mode install text # SELinux configuration selinux --disabled # Do not configure the X Window System skipx # Use NFS installation media nfs --server=10.110.10.60 --dir=/images/os/centos/7 # Firewall configuration firewall --disabled # Network information network --bootproto=dhcp --device=eth0 # Reboot after installation reboot # System timezone timezone Europe/London # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --drives=sda --all --initlabel #Create Partitions automatically autopart --type=lvm
-
@george1421 thanks george about this, i will edit my syntax and get back to you about this
-
my dir listing works but when i click the kickstart file, it doesnt ask me to download it, where as it should instead of just viewing me the contents of it
is it ok to add this line in my httpd.conf as i know @george1421 advised against it
<Directory /var/www/html/listing>
Options +Indexes
</Directory>