From: avnish <avnish@imap.linux.ibm.com>
To: "Michal Suchánek" <msuchanek@suse.de>
Cc: Avnish Chouhan <avnish@linux.ibm.com>,
grub-devel@gnu.org, brking@linux.ibm.com,
meghanaprakash@in.ibm.com, mchang@suse.com
Subject: Re: [PATCH] Mandatory install device check for PowerPC
Date: Wed, 29 May 2024 18:15:03 +0530 [thread overview]
Message-ID: <debd50f3e355ff3acf0f49cbdae9d5c5@imap.linux.ibm.com> (raw)
In-Reply-To: <20240527141455.GA3727@kitsune.suse.cz>
Hi Michal,
Thank you so much for a response!
We'll work on to figure out the type of machine.
On no_prep, as per my analysis. Even with no install device given while
installing. We observe boot corruption on some specific setups (mostly
where we have multiple valid PReP partition available on the machine.
And corruption probably due to wrong PReP picked up by installer. And as
the installer picked the valid PReP available, we don't get any errors.
Thank you!
Regards,
Avnish Chouhan
On 2024-05-27 19:44, Michal Suchánek wrote:
> Hello,
>
> On Mon, May 27, 2024 at 07:07:19PM +0530, Avnish Chouhan wrote:
>> This patch adds a check on install_device while installing grub for
>> PowerPC.
>> If install_device is not mentioned in grub2-install, the error will be
>> thrown.
>> Running grub2-install on PowerPC without the install_device may
>> result in boot corruption.
>>
>> Signed-off-by: Avnish Chouhan <avnish@linux.ibm.com>
>> ---
>> util/grub-install.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/util/grub-install.c b/util/grub-install.c
>> index 5babc7a..192d2a8 100644
>> --- a/util/grub-install.c
>> +++ b/util/grub-install.c
>> @@ -970,6 +970,8 @@ main (int argc, char *argv[])
>> case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275:
>> if (install_device)
>> is_prep = 1;
>> + else
>> + grub_util_error ("%s", _("install device isn't specified"));
>> break;
>
> As far as I understand this is fine for us (support for pSeries and
> powernv platform).
>
> However, this is not acceptable for upstream. Upstream also supports
> Apple hardawre, and there the grub binary is installed as a file on the
> filesystem rather than copied to a device.
>
> Or to put it differently, there is the PReP sub-platform of
> GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275 and currently the code does not
> detect that is running on such platform (eg. by examining the device
> tree) but rather it infers is_prep solely based on user input (the
> device to install to) and in absence of the user input non-PReP
> platform
> is assumed, leading to bootlist corruption when no boot device is given
> on a PReP platform.
>
> To fix this the logic should be inverted: Set is_prep should be set
> based on what system is detected, and require an install device for
> PReP platform.
>
> Thanks
>
> Michal
>
>> case GRUB_INSTALL_PLATFORM_MIPS_ARC:
>> case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
>> --
>> 2.39.3
>>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2024-05-29 13:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 13:37 [PATCH] Mandatory install device check for PowerPC Avnish Chouhan
2024-05-27 13:53 ` Vladimir 'phcoder' Serbinenko
2024-05-27 14:14 ` Michal Suchánek
2024-05-29 12:45 ` avnish [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-08 11:11 Avnish Chouhan
2024-11-08 12:07 ` Vladimir 'phcoder' Serbinenko
[not found] <mailman.4423.1731067669.1513.grub-devel@gnu.org>
2024-11-09 5:50 ` avnish
2024-11-11 9:13 ` Michal Suchánek
[not found] <mailman.9605.1731316609.21424.grub-devel@gnu.org>
2024-11-28 10:41 ` Avnish Chouhan
2025-01-06 6:01 ` Avnish Chouhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=debd50f3e355ff3acf0f49cbdae9d5c5@imap.linux.ibm.com \
--to=avnish@imap.linux.ibm.com \
--cc=avnish@linux.ibm.com \
--cc=brking@linux.ibm.com \
--cc=grub-devel@gnu.org \
--cc=mchang@suse.com \
--cc=meghanaprakash@in.ibm.com \
--cc=msuchanek@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.