From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SMfeh-0006rB-AP for mharc-grub-devel@gnu.org; Tue, 24 Apr 2012 09:19:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfed-0006qu-8x for grub-devel@gnu.org; Tue, 24 Apr 2012 09:19:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMfeW-0003Ms-M0 for grub-devel@gnu.org; Tue, 24 Apr 2012 09:19:38 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:51498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfeW-0003J4-AE for grub-devel@gnu.org; Tue, 24 Apr 2012 09:19:32 -0400 Received: by wibhj13 with SMTP id hj13so3000109wib.12 for ; Tue, 24 Apr 2012 06:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=xR8UEZCmXKG3TLo1wmgoGxuUayRDnQHXbuNwmf3zRFc=; b=APucyNno5V9huO0Pq98PSHy9Jzgbaahe5mkw9zDmUEXR455AVh1N1A945noxJiUu9N /T5YVHUcpE+0gEDju3UG9JUo+9SNvzvBZKnR+5ld9kxxyeZaZ0B2v9xkeR/7o0vgdyTZ J6h1hmJ4BH5Km7D0/CKgGh9dMdkKmjeHXarkX/FyJcPpLFL1A0ONHAbGq8NtAse7HCkC wWGuyILNNBMDugwkGDAByI6ytIEeKD2UFXcZSYAXIFjICHFDMO09bNyRegYa5Mqeyz3F G15AEZQhIPzqE9FsdDzFkedfwCzfEJxXBxqPV2aRuYiMW6tb3n+3WDUNBEGk5gmsMdSb +qag== Received: by 10.180.88.199 with SMTP id bi7mr31377723wib.12.1335273569490; Tue, 24 Apr 2012 06:19:29 -0700 (PDT) Received: from debian.x201.phnet (59-233.197-178.cust.bluewin.ch. [178.197.233.59]) by mx.google.com with ESMTPS id ev10sm29831390wid.10.2012.04.24.06.19.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 06:19:28 -0700 (PDT) Message-ID: <4F96A85D.3040303@gmail.com> Date: Tue, 24 Apr 2012 15:19:25 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120329 Icedove/10.0.3 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support References: <4F951839.4070309@gmail.com> <20120423094030.GB4755@type.famille.thibault.fr> <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> In-Reply-To: <20120424124220.GS4453@type.bordeaux.inria.fr> X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig4523785FE61B68BC50D63205" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.171 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 13:19:41 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4523785FE61B68BC50D63205 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 : >> One could have hd0s1 containing hd0s5 and hd0s6. > Argl, I forgot that case indeed. It's funny how that contracts the very= > word "partition"... > >> In this case we want hd0s5 and not hd0s1. On the other hand a file may= >> reside in partition but be part of a filesystem spanning through the >> whole disk. This is common for all kinds of hybrid CDROMs, including >> the ones created by grub-mkrescue. 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. >> Also if file is 0-sized, sparse, compressed or encrypted it won't have= >> blocklist and this approach would fail, possibly even with out-of-rang= e >> 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. > 0-sized indeed poses problems. > >> I'm surprised that Hurd doesn't offer a way to just ask "What does thi= s >> 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. 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. > 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. 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. grub-probe should error-out if it reaches a translator which can't be handled by GRUB. > That's why it generally does not make sense to know where a file comes > from, because you would not know how to parse the result. The proper > way would be asking the FS, which may tell you > > /hurd/ext2fs --writable --no-inherit-dir-group /dev/hd0s1 > > or > > ext2fs --writable --no-atime --no-inherit-dir-group --store-type=3Dtype= d device:hd1 > > But we generally don't want to impose any syntax here, it could actuall= y > 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. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig4523785FE61B68BC50D63205 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk+WqF0ACgkQNak7dOguQgkUhAD/d2hb7C43pWwhJr6a9gg4ucP0 LfFyBn8TL58P3Yey/dcA/RgQABwGszmE3UBSe16bBe3xuIVOHD79b15Fn4hrGxDB =BoLj -----END PGP SIGNATURE----- --------------enig4523785FE61B68BC50D63205--