How to use access scripts from main kickstart script?

32 views
Skip to first unread message

Mike

unread,
May 28, 2019, 5:18:16 PM5/28/19
to Packer
I have Centos 7 kickstart scripts. The main kickstart file (the one loaded by boot_command) uses several other scripts. These all need to added to the Centos minimal ISO that I am using to build my full QEmu VM.

What is the best way to make all these scripts available to the main kickstart file? I think the kickstart script is expecting to find them under /mnt/source.

I've tried using floppy_dir but then I can't mount the floppy drive before the image is built. File provisioners run after the image is built.

Thanks

Rickard von Essen

unread,
May 30, 2019, 7:21:16 AM5/30/19
to packe...@googlegroups.com
You can pass arguments from the boot_command to kickstart that you can read in your pre and post scripts. A good way is to pass a base url http://{{ .HTTPIP}}:{{ .HTTPPort }} and put your scripts in the http_directory. Then in your kickstart script you can just curl/wget additional scripts and execute them. For how to pass arguments to kickstart see 1).

But it might actually be more convenient to just inline everything into the kickstart cfg.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/cce5bbab-de06-4662-ad0f-151316a9d905%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike

unread,
May 30, 2019, 10:54:00 AM5/30/19
to Packer
I completely forgot about the HTTP service - thanks.


On Thursday, 30 May 2019 07:21:16 UTC-4, Rickard von Essen wrote:
You can pass arguments from the boot_command to kickstart that you can read in your pre and post scripts. A good way is to pass a base url http://{{ .HTTPIP}}:{{ .HTTPPort }} and put your scripts in the http_directory. Then in your kickstart script you can just curl/wget additional scripts and execute them. For how to pass arguments to kickstart see 1).

But it might actually be more convenient to just inline everything into the kickstart cfg.

On Tue, May 28, 2019 at 11:18 PM Mike <sto...@gmail.com> wrote:
I have Centos 7 kickstart scripts. The main kickstart file (the one loaded by boot_command) uses several other scripts. These all need to added to the Centos minimal ISO that I am using to build my full QEmu VM.

What is the best way to make all these scripts available to the main kickstart file? I think the kickstart script is expecting to find them under /mnt/source.

I've tried using floppy_dir but then I can't mount the floppy drive before the image is built. File provisioners run after the image is built.

Thanks

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages