From: Michael Chang <mchang@suse.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: Ismael Luceno <iluceno@suse.de>
Subject: Re: [PATCH v2 1/2] grub-install: Add missing points of no return for IEEE1275 on i386/powerpc
Date: Mon, 5 Sep 2022 17:56:07 +0800 [thread overview]
Message-ID: <20220905095607.GA10914@mazu> (raw)
In-Reply-To: <20220829143625.23769-2-iluceno@suse.de>
On Mon, Aug 29, 2022 at 04:36:24PM +0200, Ismael Luceno wrote:
> Signed-off-by: Ismael Luceno <iluceno@suse.de>
> ---
> util/grub-install.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/util/grub-install.c b/util/grub-install.c
> index 7b04bd3c534b..527b85e27aa7 100644
> --- a/util/grub-install.c
> +++ b/util/grub-install.c
> @@ -1835,6 +1835,7 @@ main (int argc, char *argv[])
> {
> if (write_to_disk (ins_dev, imgfile))
> grub_util_error ("%s", _("failed to copy Grub to the PReP partition"));
> + grub_set_install_backup_ponr ();
This looks good to me.
> }
> else
> {
> @@ -1859,6 +1860,7 @@ main (int argc, char *argv[])
> partno = grub_dev->disk->partition
> ? grub_dev->disk->partition->number + 1 : 0;
> dev = grub_util_get_os_disk (grub_devices[0]);
> + grub_set_install_backup_ponr ();
This should be moved way up, given failure may occur at
grub_make_system_path_relative_to_its_root or even earlier.
But in the first place the attempt may have been wrong, given the image
is installed as file in the platform directory, there we should not be
botherd to set grub_set_install_backup_ponr as file should be able to be
backup and restored thus is covered. On the other hand, the
grub_set_install_backup_ponr looked like a workaround to me to deal with
raw images embedded in partition that has no good way to restore it.
That is for i386-ieee1275, /boot/grub2/i386-ieee1275/grub should be
added to the list of backup and restore to get it to work in failure
recovery path.
Thanks,
Michael
> grub_install_register_ieee1275 (0, dev,
> partno, relpath);
> }
> --
> 2.37.1
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2022-09-05 10:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 14:36 [PATCH v2 0/2] Fix installation issues on ppc64le Ismael Luceno
2022-08-29 14:36 ` [PATCH v2 1/2] grub-install: Add missing points of no return for IEEE1275 on i386/powerpc Ismael Luceno
2022-09-05 9:56 ` Michael Chang [this message]
2022-08-29 14:36 ` [PATCH v2 2/2] grub-install: Ensure a functional /dev/nvram Ismael Luceno
2022-09-05 10:04 ` Michael Chang
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=20220905095607.GA10914@mazu \
--to=mchang@suse.com \
--cc=grub-devel@gnu.org \
--cc=iluceno@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.