After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634668 - Resizing of NTFS fails if partition type is 42
Resizing of NTFS fails if partition type is 42
Status: RESOLVED OBSOLETE
Product: gparted
Classification: Other
Component: application
0.5.0
Other All
: Normal minor
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2010-11-12 08:50 UTC by Nils Hildebrand
Modified: 2020-11-13 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
error log (13.40 KB, text/html)
2010-11-13 11:12 UTC, LAZA
Details
creation of a new ntfs partition after failure (3.53 KB, text/html)
2010-11-13 11:13 UTC, LAZA
Details

Description Nils Hildebrand 2010-11-12 08:50:42 UTC
Hi,

I stumbled acrosse a problem which propably still exists. I was using the rather old parted version supplied with PartEdMagic 4.8 (this seems to be a Linux iso, uanme -a is "Linux 2.6.32.2-pqmagic").

I assume the problem exists in all gparted-OS-version so I set the OS to "all" for this bug.

Now for the setup:
I am running XP SP3 32 Bit (Guest OS) with VirtualBox using CentOS 5 (Host OS).

XP is using a Linux LV as its "Disk" - which is being emulated as IDE-disk.

This Disk contained a single partiton, which in turn appears as "C:" in XP.

Now i needed to enlarge my "C:" disk - which almost impossible using Windows-Means. The Linux-part was simple: grow the LV by 4 GB then reimport that LV as "disk" to VirtualBox. So the disk itselv was now bigger, but C: (and thus the partition that makes um "C:" had to be grown, too).

So I booted my VM using the iso for PartEdMagic 4.8 which in turn uses gparted 0.5.

ok - I tried to resize my partition by extending the end of the partiton to the end of the disk (resize) and clicked on apply.

This failed with the error message similar to that a "Windows Dynamic Disk" can't be resized.

I asked our Win-Gurus what to do - they told me to start a different Windows with my original disk attached as secondary disk, then I should start Windows-diskpart and then convert my windows-partition to "basic". This method failed, so I tried a different approach: I just set the partition type from "$42 = SFS" to "$7 = NTFS".

Now the resize using gparted worked without problem. After booting the XP VM it did a full file-system-check, then after XP was up and running XP detected new hardware (propably due to the changed type of "disk") and needed a reboot. After that reboot all was clean an well with a bigger "C:".

The reason why I am filing this as a bug:
The resize is possible - I see two solutions:

1. Build in a functionality to convert type 42 to type 7 BEFORE resizing or

2. Give a hint in the error-message that manually setting the partiton type to 7 might help to resolve the problem 

Kind regards

Nils Hildebrand
Comment 1 LAZA 2010-11-13 11:12:12 UTC
Created attachment 174380 [details]
error log
Comment 2 LAZA 2010-11-13 11:13:00 UTC
Created attachment 174381 [details]
creation of a new ntfs partition after failure

creation of a new ntfs partition after failure without problems - but also without data!
Comment 3 Curtis Gedak 2010-11-13 15:57:20 UTC
LAZA, I believe that the problem you registered is not the same as that noted by Nils Hildebrand.  In your case you should run "chkdsk /f" from Windows and reboot Windows twice.  If you problem continues, please open a new bug report for your situation.
Comment 4 Nils Hildebrand 2010-11-15 09:44:18 UTC
(In reply to comment #3)
> LAZA, I believe that the problem you registered is not the same as that noted
> by Nils Hildebrand.  In your case you should run "chkdsk /f" from Windows and
> reboot Windows twice.  If you problem continues, please open a new bug report
> for your situation.

correct - my problem describes a resizing with existing data. As far as I could seen the data is correct after the resize.
Comment 5 Curtis Gedak 2010-11-15 16:36:35 UTC
Thank you Nils for reporting this discovery.

From looking at the a list of partition type identifiers, it appears that 42 can refer to more than one type of partition:

Quote from http://www.win.tue.nl/~aeb/partitions/partition_types-1.html:
----- begin quote -----

42 Linux swap (sharing disk with DRDOS)
42 SFS (Secure Filesystem)

    SFS is an encrypted filesystem driver for DOS on 386+ PCs, written by Peter Gutmann.
42 Windows 2000 dynamic extended partition marker

    If a partition table entry of type 0x42 is present in the legacy partition table, then W2K ignores the legacy partition table and uses a proprietary partition table and a proprietary partitioning scheme (LDM or DDM). As the Microsoft KnowledgeBase writes: Pure dynamic disks (those not containing any hard-linked partitions) have only a single partition table entry (type 42) to define the entire disk. Dynamic disks store their volume configuration in a database located in a 1-MB private region at the end of each dynamic disk.

----- end quote -----


Based on the description for Windows 2000, it seems that a true "Dynamic disk" uses a proprietary partitioning scheme.  As such it would likely not be safe to assume that the partition contains only a normal NTFS file system.  My knowledge of Windows dynamic disks is limited, but I suspect yours was using a basic structure that happened to be compatible with a normal NTFS file system.  Other types of dynamic disks might not demonstrate this same compatibility.

Consequently much more information would be required on Dynamic disk structure before assuming that simply changing the partition type from 42 to 7 would work in all cases.

Was this a partition that you formatted as a "Dynamic Disk"?
If so perhaps you could provide more background on dynamic disks?
Comment 6 Nils Hildebrand 2010-11-16 09:03:41 UTC
(In reply to comment #5)
> Thank you Nils for reporting this discovery.
> 
> From looking at the a list of partition type identifiers, it appears that 42
> can refer to more than one type of partition:
> 
> Quote from http://www.win.tue.nl/~aeb/partitions/partition_types-1.html:
> ----- begin quote -----
> 
> 42 Linux swap (sharing disk with DRDOS)
> 42 SFS (Secure Filesystem)
> 
>     SFS is an encrypted filesystem driver for DOS on 386+ PCs, written by Peter
> Gutmann.
> 42 Windows 2000 dynamic extended partition marker
> [...]

> Consequently much more information would be required on Dynamic disk structure
> before assuming that simply changing the partition type from 42 to 7 would work
> in all cases.
> 
> Was this a partition that you formatted as a "Dynamic Disk"?
> If so perhaps you could provide more background on dynamic disks?

Hi,

Linux Swap on DRDOS - I don't think this one is around any more. ;-)
SFS on DOS - sounds rather outdated, too.

But anyway - gparted detected the partiton as NTFS so it seems the combination type42+NTFS filesystem should be a good enough indication for a dynamic disk.

Since I am not a windows guru (any more) I can't say much about that partition type. But from your quote I would say - yes seems to be more complicated than I thought.

So I think going for the "hint"-solution is the fastest way for solving this problem.

As far as I remember I converted a baisc partition to the dynamic disk somehow - this might also be essetial to the easy way to convert it back to a simple type 7-ntfs.

Kind regards

Nils
Comment 7 André Klapper 2020-11-13 10:40:42 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use gparted and if you still see this bug / want this feature in a recent and currently supported version, then please feel free to report it at
https://gitlab.gnome.org/GNOME/gparted/-/issues/
by following the guidelines at
https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines

Thank you for creating this report and we are sorry it could not be implemented so far (volunteer workforce and time is limited).