grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] grub-install C rewrite


From: Lennart Sorensen
Subject: Re: [RFC] grub-install C rewrite
Date: Thu, 26 Sep 2013 10:44:00 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Sep 26, 2013 at 03:59:03PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
> What kind of changes was it? Could we make them into some (possibly
> hidden) options?

Well for quite a while the logic was assuming apple powerpc, and it
needed rework to make it work on the IBM powerpc systems.

To some extent I think grub-install as a script is a great source of
info on what steps have to be taken to install grub, so you can do it
manually if something isn't working.

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

Of course when grub-install is a script, it is easy to fiddle with it
to make it handle such a case.

So really my main objection is that it is much harder to debug and fix
C code than it is to fix a script calling a bunch of external commands.

At the very least a C version of grub-install must have an option to
list every command it is attempting to execute externally.  Certainly
adding 'set -x' to grub-install has often been helpful.

-- 
Len Sorensen



reply via email to

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