Previous 1 32 33 34 35 36 Next 1,472 Replies Latest reply: Jul 29, 2015 5:16 AM by McVareck Go to original post Branched to a new discussion.
  • Christopher Murphy Level 3 Level 3 (555 points)

    BTW, sector copies clone *everything* down to the sector. That means the file system, encryption (or not), etc. So any dd clone is exact. If you dd a partition containing a Core Storage volume that's encrypted, that's what's put into the .bin file. If you dd that file to another partition, it becomes an encrypted Core Storage volume.

     

    What dd does NOT do, is, it doesn't change the partition type GUID to match the contents. You have to use gdisk to do that. From the main menu, that's t for type, and you can use L to get a listing of partition type codes.

  • Christopher Murphy Level 3 Level 3 (555 points)

    What an adorable utility, that lets you create free space, and then won't let you re-absorb that free space. So yeah, you're stuck. You either have to back everything up, blow away the entire hard drive reverting back to a single partition, reinstall OS X and Window and restore from backup; or you have to get fancy.

     

    The short, non-detailed version (I'm leaving out steps), is you can either blow away Recovery HD also, and then you'll be able to reabsorb the space to OS X. Or you can make a partition for Recovery HD just in front of the current Windows volume, and move it, then reabsorb the free space between it and OS X. But it can only be done with multiple steps using gdisk, dd, and diskutil.

  • ganze Level 1 Level 1 (0 points)

    ok, I'm tempted by the second instead of the first, since with OSX it's relatively easy to back up everything and the put it back to place, but for windows it get a little more painful. Meanwhile I can think about it and take it like that for the moment and wait for a free time to do the clean up job. Since I have fans revving all the time on OSX, I would like to make a clean install and copy the essentials office files back to OSX, and reinstall all the apps.

  • Christopher Murphy Level 3 Level 3 (555 points)

    So what you're going to do is use gdisk to make a new partition and then dd the Recovery HD to the new partition. Then you'll delete the original Recovery HD partition. Then you'll be able to resize the OS X partition consuming all the free space. And things will be back to normal.

     

    Use gdisk -l to find out the start/end sectors for the current Recovery HD, find out how many sectors that is, and subtract that value from the start sector value for Windows/BootCamp. Create a new partition with this value as the First sector. You might get a message that the requested sector was changed in order to align on 16-sector boundaries, it should have rounded this down, which is fine but note that "to" value, add the sector length of the original Recovery HD (end sector value minus start sector value) and enter this as the Last sector for this new partition. When asked for the type code, it needs to be AB00. Write out the partition, and reboot OS X.

     

    diskutil list

     

    Your original Recovery HD I'm guessing is disk0s3, and the new one is disk0s4, but you have to be certain. The two will be ~ 620MB in size. The dd command is:

     

    dd if=/dev/disk0sX of=/dev/disk0sY

     

    X=slice/partition number for the original Recovery HD

    Y=slice/partition number for the new one

     

    Once that's done you can test it by rebooting with option key. You'll have two Recover HD options, and you can try them both to be sure.

     

    Next, gdisk again, and delete the original Recovery HD partition.

     

    Next, test the resize with

    diskutil resizevolume disk0s2 limits

     

    I *think* when you're ready you can use R instead of limits to absorb all remaining free space.

     

    gdisk again, and use command 's' to resort the partition table, so everything is in order. Then go to the recovery menu, make a new hybrid MBR, add partitions 2 3 4, make 4 only bootable. Accept the default hex codes with just a return. And then write out the new maps.

  • nikdaquik Level 1 Level 1 (0 points)

    Hi Chris,

     

    So I've posted in this thread a long time ago and you helped me out then in getting my system to tri-boot with OSX, Win7 and Win8.  So I tried to turn that system back to a dual-boot, Bootcamp-like setup.  I managed to get the thing to boot, but I believe I messed up the delicate GUID/MBR setup from before.  I can boot to both partitions, and everything works fine except the windows machine can't see the OSX partition.  OSX can see windows but not the other way around.  I was wondering if you could help guide me in the right direction to repair this.

  • Christopher Murphy Level 3 Level 3 (555 points)

    For Windows to see OS X, the OS X partition must be in the hybrid MBR. So chances are what you need to do is just make a new hybrid MBR with gdisk, adding partitions 2 3 4, making 4 only bootable. That's the conventional layout for a dual boot Mac.

     

    I don't know that I want to know how you got rid of Windows 8 though, because if you used a Windows tool to resize Windows 7 to take over the space from Windows 8, this is very bad to do as it causes corruption of the GPT. Hopefully you are keeping current backups!

  • oly va ha Level 1 Level 1 (35 points)

    my problem is similar but not the same...ive been searching google and here since friday to no avail...could you take a look at my post and maybe point out something it looks like you're very good with these issues?

     

    https://discussions.apple.com/thread/4796985 sorry for trolling but i dont how else to contact you

  • nikdaquik Level 1 Level 1 (0 points)

    ok, i'll try editing the MBR. As for the resize, yeah i made that mistake...it wasn't fun...it made all parties involved very sad but somehow I managed to create a semi-stable MBR/GPT. 

     

    I believe that my current MBR has 5 parts actually, with two windows segments. However, I merged those two partitions so i don't know how that still lets me boot.  This is the output from gdisk:

     

    Disk /dev/disk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): E2BACA2E-849F-4BCF-B5FA-A79C88CFFA86

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 976773134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 1638 sectors (819.0 KiB)

     

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       586347135   279.4 GiB   AF00  Untitled

       3       586347136       587616671   619.9 MiB   AB00  Recovery HD

       4       587618304       683321343   45.6 GiB    0700  WIN8

       5       683321344       976773134   139.9 GiB   0700  Microsoft basic data

     

    and diskutil:

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk0

       1:                        EFI                         209.7 MB   disk0s1

       2:                  Apple_HFS Macintosh HD            300.0 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data WIN8                    49.0 GB    disk0s4

       5:       Microsoft Basic Data                         150.2 GB   disk0s5

     

    I couldn't tell you how this works exactly, but it does so I'm grateful. just trying to repair the damage so one can see the other now.

  • Christopher Murphy Level 3 Level 3 (555 points)

    Don't edit the MBR. Create a new hybrid MBR from within gdisk.

     

    Anyway, the GPT you've provided here isn't how you described it earlier. This still has two Windows partitions on it for a total of five GPT partitions. You can't do what you want to do with five partitions, because the MBR can only hold four partitions. So you have to get rid of one of the Windows partitions or the Recovery HD partition, in order to create a four partition MBR that contains both OS X and both Windows partitions.

     

    You *can* hypothetically leave it as a five partition GPT, and create a four partition MBR by simply not adding Recovery HD to the MBR; so you'd add partitions 2 4 5 and make either 4 or 5 bootable (I have no idea which one is bootable). But this exposes the Recovery HD as free space to Windows, and so it's unprotected. I'd sooner get rid of it, than create a hybrid MBR of this kind.

  • nikdaquik Level 1 Level 1 (0 points)

    Ok, I just created a fresh MBR from gdisk.  As for the GPT I posted, I honestly have not a clue how that has gotten the job done.  In reality, I only have those four partitions, I fused the two windows ones using a utility within windows (very bad idea, like you said).  Somehow in all my attempts to make windows bootable, I created an MBR with only 2 entries (OS X, including EFI and recovery, and Windows) and I suppose I never touched the GPT...

     

    ..So, I updated the GPT using gdisk to only have 4 partitions (I merged the two windows partitions) and then made a fresh MBR to reflect that...now the big question is: will rebooting this bad boy turn my computer into a giant paperweight or not.

  • Christopher Murphy Level 3 Level 3 (555 points)

    Probably. Because that Windows only utility would have only updated the MBR, which you just nuked with gdisk when you created a new hybrid MBR. You didn't tell me until now that you used a Windows utility to do the resizing, or I wouldn't have told you to create a new hybrid MBR.

  • Christopher Murphy Level 3 Level 3 (555 points)

    I think that Windows volume is SOL unless you have a copy of the MBR reported from fdisk, before it was replaced by gdisk.

     

    Whatever you do, don't let chkdsk try to repair the NTFS volume.

     

    What is the result from

    sudo fdisk /dev/disk0

  • nikdaquik Level 1 Level 1 (0 points)

    Ok, here's the output from fdisk:

     

    Disk: /dev/disk0geometry: 60801/255/63 [976773168 sectors]

    Signature: 0xAA55

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

    ------------------------------------------------------------------------

    1: EE    0   0   2 -   25 127  14 [         1 -     409639] <Unknown ID>

    2: AF   25 127  15 - 1023 254  63 [    409640 -  585937496] HFS+       

    3: AB 1023 254  63 - 1023 254  63 [ 586347136 -    1269536] Darwin Boot

    *4: 07 1023 254  63 - 1023 254  63 [ 587618304 -  389154831] HPFS/QNX/AUX

     

    and the GPT from gdisk:

     

    Disk /dev/disk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): E2BACA2E-849F-4BCF-B5FA-A79C88CFFA86

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 976773134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 1638 sectors (819.0 KiB)

     

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       586347135   279.4 GiB   AF00  Untitled

       3       586347136       587616671   619.9 MiB   AB00  Recovery HD

       4       587618304       976773134   185.6 GiB   0700  Microsoft basic data

     

    and finally the MBR from gdisk:

     

    Disk size is 976773168 sectors (465.8 GiB)

    MBR disk identifier: 0xBBC11FA9

    MBR partitions:

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1       409639   primary     0xEE

       2                409640    586347135   primary     0xAF

       3             586347136    587616671   primary     0xAB

       4      *      587618304    976773134   primary     0x07

  • Christopher Murphy Level 3 Level 3 (555 points)

    I don't know how to help you when this sort of thing happens:

     

     

    3:15pm

      Disk identifier (GUID): E2BACA2E-849F-4BCF-B5FA-A79C88CFFA86

       4       587618304       683321343   45.6 GiB    0700  WIN8

       5       683321344       976773134   139.9 GiB   0700  Microsoft basic data

     

    45 minutes later

       Disk identifier (GUID): E2BACA2E-849F-4BCF-B5FA-A79C88CFFA86

       4       587618304       976773134   185.6 GiB   0700  Microsoft basic data

     

    Your GPT has changed inside of 45 minutes. So I don't know what you did, or how you got here, and I can't tell you a thing about whether the state of your partition schemes will work or not.

  • nikdaquik Level 1 Level 1 (0 points)

    Ok, sorry I've been jumping around alot with the steps I took. I took your suggestion to blow away the MBR and create a fresh one. However, I couldn't figure out how to merge the two partitions in the GPT (4 and 5) which were "left over" after I merged my two windows partitions into one using a windows utility.  So I blew the entire GPT away and made a new one using gdisk taking care to keep the exact same sector #s as the original (and merging 4 and 5 into one new partition to reflect the one Windows partition).  That's how the GPT changed and I then blew away the MBR and created a fresh one based on that new GPT with only 4 entries.  I really jumped the gun on a few of these steps, but does that GPT/MBR setup look like it'll be stable?

Previous 1 32 33 34 35 36 Next