Opened 14 years ago
Last modified 14 years ago
#6724 assigned bug
Creating a second active partition should unactive the first one
Reported by: | starsseed | Owned by: | bebop |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/DriveSetup | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
- Create an intel partition-map inside an empty disk
- Create a first primary partition with the <active> flag
- Create a second primary partition with the <active> flag
you will see 2 actives partitions.
hrev39010 (gcc4)
Attachments (2)
Change History (6)
by , 14 years ago
Attachment: | TwoActivePartitions.png added |
---|
comment:1 by , 14 years ago
Component: | - General → Applications/DriveSetup |
---|---|
Owner: | changed from | to
comment:2 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 14 years ago
Attachment: | active_partition.patch added |
---|
follow-up: 4 comment:3 by , 14 years ago
comment:4 by , 14 years ago
Replying to bebop:
When the MBR was being written, the active partition was properly handled. The problem was that the partition_data was not being updated correctly. This means if one was to restart the computer the correct values for the active partition would be displayed.
This patch is the quick and dirty fix to the problem. It sets all of the current primary partitions parameters to an empty string if the partition being created has the active flag set to true.
This works as the intel disk system only uses the parameters string for the active partition. Any comments on how this should/could be handled are welcome.
Actually that's not quite correct: https://dev.haiku-os.org/browser/haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/intel.cpp?rev=34377#L220. Setting the string the same way would be more correct (refactoring that bit into a separate function would be a bonus :-)). Other than that the locking/marking partitions busy must be adjusted, since ATM _user_create_child_partition()
does only mark the parent partition busy, not the also changed pre-existing children. This also holds true for other functions, like _user_set_partition_parameters()
, BTW.
When the MBR was being written, the active partition was properly handled. The problem was that the partition_data was not being updated correctly. This means if one was to restart the computer the correct values for the active partition would be displayed.
This patch is the quick and dirty fix to the problem. It sets all of the current primary partitions parameters to an empty string if the partition being created has the active flag set to true.
This works as the intel disk system only uses the parameters string for the active partition. Any comments on how this should/could be handled are welcome.