Opened 3 years ago

Last modified 12 months ago

#17050 new enhancement

DriveSetup does not change partition type when reformatting existing partition

Reported by: mr-victory Owned by: stippi
Priority: high Milestone: Unscheduled
Component: Applications/DriveSetup Version: R1/Development
Keywords: drivesetup partition type filesystem Cc:
Blocked By: Blocking:
Platform: All

Description

When DriveSetup is used to format a partition with a different filesystem than the partition contains, DriveSetup does not update the type of the partition according to the new filesystem. The partition type I mention is a hardcoded value either in MBR or GPT. There is a similar ticket mentioning this issue: ticket:4467 . This issue does not affect the bootability of Haiku.

To reproduce this issue:

  1. Create a partition and set a type. In the screenshot (partition "test") I chose "Windows Data".
  2. Create a filesystem matching the partition type. I chose NTFS.
  3. Reformat with a different filesystem. I chose BFS.

The result is a BFS formatted partition with type "Windows Data", the filesystem type and partition type are in conflict. I tested with partitions on MBR, GPT and different filesystems, problem always appears. I used hrev55216 x86_64 to test.

Attachments (1)

drivesetup.png (37.4 KB ) - added by mr-victory 3 years ago.

Download all attachments as: .zip

Change History (7)

by mr-victory, 3 years ago

Attachment: drivesetup.png added

comment:1 by madmax, 3 years ago

update the type of the partition according to the new filesystem

There's no such thing. While a BFS filesystem in a Windows data partition is confusing, that's the behaviour I expect. I guess even Windows would accept it with a BFS driver installed. Take the partition type as a hint of the kind of content (not format) it has. The format of the filesystem, though sometimes related, is a completely different thing. Formatting tools don't change the partition type (in general; I don't claim to know what all of them do).

Now, maybe a very high level partition/format app with very few options should get rid of those technicalities and just present the user one concept with a short list of common choices. But that's asking for a design change, not a bug fix.

comment:2 by mr-victory, 3 years ago

The approach of not touching the partition type is very interesting...

High end tools that I know (diskmgmt.msc, GParted) which are aware of partitions and filesystems set the partition type accordingly when a partition is formatted. This is the default behavior.

Low end tools like fdisk cam also change the partition type but cannot format the partition because they do not know what a filesystem is! After using a tool like fdisk, (under Linux) usually a mkfs.<filesystem-type> utility is used which formats the given device but does not know what a partition is.

DriveSetup can work with both partitions and filesystems so I expected it to take care of the partition type. If the intended behaviour is to not change the partition type, then I requested for a change.

I tried changing an existing Haiku/BFS partition's type to NTFS and booting Windows 10 on real hardware without drivers for BFS. The partition was assigned a drive letter and the filesystem type showed up as RAW (unformatted) on diskmgmt.msc. I also have BTRFS partitions on the hard drive and they do not have a drive letter. Then I could boot to Haiku without any problems.

comment:3 by tqh, 3 years ago

At least for GPT changing the partition type would be very good. Don't know enough about MBR to say if also should be done there. So I agree that we should do it.

in reply to:  3 comment:4 by madmax, 3 years ago

Type: bugenhancement

Replying to tqh:

At least for GPT changing the partition type would be very good. Don't know enough about MBR to say if also should be done there.

If there's an obvious mapping, I guess the least surprise path would be to do it whatever the partitioning scheme is, and maybe not even tell the user about partition types if possible.

comment:5 by X512, 3 years ago

I think that creating and formatting partitions should be done as one atomic operation and use one common dialog window. It is less confusing and fixes many things.

Last edited 3 years ago by X512 (previous) (diff)

comment:6 by pulkomandy, 12 months ago

Milestone: Unscheduled
Note: See TracTickets for help on using tickets.