* Re: How important is the MBR partition offset of grub-mkrescue ?
[not found] ` <1974651407333528403@scdbackup.webframe.org>
@ 2013-11-04 12:08 ` Andrey Borzenkov
2013-11-04 15:44 ` Thomas Schmitt
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2013-11-04 12:08 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: linux-hotplug, scdbackup
В Sun, 03 Nov 2013 18:16:09 +0100
"Thomas Schmitt" <scdbackup@gmx.net> пишет:
> Hi,
>
> i believe to have found the udev rules in Debian 6 which
> govern the population of /dev/disk/by-label.
>
> File
> /lib/udev/rules.d/60-persistent-storage.rules
> has
> # probe filesystem metadata of disks
> KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
> ...
> ENV{ID_FS_LABEL_ENC}="?*", ENV{ID_FS_USAGE}="filesystem|other", \
> SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
>
> I understand that if blkid sets variable ID_FS_LABEL_ENC to
> a non-empty value, then this will become the link name in ./by-label.
> The link target is the device that is being examined by the rule.
>
> From a USB stick with partition start LBA 1, i get:
>
> $ /sbin/blkid -o udev -p /dev/sdb
> ID_PART_TABLE_TYPE=dos
> ID_FS_LABEL=epidemic-4.1-b1-1-ts-amd64
> ID_FS_LABEL_ENC=epidemic-4.1-b1-1-ts-amd64
> ID_FS_TYPE=iso9660
> ID_FS_USAGE=filesystem
> $ /sbin/blkid -o udev -p /dev/sdb1
> $
>
> So why the hell does /dev/sdb1 become link target ?
> Its ID_FS_LABEL_ENC must be empty.
>
> Any idea how to get a verbous log of these decisions ?
>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How important is the MBR partition offset of grub-mkrescue ?
2013-11-04 12:08 ` How important is the MBR partition offset of grub-mkrescue ? Andrey Borzenkov
@ 2013-11-04 15:44 ` Thomas Schmitt
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Schmitt @ 2013-11-04 15:44 UTC (permalink / raw)
To: linux-hotplug
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-04 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <52767048.9050902@gmail.com>
[not found] ` <1974651407333528403@scdbackup.webframe.org>
2013-11-04 12:08 ` How important is the MBR partition offset of grub-mkrescue ? Andrey Borzenkov
2013-11-04 15:44 ` Thomas Schmitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).