|
From: | Vladimir 'phcoder' Serbinenko |
Subject: | Re: pvgrub2 legacy_configfile issues: /sbin/init exec error -8 |
Date: | Sun, 12 Feb 2017 10:52:45 +0000 |
12.02.2017 00:07, Vladimir 'phcoder' Serbinenko пишет:
...
>>
> For multiboot module old grub was passing module file name on module
> command line, so legacy_configfile should replicate this behaviour. But in
> Linux case it shouldn't have ended up loading twice. We need additional
> code in legacy_initrd. Please try the attached patch
>
...
>
>
> diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c
> index dd9d9f1..24546bf 100644
> --- a/grub-core/commands/legacycfg.c
> +++ b/grub-core/commands/legacycfg.c
> @@ -517,7 +517,7 @@ grub_cmd_legacy_initrd (struct grub_command *mycmd __attribute__ ((unused)),
> #endif
> );
>
> - return cmd->func (cmd, argc, args);
> + return cmd->func (cmd, argc ? argc - 1 : 0, args + 1);
If the goal is to be compatible with legacy grub, it is not compatible
(nor was) - legacy grub "initrd" ignored all extra arguments to "initrd"
command while we attempt to load them as additional initrd components.
Nor did legacy grub attempt to quote command line for multiboot kernel
or modules.
> }
> if (kernel_type == MULTIBOOT)
> {
>
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel
[Prev in Thread] | Current Thread | [Next in Thread] |