mdbooth / libldm

GNU General Public License v3.0
28 stars 15 forks source link

Fix for skipping OEM partitions #17

Open jpmorrison opened 3 years ago

jpmorrison commented 3 years ago

I updated ldm.c to check other partitions for the LDM signature. The drive has an OEM/Dell partition which Windows handles but confuses the tool

ldmtool now finds the disk and seems to work

disk1 : start=          63, size=      176652, type=de
disk2 : start=      176715, size=   976594357, type=42
disk3 : start=   976771072, size=  2930255872, type=42, bootable
disk4 : start=  3907026944, size=         176, type=42
rwmjones commented 3 years ago

The problem with this patch is the "FIXME" and the printf's ...

rwmjones commented 3 years ago

So looks better, but I don't really know enough about this code to review it on my own. Would like to hear others' opinions.

jpmorrison commented 3 years ago

So looks better, but I don't really know enough about this code to review it on my own. Would like to hear others' opinions.

There's only four primary partitions on MBR so it works.

More details on LDM/MBR here https://github.com/TalAloni/DynamicDiskPartitioner/issues/1

similar fix https://github.com/TalAloni/DynamicDiskPartitioner/commit/c9f4d554a05a93f170326edf2448522f654dc079