[Bug 1333462] Re: Precise: Linux partitioning tools give GPT Linux partitions wrong type code
Phillip Susi
psusi at ubuntu.com
Tue Jun 24 19:33:51 UTC 2014
A few comments on your patch:
First, we prefer to work with bzr branches rather than diffs these days.
You might want to see https://wiki.ubuntu.com/DistributedDevelopment.
Second, the changelog entry should mention the name of the patch, in
addition to its description, and note that it is a cherry-pick from
upstream, for example:
add-support-for-a-new-Linux-specific-GPT-partition-t.patch: Cherry pick
upstream patch to add Linux own partition type code GUID for fs
partitions on GPT disks (LP: #1333462)
Finally, it looks like you snuck in two other unrelated patches, which
is a no-no.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to parted in Ubuntu.
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:
In Progress
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 foundations-bugs
mailing list