grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH,HURD] Fix grub-probe with userland partition support


From: Samuel Thibault
Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support
Date: Tue, 24 Apr 2012 14:42:20 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

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?

> 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.

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, using the user's
own translator with no constraint on the naming convention, etc. etc.
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.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]