Grub is a boot loader on the Linux platform used to load and then transfer control to an operating system kernel, after which that kernel initializes the rest of the operating system. Use the `grub_conf` InSpec audit resource to test boot loader configuration settings that are defined in the `grub.conf` configuration file.
A `grub_conf` resource block declares a list of settings in a `grub.conf` file:
describe grub_conf('path', 'kernel') do
its('setting') { should eq 'value' }
end
or:
describe grub_conf('path') do
its('default') { should eq '0' } #
its('setting') { should eq 'value' }
end
where
* `'service_name'` is a service listed in the `grub.conf` file
* `'path'` is the path to the `grub.conf` file
* `'kernel'` specifies the default kernel (by using `'default'`) or a specific kernel; `'default'` defines the position in the list of kernels at which the default kernel is defined, i.e. `should eq '0'` for the first kernel listed or `'path', 'default'` to use the default kernel as specified in the `grub.conf` file