osbuild / osbuild-composer

An HTTP service for building bootable OS images.
https://www.osbuild.org
Apache License 2.0
158 stars 107 forks source link

[help] customizations.kernel parameters not working #3059

Open zoenglinghou opened 1 year ago

zoenglinghou commented 1 year ago

Distro: CentOS Stream 9 osbuild version: 65-1.el9 osbuild-composer version: 62-1.el9

I am trying to build a custom centos image with custom kernel parameters. In my blueprint, I have this:

[customizations.kernel]
append = "i915.force_probe=* swiotlb=65536 module_blacklist=pinctrl_elkhartlake,dp83867"

However, when inspecting the grub.cfg in the iso file (and in the boot menu), there is no kernel parameters:

set default="1"

function load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

set timeout=60
### END /etc/grub.d/00_header ###

search --no-floppy --set=root -l 'CentOS-Stream-9-BaseOS-x86_64'

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install CentOS Stream 9-stream' --class fedora --class gnu-linux --class gnu --class os {
    linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64 inst.ks=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64:/osbuild.ks quiet
    initrdefi /images/pxeboot/initrd.img
}
menuentry 'Test this media & install CentOS Stream 9-stream' --class fedora --class gnu-linux --class gnu --class os {
    linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64 inst.ks=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64:/osbuild.ks rd.live.check quiet
    initrdefi /images/pxeboot/initrd.img
}
submenu 'Troubleshooting -->' {
    menuentry 'Install CentOS Stream 9-stream in text mode' --class fedora --class gnu-linux --class gnu --class os {
        linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64 inst.ks=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64:/osbuild.ks inst.text quiet
        initrdefi /images/pxeboot/initrd.img
    }
    menuentry 'Rescue a CentOS Stream system' --class fedora --class gnu-linux --class gnu --class os {
        linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64 inst.ks=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64:/osbuild.ks inst.rescue quiet
        initrdefi /images/pxeboot/initrd.img
    }
}

Am I missing something in my blueprint?

I am not sure if this is the correct place to report the issue, I apologize if it causes you trouble, and thank you in advanced.

bcl commented 1 year ago

What type of image are you building? ostree and edge don't allow kernel arg customizations -- but you should get an error instead of it building the image.

zoenglinghou commented 1 year ago

I am building a "traditional" installer iso, and the grub config of the iso does not have the parameters

dvdhrm commented 1 year ago

(Transferring the issue over to osbuild-composer, as those parameters should either be rejected or end up in the blueprint, and thus unlikely to be an osbuild issue.)