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: Andrei Borzenkov
Subject: Re: pvgrub2 legacy_configfile issues: /sbin/init exec error -8
Date: Sun, 12 Feb 2017 10:06:02 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

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
> 




reply via email to

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