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

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

 



Hi,

Andrey Borzenkov wrote:
> 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.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.
> 
> I'm interested in which information actually needs to be imported from
> parent. May be it should be less aggressive.

Background:
I started this discussion on grub-devel because the problem
shows up with bootable ISO 9660 images produced by grub-mkrescue.

These images are suitable for booting from CD/DVD and from
USB stick. They begin by an MBR which marks a single partition
beginning at LBA 1. The ISO filesystem has to begin at LBA 0,
because else it would not be bootable from CD/DVD.
So the partition is not mountable, intentionally. It just protects
the ISO filesystem from partition editors and alike, but leaves
the MBR unclaimed in order to please some boot firmware.

Nevertheless the partition shows up as link in /dev/disk/by-label
under the name of the ISO filesystem Volume Id.

After Andrey Borzenkov pointed me to IMPORT{parent}, i added
statements to reset the blkid ID_FS_* properties:

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

I hope this is not a totally stupid beginner's mistake.
At least it solved the problem on my system.
Now the link points to /dev/sdb rather than to /dev/sdb1.

So i assume that before the change, the partition link overwrote
the disk link.


Have a nice day :)

Thomas

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux