NCM::grub - NCM grub configuration component
Updates the grub.conf configuration file using grubby according to a list of kernels described in the profile. Sets the default kernel to that specified in
/system/kernel/version. Supports the use of multiboot loaders (most commonly used for configuration of Xen systems). Returns error in case of failure.
activates/deactivates the component.
Prefix where kernels are found. Defaults to
/boot.May need changes for other platforms (eg.
/boot/efi/EFI/redhatwhen using elilo on IA64)
Returns the version to be used for the default kernel.
Sets if we want a full control of the kernel arguments. The default is 'false'.
Sets the arguments for the default kernel at boot time.
If 'fullcontrol' is true then the current arguments passed to the kernel are substituted by the ones given in this entry. Examples:
"/software/components/grub/args" = "apm=off";
Will set apm=off for the default kernel, changing any previously defined arguments.
"/software/components/grub/args" = "";
Will unset all kernel arguments.
If 'fulcontrol' is false then an empty or undefined value leaves the current arguments untouched. The removal of a current argument is done by preceding the argument with a "-". Examples:
"/software/components/grub/args" = "apm=off";
will set the apm=off for the default kernel or change a previous defined (eg apm=on) argument.
"/software/components/grub/args" = "-apm=off root=/dev/hda1";
Will remove the apm=off argument and will add/change the root device.
This is a list of kernels that should have entries in the grub configuration file. Each kernel is described by the following entries.
Path to the kernel (relative to "prefix" described above).
Sets the arguments for this kernel at boot time. Behaviour is as described above for
Allows for setting a multiboot loader which is a generic interface for boot loaders and operating systems. The Xen hypervisor uses a multiboot loader to load guest kernels as modules. N.B. multiboot options are supported natively by grubby from version 4.2.0-1 on; for earlier versions, ncm-grub will try to configure multiboot itself.
Sets the arguments that are to be passed to a multiboot loader. For example, the Xen hypervisor accepts arguments for setting the amount of memory allocated to the Domain 0 kernel.
Optionally set an initial ramdisk image to be loaded when booting.
The title string that will be used to describe this entry in
Sets if a password should be enabled in grub.conf. If this is false, any existing password will be removed. If this is not defined, the component will not add or remove a password, leaving any existing one untouched.
An --option used with the password line in grub.conf. This is typically used to set the hashing algorithm for the password. "encrypted" means the password can be hashed with (more secure than MD5) SHA-256 or SHA-512. "md5" for an MD5 hashed password. Plaintext is not supported.
Mutually exclusive with the file option. A crypted password for grub.conf.
Mutually exclusive with the password option. The path to a file on the host where the password can be read from. May be useful if it is undesirable to put (even crypted) profiles into the profile.
The file will be scanned for a line where the first field (colon seperated) matches the file_user option, and the second field will be used as the parameter.
See description of the file option. The user (first field) to be picked from a password field.
The console settings may be defined here.
The component grub modifies the following files:
/etc/grub.conffile is modified not directly but via grubby.
A standard SL4 kernel with initrd image to be loaded.
"/software/components/grub/kernels/0" = nlist("kernelpath", "/vmlinuz-2.6.9-22.0.1.EL", "kernelargs", "ro root=LABEL=/", "title", "Scientific Linux 4.2 / 2.6.9", "initrd", "/initrd-2.6.9-22.0.1.EL.img" );
This configuration produces the following entry in grub.conf:
title Scientific Linux 4.2 / 2.6.9 kernel `/vmlinuz`-2.6.9-22.0.1.EL ro root=LABEL=/ initrd `/initrd`-2.6.9-22.0.1.EL.img
A Xen 3 hypervisor with Linux 2.6 domain 0 kernel and initrd.
"/software/components/grub/kernels/1" = nlist("multiboot", "/xen-3.0.2-2.gz", "mbargs", "dom0_mem=400000", "title", "Xen 3 / XenLinux 2.6.16", "kernelpath", "/vmlinuz-2.6.16-xen3_86.1_rhel4.1", "kernelargs", "max_loop=128 root=/dev/hda2 ro", "initrd", "/initrd-2.6.16-xen3_86.1_rhel4.1" );
Produces the following entry in grub.conf:
title Xen 3 / XenLinux 2.6.16 kernel `/xen`-3.0.2-2.gz dom0_mem=400000 addthis module `/vmlinuz`-2.6.16-xen3_86.1_rhel4.1 max_loop=128 root=/dev/hda2 ro module `/initrd`-2.6.16-xen3_86.1_rhel4.1