Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GQeqX-0001MB-Oe for mharc-grub-devel@gnu.org; Fri, 22 Sep 2006 02:49:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GQeqW-0001Lp-6J for grub-devel@gnu.org; Fri, 22 Sep 2006 02:49:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GQeqR-0001KC-KB for grub-devel@gnu.org; Fri, 22 Sep 2006 02:49:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQeqR-0001K8-F5 for grub-devel@gnu.org; Fri, 22 Sep 2006 02:49:07 -0400 Received: from [69.60.117.155] (helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GQeu7-0006fH-K6 for grub-devel@gnu.org; Fri, 22 Sep 2006 02:52:55 -0400 Received: from 138.red-62-57-141.user.auna.net ([62.57.141.138] helo=khazad.dyndns.org) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.63) (envelope-from ) id 1GQeqC-0004eM-01 for grub-devel@gnu.org; Fri, 22 Sep 2006 08:48:52 +0200 Received: from rmh by khazad.dyndns.org with local (Exim 4.63) (envelope-from ) id 1GQeqU-0007Nh-8a for grub-devel@gnu.org; Fri, 22 Sep 2006 08:49:10 +0200 Date: Fri, 22 Sep 2006 08:49:10 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20060922064910.GA28293@khazad.dyndns.org> References: <20060917203924.GA3073@khazad.dyndns.org> <200609210355.54781.okuji@enbug.org> <20060921173419.GA25491@khazad.dyndns.org> <200609220742.38442.okuji@enbug.org> <20060922064410.GA28126@khazad.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060922064410.GA28126@khazad.dyndns.org> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. User-Agent: Mutt/1.5.13 (2006-08-11) 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 06:49:12 -0000 On Fri, Sep 22, 2006 at 08:44:10AM +0200, 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. (Besides, this code is only enabled on GNU/Linux. I think this shows that the intention when writing it wasn't error-sensitivity) -- Robert Millan My spam trap is honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list.