From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SMjJV-0001of-0u for mharc-grub-devel@gnu.org; Tue, 24 Apr 2012 13:14:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMjJT-0001oY-4B for grub-devel@gnu.org; Tue, 24 Apr 2012 13:14:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMjJR-00086T-5l for grub-devel@gnu.org; Tue, 24 Apr 2012 13:14:02 -0400 Received: from solo.fdn.fr ([80.67.169.19]:36745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMjJQ-00085p-T5 for grub-devel@gnu.org; Tue, 24 Apr 2012 13:14:01 -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 517F444437 for ; Tue, 24 Apr 2012 19:13:59 +0200 (CEST) Received: from samy by type.ipv6 with local (Exim 4.77) (envelope-from ) id 1SMjJO-0006bi-Ep for grub-devel@gnu.org; Tue, 24 Apr 2012 19:13:58 +0200 Date: Tue, 24 Apr 2012 19:13:58 +0200 From: Samuel Thibault To: The development of GNU GRUB Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support Message-ID: <20120424171358.GT4433@type.famille.thibault.fr> References: <4F9532B5.9050701@gmail.com> <20120423110627.GL4755@type.famille.thibault.fr> <4F953A3B.3000708@gmail.com> <20120423212606.GV4755@type.famille.thibault.fr> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F96A85D.3040303@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 17:14:04 -0000 Vladimir '=CF=86-coder/phcoder' Serbinenko, le Tue 24 Apr 2012 15:19:25 += 0200, a =C3=A9crit : > On 24.04.2012 14:42, Samuel Thibault wrote: > > Vladimir '=CF=86-coder/phcoder' Serbinenko, le Tue 24 Apr 2012 11:55:= 33 +0200, a =C3=A9crit : > >> They have iso9660 spanning through > >> the whole disk but all of the disk other than the first sector is > >> in some kind of partition table to avoid it being accidentally > >> overwritten. So even though the file itself is inside a partition, = we > >> want the whole disk. > > The partition itself can not be mounted? > No, since it contains FS structures at wrong offset. Ok. > >> Also if file is 0-sized, sparse, compressed or encrypted it won't ha= ve > >> blocklist and this approach would fail, possibly even with out-of-ra= nge > >> array access. > > Other than 0-sized would work, the eventual storage would still be on > > the partition. > completely sparse just has a size and not backed by any storage. That's included in "0-size" in my head :) > > 0-sized indeed poses problems. > > > >> I'm surprised that Hurd doesn't offer a way to just ask "What does t= his > >> filesystem translator consume?" > > Because the whole point of the Hurd is to let the user have access > > to more powerful ways. 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 returns a series of alternative paths. See below. > We don't handle loopback automatically right now since it's not clear > whether it's a loopback for VM or loopback used on host. You'd need to know which files to open anyway. You don't want to browse all filesystems for that :) So the OS-specific function has to tell you. > > using the user's > > own translator with no constraint on the naming convention, etc. etc. > For these ones we're limited at what GRUB can. grub-probe is used for 2 > purposes: > 1) Determining the device for root, its FS and UUID > 2) Determining the GRUB environment on boot. > The first is used in grub-mkconfig and if Hurd is so much more flexible > 10_hurd.in may need to be adjusted accordingly. Sure. > As for the second, we're limited to what GRUB can do and so it won't be > possible to have /boot on translator from hyperspace. Sure. But it can be something expressed in a complex way by the user, which can actually be reached by GRUB. That said, as I said earlier, we can ask the user to refrain himself when it's about /boot. > > But we generally don't want to impose any syntax here, it could actua= lly > > be > > > > /opt/my/own/translator xyz > > > > I guess we'll have to impose some syntax anyway for whatever contains > > /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 this > information much more difficult and in most cases results in dirty > workarounds. So far, I've mostly seen GRUB really needing that information. Samuel