plus3it / amigen9

Set of Tools to Provide Automation of Tasks for Creating STIG-Partitioned EL9 AMIs and Other VM-Template Types
Apache License 2.0
0 stars 5 forks source link

[Feature Request] Ensure that GRUB-defaults are properly read when performing kernel-updates #26

Closed ferricoxide closed 4 weeks ago

ferricoxide commented 1 month ago

Is your feature request related to a problem? Please describe.

While attempting to resolve #22, noticed that EC2s launched from the spel AMIs (for EL9) were showing "Consistent Network Device Naming" interface-names (ens5 on Nitro instance-types, enX0 on non-Nitro instance-types) instead of generic devicenames (i.e., eth0, etc.). Upon further digging, it became obvious that the contents of the /etc/default/grub file were being ignored when grubby updated the boot-configs.

Describe the solution you'd like

Ensure that the /etc/default/grub file's contents are getting properly ingested when grub2-mkconfig is run.

Describe alternatives you've considered

Additional context

Right now, it looks like the /etc/default/grub file's contents are getting ignored when grub2-mkconfig is run. Looks like, with 9.3+, need to modify the grub2-mkconfig line in PostBuild.sh:

/sbin/grub2-mkconfig > /boot/grub2/grub.cfg

to

grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline

However, even this seems to not be producing the expected results