Opened 10 years ago

Closed 6 years ago

#4235 closed enhancement (fixed)

partition type is missing in DriveSetup

Reported by: starsseed Owned by: axeld
Priority: low Milestone: R1
Component: Applications/DriveSetup Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


DriveSetup should show the partition type (or the partition type label)
eb - BeFS
07 - Windows NTFS
42 - Linux swap

see :

Attachments (3)

DriveSetupPartitionType.diff (880 bytes) - added by Morgul 7 years ago.
before-patch.png (76.8 KB) - added by scottmc 6 years ago.
Screenshot before patch applied
after_patch.png (86.7 KB) - added by scottmc 6 years ago.
screenshot after patch applied, note that (Linux Swap) is listed in this one

Download all attachments as: .zip

Change History (19)

comment:1 Changed 10 years ago by stippi

Priority: normallow

I don't know. The partition type from the partition table is not very reliable at all. What DriveSetup already shows should be more reliable and informative. It wouldn't hurt to have the additional information of course... but I take the liberty lower the priority anyway. :-)

comment:2 Changed 10 years ago by starsseed

if you partition your disk with an other OS (Linus fdisk for instance), every partitions look the same since the file system type is unknow, so you could install Haiku on the wrong partition.

comment:3 Changed 10 years ago by stippi

But showing "Unkown" for every partition is no worse than showing "Linux native" for every partition. In these situations, I believe users will rely more on partition size and layout, and that should be the same. I am not sure, but from what I remember, GParted sets the table entry to the equivalent of "Linux native" or "Linux swap" when creating the partition. It may still be that type even if you later initialize such a partition to FAT32 for example. In any case, the actual content type and the table type may be out of sync. That's why I don't think this feature would add a whole lot of value. It's quite easy to change, though, if you want to have a look. The table type is available via BPartition::Type(), while DriveSetup currently uses BPartition::ContentType(). See PartitionListView.cpp for more details. You could just add another column and provide a patch. But like I said, I think it will be more confusing than helpful (than you would have to make it obvious in the guy, which type is which and which is the true content type and which only the partition type marker from the MBR...).

comment:4 Changed 10 years ago by starsseed

With Linux, you can initialize a partition with any file system, it's true that Linux let you do evrything but it's your responsibility!
For my part, my system is consistent.
nb : Fdisk can even create BeFS partitions ;-)

comment:5 Changed 10 years ago by axeld

You could use ContentType() if available, and Type() if not (the latter could even enclosed in parenthesis to show that it hasn't been detected natively).

comment:6 Changed 10 years ago by stippi

That certainly sounds doable! :-) Thanks, Axel.

comment:7 Changed 9 years ago by stippi

Resolution: fixed
Status: newclosed

This was implemented a few revisions ago. Too lazy to dig it up.

Changed 7 years ago by Morgul

comment:8 Changed 7 years ago by Morgul

Has a Patch: set

comment:9 Changed 7 years ago by Morgul

Resolution: fixed
Status: closedreopened
Version: R1/pre-alpha1R1/alpha3

This was fixed in hrev35051. But then, removed in hrev39115, as it caused confusion in the case of "Be File System" being both a partition type name and file system name, as the author of that commit commented on this e-mail from haiku-commits.

In the patch I just attached, I've implemented it as axeld suggested in comment:5, by enclosing the partition type in parenthesis. This way it's clear whether there's an initialized file system or not.

Last edited 7 years ago by Morgul (previous) (diff)

Changed 6 years ago by scottmc

Attachment: before-patch.png added

Screenshot before patch applied

Changed 6 years ago by scottmc

Attachment: after_patch.png added

screenshot after patch applied, note that (Linux Swap) is listed in this one

comment:10 Changed 6 years ago by starsseed

For me, this does not fix the issue, since we don't see if the file system is consistent with the partition type. An other problem is that : if you have a "BFS" formated volume over a "NTFS" typed partition (for instance), Windows may erase the volume (without prompting).

Adding a "partition type" column would be more appropriate.

comment:11 Changed 6 years ago by axeld

Owner: changed from stippi to axeld
Status: reopenedin-progress
Version: R1/alpha3R1/Development

Thanks for the reminder, Scott! I'll apply it now.

To starsseed: an optional column for the partition type sounds like a useful addition (I would just hide it by default). I'll keep this ticket open then.

comment:12 Changed 6 years ago by axeld

Patch applied in hrev44923 -- thanks a lot Morgul, and sorry for the long delay.

comment:13 Changed 6 years ago by axeld

Has a Patch: unset

comment:14 Changed 6 years ago by Morgul

You're welcome, axeld. No problem, it's great to see it applied in the repository :)

comment:15 Changed 6 years ago by axeld

Status: in-progressassigned

comment:16 Changed 6 years ago by axeld

Resolution: fixed
Status: assignedclosed

Added partition type column in hrev45218.

Note: See TracTickets for help on using tickets.