From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VPCnj-0003RW-3Y for mharc-grub-devel@gnu.org; Thu, 26 Sep 2013 10:44:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPCnZ-0003Pm-VX for grub-devel@gnu.org; Thu, 26 Sep 2013 10:44:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPCnS-0000MD-M3 for grub-devel@gnu.org; Thu, 26 Sep 2013 10:44:09 -0400 Received: from mail.csclub.uwaterloo.ca ([129.97.134.52]:60817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPCnS-0000M9-De for grub-devel@gnu.org; Thu, 26 Sep 2013 10:44:02 -0400 Received: from caffeine.csclub.uwaterloo.ca (caffeine.csclub.uwaterloo.ca [129.97.134.17]) by mail.csclub.uwaterloo.ca (Postfix) with SMTP id B1EEA2CE35 for ; Thu, 26 Sep 2013 10:44:00 -0400 (EDT) Received: by caffeine.csclub.uwaterloo.ca (sSMTP sendmail emulation); Thu, 26 Sep 2013 10:44:00 -0400 From: "Lennart Sorensen" Date: Thu, 26 Sep 2013 10:44:00 -0400 To: The development of GNU GRUB Subject: Re: [RFC] grub-install C rewrite Message-ID: <20130926144400.GR13097@csclub.uwaterloo.ca> References: <524431E6.60807@gmail.com> <20130926133504.GQ13097@csclub.uwaterloo.ca> <52443DA7.1030707@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <52443DA7.1030707@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 129.97.134.52 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 14:44:17 -0000 On Thu, Sep 26, 2013 at 03:59:03PM +0200, Vladimir '=CF=86-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 o= n > 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. --=20 Len Sorensen