Jump to content

enhanced gptsync tool


25 posts in this topic

Recommended Posts

Hi,

 

here's an OSX port and enhancement i made to help creating hybrid MBR partitions on GPT drive.

 

Code came from project rEFit: http://refit.sourceforge.net/

 

The package below contain the gptsync command line tool for Mac OSX Leopard.

 

Source code is available here: https://github.com/JrCs/gptsync

 

You can download the package here:

 

Edit 31/12/12 version 0.3: gptsync-0.3.pkg

 

Old Versions:

Edit 02/08/09 version 0.2: gptsync-0.2.pkg.zip

 

JrCs

  • Like 4
  • 3 weeks later...
  • 1 month later...

Windows 7 does support reading and writing GPT disks, but not booting from them, unless the computer uses EFI for firmware, rather than a BIOS. (I've corresponded with somebody who's used a post-BIOS EFI implementation to work around this limitation, but that's currently an awkward solution that doesn't work on all computers -- I couldn't get it to work myself, for instance.) So in a dual-boot environment with Windows and a need or desire to use GPT, you must have either multiple disks (at least one MBR for Windows to boot and at least one GPT) or a hybrid MBR configuration.

  • 2 months later...
Windows 7 does support reading and writing GPT disks, but not booting from them, unless the computer uses EFI for firmware, rather than a BIOS. (I've corresponded with somebody who's used a post-BIOS EFI implementation to work around this limitation, but that's currently an awkward solution that doesn't work on all computers -- I couldn't get it to work myself, for instance.) So in a dual-boot environment with Windows and a need or desire to use GPT, you must have either multiple disks (at least one MBR for Windows to boot and at least one GPT) or a hybrid MBR configuration.

Er...then how did I install Windows 7 on my Hackintosh?

Er...then how did I install Windows 7 on my Hackintosh?

 

There are several possibilities:

 

  1. Your computer uses MBR rather than GPT
  2. Your computer uses a hybrid MBR (GPT+MBR) rather than a "pure" GPT
  3. Your computer has EFI-enabled firmware
  4. Possibly something else I'm forgetting

 

Without more details on your configuration, I can't narrow it down further than that; however, #2 seems to be quite common; many people run hybrid configurations and aren't even aware of it.

  • 2 weeks later...
  • 5 months later...
  • 4 months later...

Fortunately, boot can be easily unset the same way you set it (using parted). But, when you do so, at least using the version of parted that comes with Ubuntu Gutsy, the msftres flag is set, and parted won't let you unset it no matter how many times you try. The main problem this caused for me was that the partitions marked as msftres would no longer be mounted automatically by OS X, so they didn't show up in the Finder, and they were grayed out in Disk Utility. diskutil list indeed showed their type as "Microsoft Reserved Data" or something to that effect. (I don't remember exactly, and I didn't feel like changing the type back just to do testing for this hint.)

Usage: gptsync [OPTION]... DEVICE [PARTITION[+/-[TYPE]]] ...

 

gptsync fill hybrid MBR of GPT drive DEVICE.

 

Specified partitions will be a part of hybrid MBR. Up to 3 partitions are allowed.

+ means that partition is active (only one partition can be active).

TYPE is an MBR hexadecimal type (use -t option to list recognized types).

 

Valid options:

-e, --empty create an MBR containing only the EFI Protective partition

-n, --nofill don't try to protect unused partition

-t, --types list the MBR recognized type codes

-h, --help display this message and exit

-V, --version print version information and exit

 

examples:

sudo gptsync /dev/disk1 1 2+af

sudo gptsync /dev/disk1 2+

asdfeas, this is a COMMAND LINE utility = you have to run the commands (see given examples) in TERMINAL ......

 

Apart from that, I would love to get Grub4DOS going on a GPT partitioned drive - anybody know how to?

  • Confused 1
  • 1 year later...
  • 11 months later...

Are the modifications you made for this available? Could you maybe add support to recognize a CoreStorage (FileVault 2) partition in Lion?

 

Done in version 0.3 (look at the first post)

  • Like 3
  • 11 months later...

I have 3 partitions on GPT and 1 virtual MBR partition on macbook pro. MBR used by Windows.

But the problem is that Windows can't see the GPT partitions. Not sure if gptsync can help me in such situation?

 

More details here http://www.insanelymac.com/forum/topic/294367-macbook-pro-bootcamp-windows-cant-see-gpt-partitions/

that's what it's about, or at least how this works.. An OS on a synced MBR partition on a hybrid GPT/ MBR can ONLY see synced MBR partitions, NEVER any of the GPT partitions. Just include all GPT partitions into the MBR you want Windows to see via gptsync, that's it.

 

So the answer is yes, gptsync will help you.

  • 2 years later...
×
×
  • Create New...