[Bug 1333462] Re: Precise: Linux partitioning tools give GPT Linux partitions wrong type code

Steve Langasek steve.langasek at canonical.com
Fri Jul 25 19:41:58 UTC 2014


Hello Rafael, or anyone else affected,

Accepted parted into precise-proposed. The package will build now and be
available at http://launchpad.net/ubuntu/+source/parted/2.3-8ubuntu5.2
in a few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed.  In either case, details of your testing will help
us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: parted (Ubuntu Precise)
       Status: In Progress => Fix Committed

** Tags added: verification-needed

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1333462

Title:
  Precise: Linux partitioning tools give GPT Linux partitions wrong type
  code

Status in “parted” package in Ubuntu:
  Fix Released
Status in “parted” source package in Precise:
  Fix Committed

Bug description:
  [Impact]

  From: Rod Smith <rodsmith <at> rodsbooks.com>:
  """
  This problem occurs because Linux partitioning tools (libparted and my own GPT fdisk) give Linux partitions the same partition type code GUID used by Windows for its filesystem partitions (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). Linux has its own GUID type codes for other partition types, such as RAID, LVM, and swap space.

  Linux needs its own partition type code GUID for filesystem partitions
  on GPT disks, much as it has its own MBR partition type code for
  filesystems (0x83 on MBR). In Windows, using the same GUID type code
  for Linux partitions that Windows uses for NTFS and FAT results in
  Linux partitions appearing in the list of available disks. Using a
  unique type code for Linux partitions, however, hides those partitions
  from Windows.

  This is desirable because it's easy to accidentally trash a Linux partition in Windows by double-clicking it. (Windows DOES ask before formatting it, but a user who's confused, tired, distracted, etc., could easily make the wrong choice.)
  """

  As a result, the grub menu end up with a "Windows option" because os-
  prober detect a ntfs partition (in /usr/lib/os-
  probes/mounted/20microsoft).

  [Test Case]

  ### commands:

  root at 12-04-precise-lts-amd64:~# parted /dev/vdb
  GNU Parted 2.3
  Using /dev/vdb
  Welcome to GNU Parted! Type 'help' to view a list of commands.
  (parted) p
  Error: /dev/vdb: unrecognised disk label
  (parted) mklabel gpt
  (parted) mkpart primary
  File system type?  [ext2]?
  Start? 1024B
  End? 1070MB
  (parted) p
  Model: Virtio Block Device (virtblk)
  Disk /dev/vdb: 1074MB
  Sector size (logical/physical): 512B/512B
  Partition Table: gpt

  Number  Start   End     Size    File system  Name     Flags
   1      17.4kB  1070MB  1070MB               primary

  ### confirming wrong default partition type

  root at 12-04-precise-lts-amd64:~# gdisk /dev/vdb
  ...
  Found valid GPT with protective MBR; using GPT.
  ...
  Command (? for help): p
  Disk /dev/vdb: 2097152 sectors, 1024.0 MiB
  Logical sector size: 512 bytes
  Disk identifier (GUID): B6D13DE1-2825-40D4-9D21-230E5E6F6EA0
  ...
  Number  Start (sector)    End (sector)  Size       Code  Name
     1              34         2089843   1020.4 MiB  0700  primary

  ### 0700 = Microsoft basic data

  [Regression Potential]

   * Partitions can be wrongly set with different types but it highly
  unlikely this potential regression would cause harm to
  existent/mounted disks/data. Fix is based on upstream fixes being
  cherry-picked.

  [Other Info]

   * n/a

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1333462/+subscriptions



More information about the Ubuntu-sponsors mailing list