Opened 15 years ago

Closed 11 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:
Platform: All

Description

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

see : http://www.win.tue.nl/~aeb/partitions/partition_types-1.html

Attachments (3)

DriveSetupPartitionType.diff (880 bytes ) - added by Morgul 12 years ago.
before-patch.png (76.8 KB ) - added by scottmc 11 years ago.
Screenshot before patch applied
after_patch.png (86.7 KB ) - added by scottmc 11 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 by stippi, 15 years ago

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 by starsseed, 15 years ago

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 by stippi, 15 years ago

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 by starsseed, 15 years ago

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 by axeld, 15 years ago

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 by stippi, 15 years ago

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

comment:7 by stippi, 14 years ago

Resolution: fixed
Status: newclosed

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

by Morgul, 12 years ago

comment:8 by Morgul, 12 years ago

patch: 01

comment:9 by Morgul, 12 years ago

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 12 years ago by Morgul (previous) (diff)

by scottmc, 11 years ago

Attachment: before-patch.png added

Screenshot before patch applied

by scottmc, 11 years ago

Attachment: after_patch.png added

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

comment:10 by starsseed, 11 years ago

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 by axeld, 11 years ago

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 by axeld, 11 years ago

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

comment:13 by axeld, 11 years ago

patch: 10

comment:14 by Morgul, 11 years ago

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

comment:15 by axeld, 11 years ago

Status: in-progressassigned

comment:16 by axeld, 11 years ago

Resolution: fixed
Status: assignedclosed

Added partition type column in hrev45218.

Note: See TracTickets for help on using tickets.