grub-devel
[Top][All Lists]
Advanced

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

Re: How important is the MBR partition offset of grub-mkrescue ?


From: Thomas Schmitt
Subject: Re: How important is the MBR partition offset of grub-mkrescue ?
Date: Mon, 04 Nov 2013 15:03:45 +0100

Hi,

Andrey Borzenkov:
> I confirm this. The culprit is this rule in 60-persistent-storage.rules:
> 
> # for partitions import parent information
> ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
>
> I'm not really sure how exactly to fix it. [...]
> I'm interested in which information actually needs to be
> imported from parent. May be it should be less aggressive.

In its broadness it looks like a mistake.
Bringing the filesystem label from the overall device to the
partition makes few sense.

I cannot spot a rule that would exclude DEVTYPE "disk" from
./by-label. So i assume that the partition link overwrote
the device link.

I am very unkeen with udev. Just imitating a skilled programmer
i think that this could be a fix:

ENV{DEVTYPE}=="partition",              IMPORT{parent}="ID_*", \
        ENV{ID_FS_LABEL}="" , ENV{ID_FS_LABEL_ENC}="" , \
        ENV{ID_FS_TYPE}="" , ENV{ID_FS_USAGE}=""

I am not sure whether ID_PART_TABLE_TYPE is intended to
propagate from storage device to partition. At least it
could make some sense.

Ok. Bold try. Adding the setters to the parent import.
Running udevadm control --reload-rules. Plugging stick
with partition start LBA 1.
Success !
  epidemic-4.1-b1-1-ts-amd64 -> ../../sdb

So it seems that really the "disk" link was overwritten by the
"partition" link.

This will still happen if grub-mkrescue was used with extra option
-partition_offset 16. But in that case it is intentional and
beautifying. (And even if it does not happen, it makes no difference.)


> I.e. normally it is assumed that device is either partitioned or not.
> Situation when we have filesystem on a whole disk *and* individual
> partitions ... not sure.

Obviously this was not foreseen when the rules were written.

Is there an upstream with whom one could discuss this issue
and who - in best case - could propagate an improvement
downstream ?

Can GRUB2 do advertising for above change in the rule set ?


Have a nice day :)

Thomas




reply via email to

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