[haiku-bugs] [Haiku] #9856: DriveSetup allows "formatting" an extended-partition / wastes the partition table

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Sat, 06 Jul 2013 21:10:32 -0000

#9856: DriveSetup allows "formatting" an extended-partition / wastes the 
partition
table
-------------------------------------+------------------------------
 Reporter:  ttcoder                  |        Owner:  stippi
     Type:  bug                      |       Status:  new
 Priority:  normal                   |    Milestone:  R1
Component:  Applications/DriveSetup  |      Version:  R1/Development
 Keywords:                           |   Blocked By:
 Blocking:                           |  Has a Patch:  0
 Platform:  All                      |
-------------------------------------+------------------------------
 hrev45824

 I might have found a serious bug in DS:
 - if you have a partition you want to get rid of because it's set as
 "extended" (instead of "primary"), with, say, one sub-partition inside it;
 - and one or more primari'es behind it;
 - and you select the mother (extended) partition at the beginning, rather
 than the sub-partition inside it and do ''Format... Be File System'', your
 HDD contents is lost.

 More precisely -- the HDD appears normal at fast, but once you reboot, the
 Haiku boot menu says "no bootable partition".. Using another media (e.g.
 USB) to boot and opening DriveSetup from ''there'', you see your HDD
 completely empty of any partition.

 I'm guessing an extended partition has some overhead compared to a primary
 one, a few KB or MB, and if DS formats it again as primary it does not
 account for the "gained" space and recalculates the offsets of the
 partitions behind it, even though their physical offset on the disk has
 not changed, which makes them invisible. That theory would explain the
 loss of the partitions behind the number one but now why I lost the first
 one too though.

 Anyhow the "format" submenu should probably be grayed out when an extended
 partition is selected, to hint at the correct way to get rid of it: do a
 "Delete", then recreate it with "Create" as a primary, and ''then'' one
 may format it to BFS I guess.

--
Ticket URL: <http://dev.haiku-os.org/ticket/9856>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: