Opened 12 years ago

Closed 4 years ago

#9108 closed enhancement (fixed)

Re-writing the Intel partition map should erase the MBR

Reported by: kallisti5 Owned by: pulkomandy
Priority: low Milestone: R1/beta3
Component: Partitioning Systems/Intel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #16304
Platform: All

Description

Example:

  • I have a Linux install.
  • Select the drive, Disk -> Initialize -> Intel Partition Map
  • I install Haiku, partition is active.
  • Reboot.. machine won't boot due to grub cruft in MBR

We may need to make rewriting the Intel Partition Map:

  • Really erase the old Intel partition map before recreating it.
  • Erase the MBR

Or just add a new menu option to erase the master boot record.

Change History (7)

comment:1 by scottmc, 12 years ago

Milestone: R1/beta1Unscheduled

A low priority enhancement ticket probably shouldn't be in the R1/beta1 milestone. Moving to unscheduled, but this sounds like it could be done in an afternoon if someone decides to work on it. If it is an R1 requirement, then please bump the priority up to at least normal and move it back to R1/beta1. IIRC BeOS had this functionality.

comment:2 by pulkomandy, 4 years ago

Milestone: UnscheduledR1/beta3

comment:3 by pulkomandy, 4 years ago

Blocking: 16304 added

comment:4 by pulkomandy, 4 years ago

I'm looking at the intel partition map initialization and there is support for writing our bootloader introduced in 2009 in hrev33263 (pre-dating this ticket by a few years).

As far as I can see, it is still in place and should still work.

So, I'm wondering, does DriveSetup actually call this code if it detects that there is already a partition map and it looks "good enough"? The userland code is not super easy to follow, between DriveSetup itself, and the partitionning system handling in the storage kit.

But once we get to kernel side, the code in pm_initialize in the intel partition map manager is quite straightforward and it eventually calls WriteMBR with the "true" parameter needed to replace the boot code.

comment:5 by pulkomandy, 4 years ago

Owner: changed from bonefish to pulkomandy
Status: newin-progress

Confirmed that this still happens. Initialize -> Intel partition map doesn't even erase existing partitions.

comment:7 by pulkomandy, 4 years ago

Resolution: fixed
Status: in-progressclosed

Fixed in hrev54924.

Note: See TracTickets for help on using tickets.