Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SMoOe-0006h5-54 for mharc-grub-devel@gnu.org; Tue, 24 Apr 2012 18:39:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMoOb-0006gz-0W for grub-devel@gnu.org; Tue, 24 Apr 2012 18:39:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMoOY-0003Rq-Od for grub-devel@gnu.org; Tue, 24 Apr 2012 18:39:40 -0400 Received: from solo.fdn.fr ([80.67.169.19]:58045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMoOY-0003QP-Ep for grub-devel@gnu.org; Tue, 24 Apr 2012 18:39:38 -0400 Received: from type.ipv6 (youpi.is-a-geek.org [80.67.176.89]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by solo.fdn.fr (Postfix) with ESMTPS id F075B44131 for ; Wed, 25 Apr 2012 00:39:36 +0200 (CEST) Received: from samy by type.ipv6 with local (Exim 4.77) (envelope-from ) id 1SMoOV-0000PF-T5 for grub-devel@gnu.org; Wed, 25 Apr 2012 00:39:35 +0200 Date: Wed, 25 Apr 2012 00:39:35 +0200 From: Samuel Thibault To: The development of GNU GRUB Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support Message-ID: <20120424223935.GO29782@type.famille.thibault.fr> References: <20120423233423.GC4755@type.famille.thibault.fr> <4F966CAE.3080300@gmail.com> <20120424091915.GD4453@type.bordeaux.inria.fr> <4F967895.3010203@gmail.com> <20120424124220.GS4453@type.bordeaux.inria.fr> <4F96A85D.3040303@gmail.com> <20120424171358.GT4433@type.famille.thibault.fr> <4F9709A9.6090707@gmail.com> <20120424222110.GD29782@type.famille.thibault.fr> <4F9729BE.1060105@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F9729BE.1060105@gmail.com> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 80.67.169.19 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, 24 Apr 2012 22:39:42 -0000 Vladimir '=CF=86-coder/phcoder' Serbinenko, le Wed 25 Apr 2012 00:31:26 += 0200, a =C3=A9crit : > On 25.04.2012 00:21, Samuel Thibault wrote: > > Vladimir '=CF=86-coder/phcoder' Serbinenko, le Tue 24 Apr 2012 22:14:= 33 +0200, a =C3=A9crit : > >> On 24.04.2012 19:13, Samuel Thibault wrote: > >>> Vladimir '=CF=86-coder/phcoder' Serbinenko, le Tue 24 Apr 2012 15:1= 9:25 +0200, a =C3=A9crit : > >>>> On 24.04.2012 14:42, Samuel Thibault wrote: > >>>>>> I'm surprised that Hurd doesn't offer a way to just ask "What do= es this > >>>>>> filesystem translator consume?" > >>>>> A file can reside inside an iso file, which > >>>>> is stored in an ext2fs, which is stored in a file, > >>>> So much GRUB can handle. > >>> But how to express that to GRUB? grub_guess_root_devices only retur= ns > >>> a series of alternative paths. See below. > >> By just giving the file in question. > > That will not tell you which image has to be mounted to find it. > As I said: currently we assume that image is for VM use, so nothing > needs to be specifically mounted. Just return image filename. That would work with only one layer. See my example above, it has several layers, and you'd have to know the image filename at each layer. I'm not saying that GRUB should implement all these layers. I'm just explaining why the "what does this translator consume?" is not a trivial question at all in the Hurd, and thus does not have any interface for it, and we have to define one that would only work for the trivial cases. > > So would it be acceptable for now as a horrible-but-works solution to > > use the output of sysopts: > > > > ext2fs --writable --no-atime --no-inherit-dir-group --store-type=3Dty= ped device:hd1 > > > > and > > > > /hurd/ext2fs --writable --no-inherit-dir-group /dev/hd0s1 > > > > Drop the first parameter (translator path), -* options, and that leav= es > > only the device, with additional s_device:_/dev/_ mangling. > Yes it will, just we need comprehensive error messages on failure and a > comment in code that it's not complete solution. Sure. > >>>>> But we generally don't want to impose any syntax here, it could a= ctually > >>>>> be > >>>>> > >>>>> /opt/my/own/translator xyz > >>>>> > >>>>> I guess we'll have to impose some syntax anyway for whatever cont= ains > >>>>> /boot, so that grub can open it itself. > >>>> There should be a standartised way to get this information for any > >>>> conventional FS, otherwise it makes porting programs which use thi= s > >>>> information much more difficult and in most cases results in dirty > >>>> workarounds. > >>> So far, I've mostly seen GRUB really needing that information. > >> I suppose that databases would want to know this for optimisations. > > libstore does provide the best thing for that: the actual area on the > > disk, which is what was used in the very first patch already, and whi= ch > > is used for swap, etc. But that reveals to be actually too precise f= or > > GRUB. > It's more of it not being stable. You could access all the files by > blocklists but it would fail very quickly Yes, because it's too precise, and thus not stable. Samuel