bug-parted
[Top][All Lists]
Advanced

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

"msftres" flag bug while using GNU Parted in a GPT disk


From: KESHAV P.R.
Subject: "msftres" flag bug while using GNU Parted in a GPT disk
Date: Sat, 11 Jul 2009 00:13:10 +0530

Please correct the "msftres" flag bug in libparted by deleting the following code from (parted-source-dir)/libparted/labels/gpt.c :-

if (strncmp (fs_type->name, "fat", 3) == 0
|| strcmp (fs_type->name, "ntfs") == 0) {
gpt_part_data->type = PARTITION_MSFT_RESERVED_GUID;
return 1;
}

The "Microsoft Reserved" Partition in GPT is needed only for conversion from a basic disk to dynamic disk in Windows. Otherwise it is not at all needed and according to Microsoft, any FAT(16,32 etc..) or NTFS partition(s) should be "Basic Data Partition" if they have to be accessible in Windows and Mac (Linux allows access even to a msftres partition).

Think of it like the 128 MB gap between partitions imposed by Mac OS X's Disk Utility in GPT disk for future usage which cannot be anticipated at present. Microsoft creates this partition for any future usage similar to the 128 MB gap.

The above mentioned code in libparted assumes that any FAT or NTFS partition must be marked as Microsoft Reserved (the same way any HFS partition must be marked Apple_HFS), but this is not correct.

This bug can be corrected by either deleting the above lines or by modifying them as follows :-

if (strncmp (fs_type->name, "fat", 3) == 0
|| strcmp (fs_type->name, "ntfs") == 0) {
gpt_part_data->type = PARTITION_BASIC_DATA_GUID;
return 1;
}


Related Info :-

What is a Microsoft Reserved Partition?

The Microsoft Reserved Partition reserves space on each disk drive for subsequent use by operating system software. GUID Partition Table disks do not allow hidden sectors. Software components that formerly used hidden sectors now allocate portions of the Microsoft Reserved Partition for component-specific partitions. For example, converting a basic disk to a dynamic disk causes the Microsoft Reserved Partition on that disk to be reduced in size and a newly created partition holds the dynamic disk database.

Will end users see the Extensible Firmware Interface System Partition, Microsoft Reserved Partition, and OEM-specific partitions?

The user won't see these partitions exposed in Windows Explorer, nor is any recognized file system exposed to legacy programs such as Context Indexing. The Extensible Firmware Interface System Partition, OEM-specific, and other unrecognized partitions will be visible only in the Disk Management MMC snap-in. Back to the top

What partitions are mounted by default by Windows?

Windows exposes only basic data partitions. Other partitions with FAT file systems may be mounted, but not exposed (only programmatically). Only basic data partitions are assigned drive letters or mount points.

The Microsoft Reserved Partition (and any partitions that are created from the Microsoft Reserved Partition) could have recognizable file systems; none are exposed.

What happens when a basic disk is converted to dynamic?

For a drive to be eligible for conversion to dynamic, all basic data partitions on the drive must be contiguous. If other unrecognized partitions separate basic data partitions, the disk cannot be converted. This is one of the reasons that the Microsoft Reserved Partition must be created before any basic data partitions.

The first step in conversion is to separate a portion of the Microsoft Reserved Partition to create the configuration database partition. All non-bootable basic partitions are then combined into a single data container partition. Boot partitions are retained as separate data container partitions. This is analogous to conversion of primary partitions.

Retrieved from http://support.microsoft.com/kb/302873 - Microsoft FAQ about GPT Disk Architecture in Windows XP & Vista.

Bug reports have also been filed at http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/186 and http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/215 .


Other Feature Requests :-

Also implement the ability to type any arbitary Partition type GUID for a GPT Partition. Parted does not contain hardcoded GUIDs for partitions like AppleTV Recovery and Windows Recovery Environment Partitions etc. This particular feature is very important for people who are struck up with AppleTV or WinRE or any other partitions types which Parted does not recognise.

Also check out the features of this software GPT fdisk or gdisk - http://rodsbooks.com/gdisk/ and http://sourceforge.net/projects/gptfdisk/ . It contains many useful GPT features which are absent in GNU Parted.

Thank you.


reply via email to

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