Mailinglist Archive: yast-devel (42 mails)

< Previous Next >
Re: [yast-devel] Modify Kernel parameters call
On Tue, 13 May 2014 10:41:26 +0200
Josef Reidinger <jreidinger@xxxxxxx> wrote:

Hi list,
with grub2 we have problem with old API that bootloader provide as it
modify sections, but grub2 generate parameters from global parameters.
Result is that old method work unreliable and we get some serious bug
reports about it especially with xen. It also need nasty hack in
perl-bootloader that choose first modified section and convert
parameters to global one, which do not work nice.

So I propose new API[1] and would like to know your opinions. It is
documented and contain also examples of usage. It is designed more
like swiss knife then single purpose API as current usage is very
different ( some need to add only to common kernel like cio_ignore
and do not have it in failsafe, others like crashdump should be
everywhere and others like yast2-vm need only xen related ). Other
option is to create specialized methods that set given type of
kernel, but in some case it create more code then needed.

Packages that should use this new api are:
- installation
- kdump
- s390
- vm
- tune

Josef

[1] https://github.com/yast/yast-bootloader/pull/87

After discussions on lunch, IRC and also directly in pull request I
change slightly API.

If noone have objections I will add it tomorrow and start modifying
users of API to use it.

Examples of usage:
# getter
Bootloader.kernel_param("crashkernel")
# => "256M@64B"

Bootloader.kernel_param("cio_ignore", :recovery)
# => :missing

Bootloader.kernel_param("verbose", :xen_guest)
# => :present

# setter
Bootloader.modify_kernel_params(:common, :recovery, :xen_guest,
"crashkernel" => "256M@64M")

# alternative with array as first argument
targets = [:common, :recovery, :xen_guest]
Bootloader.modify_kernel_params(targets, "crashkernel" => "256M@64M")

Bootloader.modify_kernel_params("cio_ignore" => :missing)

Bootloader.modify_kernel_params(:xen_host, "verbose" => :present)

Josef
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References