All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support
Date: Tue, 24 Apr 2012 15:19:25 +0200	[thread overview]
Message-ID: <4F96A85D.3040303@gmail.com> (raw)
In-Reply-To: <20120424124220.GS4453@type.bordeaux.inria.fr>

[-- Attachment #1: Type: text/plain, Size: 3234 bytes --]

On 24.04.2012 14:42, Samuel Thibault wrote:
> Vladimir 'φ-coder/phcoder' Serbinenko, le Tue 24 Apr 2012 11:55:33 +0200, a écrit :
>> 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-range
>> 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 this
>> 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=typed device:hd1
>
> But we generally don't want to impose any syntax here, it could actually
> 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.


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2012-04-24 13:19 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-22 18:24 [PATCH,HURD] Fix grub-probe with userland partition support Samuel Thibault
2012-04-23  8:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-23  9:40   ` Samuel Thibault
2012-04-23 10:45     ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-23 11:06       ` Samuel Thibault
2012-04-23 11:17         ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-23 21:26           ` Samuel Thibault
2012-04-23 23:34             ` Samuel Thibault
2012-04-24  8:55               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:00                 ` Samuel Thibault
2012-04-24  9:12                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:16                     ` Samuel Thibault
2012-04-24  9:26                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:36                         ` Samuel Thibault
2012-04-24  9:38                           ` Samuel Thibault
2012-04-24  9:44                             ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:49                               ` Samuel Thibault
2012-04-24  9:04               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:19                 ` Samuel Thibault
2012-04-24  9:55                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 12:42                     ` Samuel Thibault
2012-04-24 13:19                       ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2012-04-24 17:13                         ` Samuel Thibault
2012-04-24 20:14                           ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 22:21                             ` Samuel Thibault
2012-04-24 22:31                               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 22:39                                 ` Samuel Thibault
2012-04-24 22:46                                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 23:52                                 ` Samuel Thibault
2012-04-24 23:57                                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-25  0:27                                     ` Samuel Thibault
2012-04-25  8:36                                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-25  9:37                                         ` Samuel Thibault
2012-04-27 18:45                                           ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-30 18:58                                             ` Samuel Thibault
2012-05-01 13:12                                               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-05-03 21:42                                               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-23  9:07 ` Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F96A85D.3040303@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.