Bug 49524 - Mangle partition attributes when modifying a GPT
Summary: Mangle partition attributes when modifying a GPT
Status: RESOLVED NOTOURBUG
Alias: None
Product: udisks
Classification: Unclassified
Component: operations (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-05 02:18 UTC by Tails developers
Modified: 2012-05-06 12:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tails developers 2012-05-05 02:18:22 UTC
When doing any operations that modifies a GPT (e.g. creating a new partition), it looks like UDisks will loose attributes that has been set for other partitions.

Steps to reproduce:

1. Create a GPT on a disk with a partition (hereafter /dev/sdd).

2. Set attributes to this partition. e.g. by running:

       sgdisk /dev/sdd --attributes=1:set:2 \
                       --attributes=1:set:60 \
                       --attributes=1:set:62 \
                       --attributes=1:set:63

3. Verify that the attributes are there:

       sgdisk /dev/sdd --attributes=1:show

       1:2:1 (legacy BIOS bootable)
       1:60:1 (read-only)
       1:62:1 (hidden)
       1:63:1 (do not automount)

4. Create a new partition (using palimpsest).

5. Attributes are gone, as one can see using:

       sgdisk /dev/sdd --attributes=1:show

       (no output)

This test was made using version 1.0.1+git20100614-3 as shipped in Debian Squeeze, but looking at the NEWS file did not reveal any changes mentioned GPT handling.

We currently overcome this limitation the Tails [1] software used to initialize the persistent storage, but this means that any user modifications will prevent their Tails installation to boot (as syslinux will not find its flags).

[1] <https://tails.boum.org/>
Comment 1 David Zeuthen (not reading bugmail) 2012-05-05 08:51:55 UTC
Two questions

1. For udisks 1.x, we just use libparted IIRC - does this also happen if you use parted(8) directly instead of udisks?

2. Does it also happen with udisks 2.x? (here we just invoke parted(8) directly instead of using the C library)
Comment 2 Tails developers 2012-05-06 03:55:48 UTC
Using parted(8) directly (as in "parted /dev/sdd rm 2") also removes attributes on the other partition.

We have not tested with udisks 2.x, which is not part of Debian yet.
Comment 3 Tails developers 2012-05-06 06:36:02 UTC
At first glance, this bug might be related to https://bugzilla.redhat.com/show_bug.cgi?id=747497#c6
or https://lists.gnu.org/archive/html/bug-parted/2011-02/msg00023.html.
Comment 4 David Zeuthen (not reading bugmail) 2012-05-06 12:37:38 UTC
(In reply to comment #2)
> Using parted(8) directly (as in "parted /dev/sdd rm 2") also removes attributes
> on the other partition.

OK, so it sounds like this is a bug in libparted then. Closing as NOTOURBUG - thanks for filing the bug, though.

> We have not tested with udisks 2.x, which is not part of Debian yet.

This will be the same then (udisks 2.x is just running the parted(8) command).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.