Opened 9 years ago

Last modified 4 years ago

#6287 new enhancement

partition-type inconsistency

Reported by: starsseed Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/DriveSetup Version: R1/alpha2
Keywords: MBR file-system partition-type Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

DriveSetup allows to initialize a partition with a file-system that is not consistent with the partition type.
If you install a BFS file system onto a partition which type is NTFS, Windows(1) offers to initialize the partition with a NTFS file system (which will overwrite Haiku).
If the partition type is correct (BFS), windows doesn't allow any modification.

So :
either let DriveSetup change the partition type in the MBR according to the file-system initialised,
or make DriveSetup filter the file system types according to the partition type.

See: http://www.haiku-os.org/community/forum/windows_7_trying_fix_haiku_partition

(1) I dont know about linux behaviour but I don't want much to risk it.

Change History (3)

comment:1 Changed 8 years ago by bebop

While I understand that this is frustrating, I think that the behavior that you are describing is correct behavior. Partitions and file systems are completely separate from each other. Even in Linux, for instance, you could create an NTFS partition, then format it ext4.

However, if other developers feel that partition types should be kept inline with file system type, I would be willing to implement that feature. Otherwise, just remember to tell Windows that you are not an idiot and do not want to format that partition ntfs, and/or partition the hard drive correctly.

comment:2 Changed 4 years ago by pulkomandy

If you create the partition in DriveSetup, it allows you to set the "type" and defaults to BFS which seems fine. However, there isn't a way to change the partition type after the fact (unless you delete and recreate the partition). When creating a filesystem, filtering is not needed, however a warning message ("the fs you selected does not match the partition type" or so) could be useful.

comment:3 Changed 4 years ago by bebop

Obviously I have not worked on this code for a while, so take my comments with a grain of salt. Adding a warning to the file system creation would require that every file system add a check on creation. This seems like extra work for the file system that does not really belong there. The file system should not really know much about what partition it resides on, and adding that check has the potential to expose a lot of detail about the underlying disk systems and partition, all of which are supposed to be abstracted at that level. As I stated in the first comment, it does not really matter what partition type you create a file system on.

I do agree though that we should be able to edit the partition type post facto. There is iirc a ParametersEditor class that you can write a BView to be called from the API that would allow editing that sort of information. I am not sure what shape that code is in though, so doing some plumbing before getting to that point might be required.

So I guess I am a -1 on adding a message unless we can find a way to do it that does not make the file system creation overly complicated. I am a +1 on having a decent ParametersEditor system and adding functionality to the partition to allow it to be changed after it is created.

It is possible I will have some time over the holidays to take a look at this. Any input is appreciated.

Note: See TracTickets for help on using tickets.