grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pvgrub2 legacy_configfile issues: /sbin/init exec error -8


From: Vladimir 'phcoder' Serbinenko
Subject: Re: pvgrub2 legacy_configfile issues: /sbin/init exec error -8
Date: Sun, 12 Feb 2017 10:52:45 +0000



On Sun, 12 Feb 2017, 08:06 Andrei Borzenkov <address@hidden> wrote:
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.
Agreed on both. That's why I said that previous patch is wrong and I'm working on new one

>      }
>    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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]