+++ This bug was initially created as a clone of Bug #1733545 +++
Description of problem:
When running installation to an image file using anaconda, unexpected parameters can appear on the kernel command line of the created image. The parameters depend on the system where anaconda is executed. Here is an example of the kernel command line in an image file:
[root@localhost ~]# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-1062.el7.x86_64 root=UUID=bd7bfb4a-bea0-46ab-9141-7f3ea51e349b ro spectre_v2=retpoline console=ttyS0
"spectre_v2=retpoline" was added based on the CPU in the system (see bug 1659626), "console=ttyS0" was inherited from the kernel command line of the host system.
Such parameters should not be added to the kernel command line of installed images. Images should be generic.
Since composer (Image Builder) runs anaconda, images created by composer are affected as well.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. (optional) Have a system with an Intel Skylake/Kaby Lake CPU
2. Modify the kernel command line of the system, add "console=ttyS0" and reboot the system
3. create a kickstart file:
[root@localhost ~]# cat autopart_plain.ks
keyboard --vckeymap=us --xlayouts='us'
clearpart --all --initlabel
4. dd if=/dev/zero of=/root/disk_console.img bs=1 count=1 seek=5G
5. anaconda -C --image /root/disk_console.img --kickstart /root/autopart_plain.ks --repo <REPO_PATH>
6. boot the image in a VM and check /proc/cmdline
/proc/cmdline contains parameters specific for the system anaconda was running on
/proc/cmdline doesn't contain any system-specific parameters unless they are explicitly requested
--- Additional comment from Jan Stodola on 2019-07-26 15:29 CEST ---
RHEL-8 clone. It's reproducible with anaconda-188.8.131.52-1.el8 and "console=ttyS0" on the kernel command line of the host system.