DobreMihaela
DobreMihaela

Reputation: 194

Kickstart file inside boot_command

I have the following question. I want to build a Centos 7 imagine using Packer. I want to run the template without a kickstart file .cfg due to some security issues. Is it possible to write all the commands from the kick start file to the template.json?

This is how it actually looks:

"boot_command": "<tab> inst.text inst.ks=https://raw.githubusercontent.com/xxx/xxx/xxx/centos-7.cfg <enter><wait>",
# Turning on text-mode installation (little quicker than GUI)
text

# Setting up authentication and keyboard
auth --enableshadow --passalgo=sha512
keyboard --vckeymap=us --xlayouts='us'

# Installation files source (CentOS-7.0-1406-x86_64-Minimal.iso)
cdrom

# Using only primary disk, ignoring others
ignoredisk --only-use=sda

# Setting up language to English
lang en-US.UTF-8
...

And I want something like:

text
auth --enableshadow --passalgo=sha512
keyboard --vckeymap=us --xlayouts='us'
cdrom
ignoredisk --only-use=sda
lang en-US.UTF-8"
...

Unfortunately, the virtual machine doesn't realize that I am sending these commands as kickstart commands and it starts in the GUI mode.

Upvotes: 1

Views: 937

Answers (1)

How is your source built? You will need to create a boot command directive that simulates the keys so that it can start and make the ks file available for the installation (using floppy_dirs or similar)

Upvotes: 0

Related Questions