[SOLVED] Use wget in kickstart
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
[SOLVED] Use wget in kickstart
I have seen on another server, here at my workplace the use of wget (without full path) being used in a kickstart file successfully, on CentOS-6.2 installations.
I wanted to do the same thing in my kickstart script for CentOS-6.6, but it is not working. The command wget is not being recognized after the partitions and logical volumes are created.
Here is what was displayed on the screen:
Running anaconda 13.21.229, the CentOS system installer - please wait.
The following error was found while parsing the kickstart configuration:
The following problem occured on line 291 of the kickstart file:
Unknown command: wget
Tripialos posted something similar and discovered that he should not be running with --nochroot on the %post line. Albeit my wget command is in that section, but I am not doing anything on the %post line execept --interpreter /usr/bin/bash.
Here is my wget command:
cd /root
wget -O dt-harden.sh http://192.168.40.21/Security/dt-harden.sh
Please help
I wanted to do the same thing in my kickstart script for CentOS-6.6, but it is not working. The command wget is not being recognized after the partitions and logical volumes are created.
Here is what was displayed on the screen:
Running anaconda 13.21.229, the CentOS system installer - please wait.
The following error was found while parsing the kickstart configuration:
The following problem occured on line 291 of the kickstart file:
Unknown command: wget
Tripialos posted something similar and discovered that he should not be running with --nochroot on the %post line. Albeit my wget command is in that section, but I am not doing anything on the %post line execept --interpreter /usr/bin/bash.
Here is my wget command:
cd /root
wget -O dt-harden.sh http://192.168.40.21/Security/dt-harden.sh
Please help
Last edited by warron.french on 2015/02/25 20:49:23, edited 1 time in total.
Thanks,
War
War
Re: Use wget in kickstart
wget is not installed by default (as RH generally uses curl). Either use curl or install wget BEFORE you want to use it.
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
Re: Use wget in kickstart
aks, thanks, but does that mean I need to explicitly add it to my %packages section?
The reason I ask is because, if I remove that 1 line with wget, the system gets built, and then wget is on the newly installed OS.
Thanks,
War
The reason I ask is because, if I remove that 1 line with wget, the system gets built, and then wget is on the newly installed OS.
Thanks,
War
Thanks,
War
War
Re: Use wget in kickstart
When you're running the installer you are dependent on the packages that are available in the installer and wget is not one of them. As others have said, curl is there and works. Otherwise you'll have to chroot into your newly installed system in the post script and then you can run the wget you just installed... but that depends on the installation finishing.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
Re: Use wget in kickstart
OK, so now the problem is Unknown command: curl.
What do I need to do to get curl, the basic tool recognized?
I just did:
curl -o /root/file1 http://192.168.40.21/file1
What do I need to do to get curl, the basic tool recognized?
I just did:
curl -o /root/file1 http://192.168.40.21/file1
Thanks,
War
War
Re: Use wget in kickstart
Yes just add it to the %packages section (I used %packages --nobase).
Works fine for me.
Works fine for me.
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
Re: Use wget in kickstart
OK, I will try that, thanks -- aks.
I am really looking forward to being done with this project.
I am really looking forward to being done with this project.
Thanks,
War
War
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
Re: Use wget in kickstart
All, I think I found my resolution...
it would help if I had seen that the %post section was already closed out with a %end line, and after that I had put my curl commands. STUPID ME! Silly little mistakes keep killing me.
But, the good news is I am learning an awful lot.
More to come if I figure this out.
it would help if I had seen that the %post section was already closed out with a %end line, and after that I had put my curl commands. STUPID ME! Silly little mistakes keep killing me.
But, the good news is I am learning an awful lot.
More to come if I figure this out.
Thanks,
War
War
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
Re: [SOLVED] Use wget in kickstart
Yep! That was it, I needed to move the '%end' to the very last line of the file and that solved all of my problems.
Problem solved.
Problem solved.
Thanks,
War
War