From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [RFC] grub-install C rewrite
Date: Fri, 27 Sep 2013 07:10:32 +0400 [thread overview]
Message-ID: <20130927071032.13c85a56@opensuse.site> (raw)
In-Reply-To: <524481D0.80206@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2758 bytes --]
В Thu, 26 Sep 2013 20:49:52 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> On 26.09.2013 16:44, Lennart Sorensen wrote:
> >> windows is low priority and more of a bonus. The problems of handling
> >> anything that looks like a list (e.g. list of devices where / resides on
> >> in case of btrfs) and code becoming hairy to handle those cases is
> >> bigger reason.
> >
> > Sure lists can be a hassle.
> >
> > I didn't check lately, but does grub-install understand a list of devices
> > to install to yet?
> >
> > ie: grub-install /dev/sda /dev/sdb
> >
> > After all if I have software raid, both those devices contain /boot and
> > are valid to boot from. And since on things like IBM powerpc,
> > grub-install likes to update the firmware with the list of boot devices,
> > they do all have to be specified at once or you end up with the wrong
> > list (which so far I have worked around by manually fixing the firmware
> > settings after updating grub, which doesn't happen very often lately).
> >
> > So calling grub-install for each device in turn (as I believe Debian
> > does on x86 if you tell it multiple boot devices), does not actually
> > give the correct result.
> >
This will break in blocklist install because every time core.img is
recreated, but I do not see why it should not work if embedding is
possible. Challenge is to atomically detect whether this is possible or
not for all devices before you have clobbered half of them.
Although right now we first rewrite /boot/grub and then try to install;
if installation fails, /boot/grub no more matches embedded core.img
anyway.
> This is interesting testcase which wasn't brought before. This would
> potentially involve creating several core.img or forcing UUID when using
> multiple devices. Again, pretty easy in C and hairy in bash due to list
> handling.
Why it would require separate core.img? core.img needs to know how
access /boot/grub, and /boot/grub remains the same. Same with UUID. Or
do I miss something here?
>
> It's also possible to have options --dry-run (doesn't really do the
> changes, except, perhaps, "mkdir -p") and --gen-script which would
> generate a list of commands which when executed would do exactly as if
> grub-install was run. So you can do
> grub-install --dry-run --gen-script=/tmp/myinstall ...
> <change /tmp/myinstall to will>
> /tmp/myinstall
> This has additional advantage of see which commands are really executed
> without having to understand the whole command flow.
>
That would definitely be useful irrespectively of which language is
used to implement. In particular, this would allow to see list of
modules required for a system.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-09-27 3:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 13:08 [RFC] grub-install C rewrite Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-26 13:35 ` Lennart Sorensen
2013-09-26 13:59 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-26 14:44 ` Lennart Sorensen
2013-09-26 18:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-26 20:22 ` Lennart Sorensen
2013-09-26 20:29 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-26 20:51 ` Chris Murphy
2013-09-26 22:15 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-27 3:10 ` Andrey Borzenkov [this message]
2013-09-26 17:10 ` Seth Goldberg
2013-09-26 18:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-26 18:56 ` Darren J Moffat
2013-09-26 18:57 ` Seth Goldberg
2013-09-26 14:49 ` Andrey Borzenkov
2013-09-26 15:01 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-06 14:54 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-06 15:56 ` Andrey Borzenkov
2013-10-06 18:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
-- strict thread matches above, loose matches on Subject: below --
2013-09-26 17:52 Kalamatee
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=20130927071032.13c85a56@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).