bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need for a unique Linux GPT GUID type code (PATCH included)


From: Rod Smith
Subject: Re: Need for a unique Linux GPT GUID type code (PATCH included)
Date: Thu, 23 Jun 2011 16:22:17 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110514 Lightning/1.0b3pre Thunderbird/3.1.10

On 06/23/2011 02:43 PM, Brian C. Lane wrote:
On Thu, Jun 23, 2011 at 12:38:10AM -0400, Rod Smith wrote:
Hi,

I've recently discovered that when Windows reads a GPT disk with
Linux partitions on it, those partitions are given drive letters and
show up as unformatted. This situation can happen with removable
disks or when Linux and Windows dual-boot on a UEFI-based computer.
Because UEFI is becoming more common, this situation is also
becoming more common. This strikes me as a disaster waiting to
happen; sooner or later, somebody is going to trash a Linux
installation by opting to format a Linux partition in Windows.

This seems like a good idea. But I worry about tools and other OS's that
expect the current behavior. And as Jim pointed out we don't always
have a Linux filesystem on partitions we create.

Offhand I don't know of anything that expects the current behavior, although of course I'm not omniscient. I *DO* know of a serious problem with the current behavior, though.

If you want to implement this change in stages to minimize problems if there are tools that rely on the current behavior, that's fine by me. I'd recommend a three-stage approach:

1. The creation of a new Linux-only GUID code and an option in parted
   to use it rather than the Microsoft basic data type code, but the
   default would still be the Microsoft basic data type code. Given the
   current parted user interface, the easiest way to do this would be
   to implement a new "flag", presumably for the new Linux type code.
   That way, you could leave the default behavior as it is now, but
   users would have the option of setting the new Linux filesystem
   flag. Alternatively, you could define this as a "Microsoft flag"
   that's set by default, and removing it results in the new Linux
   GUID code.

2. At a later date, you could configure the code to set the "Linux
   flag" by default on new Linux filesystems, giving users the option
   to remove it if that causes problems. Partitions intended for use
   with FAT and NTFS would obviously not have this flag set.

3. At some point (conceivably concurrent with step #2), a more flexible
   method of specifying GUID type codes could be created, both at
   partition creation and after the fact. This would also enable
   actions like changing a type from Linux to Mac OS or vice-versa,
   which I don't believe parted can do right now.

As to filesystems not always being present, that's true; but parted, at least, always asks about the filesystem type, and that's what it uses to determine the partition's type code -- definitely for GPT and I expect for MBR, although I've not checked the code for MBR.

--
Rod Smith
address@hidden
http://www.rodsbooks.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]