From: Andrey Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: linux-hotplug@vger.kernel.org, scdbackup@gmx.net
Subject: Re: How important is the MBR partition offset of grub-mkrescue ?
Date: Mon, 4 Nov 2013 16:08:43 +0400 [thread overview]
Message-ID: <20131104160843.5c0cabd2@opensuse.site> (raw)
In-Reply-To: <1974651407333528403@scdbackup.webframe.org>
В 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.
WARNING: multiple messages have this Message-ID (diff)
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: linux-hotplug@vger.kernel.org, scdbackup@gmx.net
Subject: Re: How important is the MBR partition offset of grub-mkrescue ?
Date: Mon, 04 Nov 2013 12:08:43 +0000 [thread overview]
Message-ID: <20131104160843.5c0cabd2@opensuse.site> (raw)
In-Reply-To: <1974651407333528403@scdbackup.webframe.org>
В 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
next prev parent reply other threads:[~2013-11-04 12:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-02 18:57 How important is the MBR partition offset of grub-mkrescue ? Thomas Schmitt
2013-11-02 23:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-03 12:21 ` Thomas Schmitt
2013-11-03 13:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-03 15:21 ` Thomas Schmitt
2013-11-03 15:48 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-03 16:19 ` Thomas Schmitt
2013-11-03 16:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-03 17:16 ` Thomas Schmitt
2013-11-04 12:08 ` Andrey Borzenkov [this message]
2013-11-04 12:08 ` Andrey Borzenkov
2013-11-04 14:03 ` Thomas Schmitt
2013-11-04 14:10 ` Andrey Borzenkov
2013-11-04 14:21 ` Thomas Schmitt
2013-11-04 15:44 ` Thomas Schmitt
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=20131104160843.5c0cabd2@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=linux-hotplug@vger.kernel.org \
--cc=scdbackup@gmx.net \
/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.