From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ys8oD-0005rh-Vz for mharc-grub-devel@gnu.org; Tue, 12 May 2015 07:57:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ys8o9-0005pi-AF for grub-devel@gnu.org; Tue, 12 May 2015 07:57:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ys8o4-0000ys-Bc for grub-devel@gnu.org; Tue, 12 May 2015 07:57:09 -0400 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:35267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ys8o3-0000ye-Vi for grub-devel@gnu.org; Tue, 12 May 2015 07:57:04 -0400 Received: by lbbuc2 with SMTP id uc2so3790556lbb.2 for ; Tue, 12 May 2015 04:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=m8CcL/lx7mhqWj1HUZT0GyHjX59NqMyb5dPvR6pPdnU=; b=aYVUKsBZS9lxiBLYU4KheRe7Y+ytS9+KaI7tWF1BBgzK1qbHvf6cM21FsOGQQzzUwi Z7ubG/9F8DgpUbVuqsqH1uIveO0/0CUbGBeWuakzNmP3gDW9R2wZ5EgYp/iBU8t14v9a a3pMVUV7Yjk/xFU08/PpQKeguSV5BYdrwair2+NIqbqnpPhxgcy3SMEB3r515RetP67I lPjkDzf6e7WtDykqgbFyShKOCZaGFGYKF5rtFSZkxgVWlgjdeiz0Lcn9w+SMefjz8ul5 M5ICV7A4HAzIjOqgZcInDQUkRwCp4YlvBAvA6pwZtRctsL6KnYHcpq2HToG+TExu94WY +WoQ== X-Received: by 10.153.6.36 with SMTP id cr4mr12097116lad.56.1431431822983; Tue, 12 May 2015 04:57:02 -0700 (PDT) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id s1sm3764613lae.46.2015.05.12.04.57.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 04:57:02 -0700 (PDT) Date: Tue, 12 May 2015 14:57:00 +0300 From: Andrei Borzenkov To: Michael Chang Subject: Re: [RFC] grub-install: allow none or multiple install devices on PC BIOS Message-ID: <20150512145700.195e76a7@opensuse.site> In-Reply-To: <20150512105222.GA7529@linux-dsax.tai.apac.novell.com> References: <1431111221-32399-1-git-send-email-arvidjaar@gmail.com> <20150512105222.GA7529@linux-dsax.tai.apac.novell.com> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.27; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::232 Cc: The development of GNU GRUB 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: Tue, 12 May 2015 11:57:10 -0000 =D0=92 Tue, 12 May 2015 18:52:22 +0800 Michael Chang =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > On Fri, May 08, 2015 at 09:53:41PM +0300, Andrei Borzenkov wrote: > > There are two main applications. > >=20 > > 1. Omit install device to create generic image intended for chainloading > > from other master loader. Such image can be put on any device (or file > > system) and will still be able to find its $root. Currently even with > > --no-bootsector grub-install optimizes image by skipping UUID search if > > possible. > >=20 Actually I think it is useful for all platforms. > > 2. Redundant installation on multi-device filesystem, RAID or similar. > > This allows both optimizing image w.r.t. to using --prefix vs. load.cfg > > as well as creating image just once. >=20 > I can only tell it to solve the problem of time wasting in copying > modules and images creation due to multiple invocation of grub-install > for doing redundency install. Beside that, do you foresee any other > improvement it can provide? >=20 You answered it yourself below. That is why I think it is useful mostly for PC BIOS that is unique with embedding problem. > >=20 > > Patch allows transparently use none or multiple installation devices, > > similar to > >=20 > > grub_devices=3D"/dev/sda /dev/sda1 /dev/sdb" >=20 > It also looks to me that this patch can solve the problem of multiple > device install with blocklists. Think about the user installs to mbr > (sda) and partition (sda1) because he someshow wants the paritition to > be chainload-able for resuce or for any of his own interests.=20 >=20 > If the user occasionally do. >=20 > grub-install /dev/sda1 grub-install /dev/sda >=20 > The chainload will fail for sda1 since later install to mbr replaces the > core.img. >=20 Exactly. This was common problem for openSUSE users as at least in earlier versions installer defaulted to multiple bootloader locations and only some of them allowed embedding. > You patch can avoid such pit-fall by doing it once. >=20 > > grub-install $grub_devices >=20 > What if one of the device failed, should it continue installing the rest > or abort immediately ? >=20 It will abort, unfortunately. Changing it is really intrusive as it may happen deep in call chain which simply does grub_util_error(). It is something that may be considered for the future. BTW as far as I can tell pbl aborts installation if any of grub-install invocation failed.