Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GQjd2-0006Es-KI for mharc-grub-devel@gnu.org; Fri, 22 Sep 2006 07:55:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GQjd1-0006D6-Ih for grub-devel@gnu.org; Fri, 22 Sep 2006 07:55:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GQjd0-0006C1-IY for grub-devel@gnu.org; Fri, 22 Sep 2006 07:55:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQjd0-0006Bv-FY for grub-devel@gnu.org; Fri, 22 Sep 2006 07:55:34 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GQjgj-0006PI-G3 for grub-devel@gnu.org; Fri, 22 Sep 2006 07:59:25 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 5197B3CBF644B for ; Fri, 22 Sep 2006 16:17:29 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 653273CBF6404 for ; Fri, 22 Sep 2006 16:17:28 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Fri, 22 Sep 2006 13:54:48 +0200 User-Agent: KMail/1.8.2 References: <20060917203924.GA3073@khazad.dyndns.org> <200609220742.38442.okuji@enbug.org> <20060922064410.GA28126@khazad.dyndns.org> In-Reply-To: <20060922064410.GA28126@khazad.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609221354.48284.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.499999, version=0.17.2 Subject: Re: [PATCH] don't abort with error if realpath fails X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2006 11:55:35 -0000 On Friday 22 September 2006 08:44, Robert Millan wrote: > On Fri, Sep 22, 2006 at 07:42:38AM +0200, Yoshinori K. Okuji wrote: > > On Thursday 21 September 2006 19:34, Robert Millan wrote: > > > Sure. The purpose of realpath here isn't really to verify device > > > existance; that ought to happen later if (and only if) we're actualy > > > going to use that device. > > > > > > Suppose this device.map: > > > > > > (hd0) /dev/hda > > > (xxx) /dev/idontexist > > > > > > Theoricaly, when grub-setup is told to act on (hd0) it shouldn't care > > > that /dev/idontexist doesn't exist (it could be listed because it was > > > generated by an older grub, because the device disappeared, etc). > > > However, because of the realpath canonicalisation, as a collateral > > > result we get to abort if _any_ of the entries are wrong: > > > > I understand what you mean. Thank you. > > > > > My point is that grub should be fault tollerant and not care that > > > /dev/idontexist is broken, specialy since device.map is a file that is > > > subject for input from either user or older grub (including grub > > > legacy), and we have little control about its contents. > > > > I describe my own opinion here. GRUB itself must be extremely > > fault-tolerant, as the user cannot boot up a machine if GRUB fails. > > However, the installer of GRUB must be extremely error-sensitive, as the > > user cannot boot up a machine if the installation happens _wrongly_. If a > > device map contains any error, it's likely that the user made some > > mistake or skip over erroneous information. Personally I much, much > > prefer that GRUB is not installed in this case. Failing in installing > > GRUB is better than making a machine unbootable. > > How could installation happen wrongly because of "(xxx) /dev/idontexist" ? > If we're trying to write to (xxx), that will fail; otherwise, it doesn't > interfere with what we're doing. I do not want to repeat the same sentense. I said: > > If a > > device map contains any error, it's likely that the user made some > > mistake or skip over erroneous information. I do not like to accept a wrong device map, as it is obvious that the user is careless. Okuji