From: Karel Zak <kzak@redhat.com>
To: Gabriel de Perthuis <g2p.code@gmail.com>
Cc: util-linux <util-linux@vger.kernel.org>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: PTUUID and PARTUUID (was: [PATCH v3] libblkid: print PTUUID, the partition table uuid)
Date: Thu, 13 Jun 2013 15:30:35 +0200 [thread overview]
Message-ID: <20130613133035.GA22795@x2.net.home> (raw)
In-Reply-To: <51B217E4.1000800@gmail.com>
On Fri, Jun 07, 2013 at 07:27:00PM +0200, Gabriel de Perthuis wrote:
> ---
> v3: Call it ID_PART_TABLE_UUID in udev rules
>
> libblkid/src/partitions/gpt.c | 8 ++++----
> libblkid/src/partitions/partitions.c | 14 +++++++++++---
> misc-utils/blkid.c | 3 +++
> 3 files changed, 18 insertions(+), 7 deletions(-)
I have applied a little bit different version. Anyway, you have to
modify udevd to make it usable with in built-in blkid. It also
exports MBR ID (so the change is not GPT specific) as partition
table pseudo UUID. Examples:
# blkid -p -o udev /dev/sda
ID_PART_TABLE_UUID=3549290f-417c-4941-8503-f7835109b821
ID_PART_TABLE_TYPE=gpt
# blkid -p -o udev /dev/sdb
ID_PART_TABLE_UUID=54e743a7
ID_PART_TABLE_TYPE=dos
Note that I have also add support for Dos partitions pseudo-uuids. The
implementation is compatible with Linux kernel root=PARTUUID= command
line option.
The PARTUUID for Dos partitions is based on MBR Id and partition number,
for example:
# blkid /dev/sdb1
/dev/sdb1: TYPE="ext2" PARTUUID="54e743a7-01"
is the first partition on disk with PTUUID=54e743a7. So you can use
# mount PARTUUID="54e743a7-01" /mnt/test
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2013-06-13 13:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 17:27 [PATCH v3] libblkid: print PTUUID, the partition table uuid Gabriel de Perthuis
2013-06-13 13:30 ` Karel Zak [this message]
2013-06-13 13:40 ` PTUUID and PARTUUID (was: [PATCH v3] libblkid: print PTUUID, the partition table uuid) Gabriel de Perthuis
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=20130613133035.GA22795@x2.net.home \
--to=kzak@redhat.com \
--cc=g2p.code@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=util-linux@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox