Resize partition using terminal - error:

I am trying to resize my osx partition so i can implement a triple boot. I have an 80gb drive in my macbook - osx uses 43.57GB out of 60GB and xp 20GB GB. I attempted to use this code in terminal:
diskutil resizeVolume disk0s2 56G "Linux" "Linux" 14G
then it says:
verifying
Resizing encountered error The underlying task reported failure on exit (-9972) on disk0s2 Macintosh HD
how should i attempt this? is my code correct?

i took a look, and i believe that the program behind diskutil is hdiutil.
please correct me if im wrong.
in the terminal i typed
man hdiutil
and found resize as a command there:
*resize size_spec image*
Given a read/write partitioned UDIF, if the last partition is
Apple_HFS, attempt to resize the partition to the end of the
image, or to the last used block in the embedded HFS/HFS+
filesystem (depending on size_spec). resize is often used when
a device image needs to be shrunken so that the HFS/HFS+ par-
tition can be converted to CD-R/DVD-R format and still be
burned. Note that gaps cannot be reclaimed as resize does not
move data. -fsargs can sometimes be used to minimize filesys-
tem-generated gaps. resize can also be used to grow a
filesystem and image without bound.
hdiutil burn does not burn Apple_Free partitions at the end of
the devices, so an image with a resized filesystem can be
burned to create a CD-R/DVD-R master that contains only the
actual data in the hosted filesystem (assuming minimal data
fragmentation).
Common options: -encryption, -stdinpass, -srcimagekey, -shadow
with friends, and -plist.
Size specifiers:
-size ??b|??k|??m|??g|??t??p|??e
-sectors sector_count | min | max
Specify the number of 512 byte sectors to
which the partition should be resized. If
this falls outside the min/max values, an
error will be returned and the partition will
not be resized. min automatically determines
the smallest size the partition can be
resized to and uses that value. max automat-
ically determines the largest size to which
the partition can be grown and then uses that
value.
Other options:
-imageonly only resize the image file, not the parti-
tion(s) inside of it. This is the default
for UDIF images (more partitions can then be
added in the new free space).
-partitiononly only resize the partition(s) in the image
(including their embedded filesystems). This
is the default for NDIF images. For a newly-
created SPUD where the partition fills the
image, the partition can only be shrunk. If
there is an Apple_Free partition after an
existing partition, that partition can be
expanded into the space marked by the
Apple_Free. Shrinking a partition results in
a larger Apple_Free partition.
-partitionNumber partitionNumber
specifies which partition to resize (UDIF
only -- see HISTORY below). partitionNumber
is 0-based, but, per hdiutil pmap, partition
0 is the partition map itself.
-growonly only allow the image to grow
-shrinkonly only allow the image to shrink
-nofinalgap allow resize to entirely eliminate the trail-
ing free partition. Such an image restored
to a hard drive will not boot OS 9 nor will
it allow OS X to boot on old-world (beige)
machines.
-limits Displays the minimum, current, and maximum
sizes (in 512 byte sectors) that could be
passed given possible -imageonly or
-partitiononly flags. Does not modify the
image.
-oldlimits behaves like -limits except that it reports
the stretch sizes that OS X version 10.3
would have reported (useful if an image needs
to be used with asr(8) on an older system).
segment
++++++++++++++++++++
I still dont know what exactly to enter but now i feel like this could actually work using terminal. any help is appreciated

Similar Messages

  • Can't format external HDD using terminal: Error: -69877: Couldn't open device

    Disk Utility won't format / erase Seagate Barracuda 2TB (ST2000DM001) - it is an internal drive but I connected it using a docking station via USB. The disk is brand new and unformatted. System indicates that it is S.M.A.R.T incompatible
    When trying to erase the disk, I get error message "disk / link could not be found / opened".
    I tried using terminal "diskutil eraseDisk HFS+ newdisk /dev/disk3" but I get this message:
    Started erase on disk3
    Unmounting disk
    Error: -69877: Couldn't open device
    Any way I could force format the disk?

    Thank you @MrHofman. I had a setup with 2 dock stations and 2 HDDs (my TimeCapsule had crashed and I needed to recover its content disassembling the "box"). I disconnected everything. I restarted the computer., I swithched the USB ports in which I had connected the dock stations; I swithched the HDDs from dock stations, and voilà, the system allowed me to format the "recovery" HDD. Sometimes the "simplest" solutions work...
    @Linc Davis: prior to the fix described above, when trying to partition, same thing would occur : "can't open link / disk" error message. But now it seems to be working fine. Thank you anyway!

  • Resized partition using Disk Utility and now Windows 7 will not boot

    Hi,
    Hopefully someone can help me!!
    I had previously used Boot Camp to install Windows 7. However, I later realised I had not given myself anywhere near enough disk space as I started using Windows for things I hadn't originally planned on using it for.
    Anyway, long story short, to solve the problem I uninstalled some applications on my Mac OSX and used Disk Utility to decrease the size of my Mac partition. My plan was then to reboot to Windows and use a Windows application to increase the size of the Windows partition. However - I coudln't even get that far.
    Upon decreasing the size of my Mac partition (succesfully) I restarted my Mac in order to boot to Windows. However, I was greeted with a message along the lines of "unable to boot to Windows please insert boot disk and press any key" (I can't remember the exact message).
    I was wondering if anyone knows of any way to restore my Windows partition, retaining all of my previously saved files on my Windows disk. It's probably a long shot, but the thought of losing everything I have been working on for the last few months is a sickening one.
    What does give me a bit of hope is that, if I click Boot Camp it seems to recognise that Windows 7 is installed as the option that appears is to uninstall it.
    Furthermore, if I view partitions in Disk Utility, a "DISK0S4" is listed. However, it's only at 20gb - if this WAS my BootCamp partition previously, it was originally at something around 60gb (I think - either way, definitely bigger than 20gb!).
    On top of this, my current Macintosh HD parition is at 260gb and with the DISK0S4 partition at 20.21gb, there seems to be some space missing... I'm hoping this is the files I've been working on over the last few months!
    Anyway, I've done some searching on the net and it *seems* that GPT fdisk *might* be my savour. I've downloaded it but have no idea how to use it and don't plan on playing about with it as I could no doubt do some real damage. If it is likely to solve my problem however, I'm certainly more than capable of being walked through what I need to do.
    Please help!

    Hi Christopher,
    I also have problems with Windows rebooting after partition resize trying to reduce Mac side and increase Windows side. I do not see the BootCamp partition labelled as such while running disk utility. The Windows partition shows up when I boot up while pressing the ALT key. However, when I try to run Windows, it says " error loading operatig system".
    I also followed instruction and went through to run gdisk successfully. Results towards the end.
    What can be done? Windows still does not boot and It shows ? Suspicious MBR at sector 0.
    Below is information based on typical questions you ask.
    diskutil list
    /dev/disk0   #:                       TYPE NAME                    SIZE        IDENTIFIER
       0:              GUID_partition_scheme                        *120.0 GB     disk0
       1:                                           EFI                         209.7 MB     disk0s1
       2:                         Apple_HFS Macintosh HD            78.5 GB     disk0s2
       3:                       Apple_Boot Recovery HD             650.0 MB     disk0s3
       4:                   Microsoft Basic Data                         31.7 GB      disk0s4  
    sudo gpt -r -vv show disk0
    gpt show: disk0: mediasize=120034123776; sectorsize=512; blocks=234441648
    gpt show: disk0: Suspicious MBR at sector 0
    gpt show: disk0: Pri GPT at sector 1
    gpt show: disk0: Sec GPT at sector 234441647
          start       size            index       contents
              0          1                             MBR
              1          1                             Pri GPT header
              2         32                            Pri GPT table
             34          6        
             40     409600           1            GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
         409640  153240016      2            GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      153649656    1269544     3            GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
      154919200   17628896        
      172548096   61892608    4            GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
      234440704        911        
      234441615         32                       Sec GPT table
      234441647          1                        Sec GPT header
    sudo fdisk /dev/disk0
    Disk: /dev/disk0 geometry: 14593/255/63 [234441648 sectors]Signature: 0xAA55
             Starting       Ending
    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    1: EE    0   0   2 - 1023 254  63 [         1 -  172548095] <Unknown ID>
    *2: 07 1023 254  63 - 1023 254  63 [ 172548096 -   61892608] HPFS/QNX/AUX
    3: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
    4: 00    0   0   0 -    0   0   0 [         0 -          0] unused  
    sudo gdisk /dev/disk0
    GPT fdisk (gdisk) version 0.8.7
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    Found valid GPT with hybrid MBR; using GPT.
    Command (? for help): r
    Recovery/transformation command (? for help): h
    WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
    just hit the Enter key at the below prompt and your MBR partition table will
    be untouched.
    Type from one to three GPT partition numbers, separated by spaces, to be
    added to the hybrid MBR, in sequence: 4
    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
    Creating entry for GPT partition #4 (MBR partition #2)
    Enter an MBR hex code (default 07):
    Set the bootable flag? (Y/N): y
    Unused partition space(s) found. Use one to protect more partitions? (Y/N): n
    Recovery/transformation command (? for help): o
    Disk size is 234441648 sectors (111.8 GiB)
    MBR disk identifier: "DELETED INFO"
    MBR partitions:
    Number  Boot  Start Sector   End Sector   Status      Code
       1                               1    172548095   primary     0xEE
       2           *     172548096    234440703   primary     0x07
    Recovery/transformation command (? for help): w
    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
    PARTITIONS!!
    Do you want to proceed? (Y/N): y
    OK; writing new GUID partition table (GPT) to /dev/disk2.
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Warning: The kernel may continue to use old or deleted partitions.
    You should reboot or remove the drive.
    The operation has completed successfully.

  • Can I resize partitions in Tiger?

    I'm rethinking my strategy of being able to restore from my TM volume to Leopard. Can I resize partitions using Disk Utility without losing data while in Tiger?

    octafish wrote:
    I'm rethinking my strategy of being able to restore from my TM volume to Leopard. Can I resize partitions using Disk Utility without losing data while in Tiger?
    NEVER change any partitions on a disk without first backing up completely and testing the backup.
    I believe Tiger will destroy data; Leopard claims not to but I don't trust my disk to a partitioning agent. Leopard states that you should backup.

  • Can't resize partition after upgrading to Yosemite (using SSD drive)

    I upgraded to 10.10 and using SSD drive now. When I was using OS X 10.8.5, I could freely resize partition but not anymore. I guess because of the SSD drive and the new version of OS X, and Logical Volume Group could be involved. I don't want to waste 80 GB of SSD drive so really looking for a solution now. Thanks in advance.

    Yes, that's exactly what I did. I had to go back to my old snow leopard install DVD, use the disk utility on that to repartition the drive. I made 2 partitions, installed Snow Leopard on one, used that to install Yosemite on the other partition and trashed the snow leopard install.
    I haven't yet tried the Yosemite USB install method which would have probably been faster as I could have avoided installing SL.

  • Resize-partition PowerShell - using a variable for size

    Hello.
    I'm trying to user the PowerShell command resize-partition as part of a RunBook task so I need to be able to specify the size as a variable. The -size element requires that you also add on the size type (e.g. kb, mb, gb, tb etc.) but this makes the command
    fail as its then passed as a string and it looks like it wants to be a UInt64.
    I have tried various different ways such as:
    $size = 300 + "gb"
    $size = "300" + "gb" etc.
    The error I get is:
    PS C:\Windows\system32> Resize-Partition -DriveLetter E -Size $Size
    Resize-Partition : Cannot process argument transformation on parameter 'Size'. Cannot convert value "300GB" to
    type "System.UInt64". Error: "Input string was not in a correct format."
    The only way I can get it working is to hardcode it in: '-size (300gb)'
    Would anyone have any idea how to get this working? It must be possible.
    Thanks, Joe

    Hi,
    Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
    If you have any feedback on our support, please click
    here
    Cataleya Li
    TechNet Community Support

  • I'm trying to create a Windows partition using Boot Camp. An error comes up telling me that I need to reformat my current partition(s) into one single partition. However, it's already formatted in the correct format, and is already a single partition.

    As made clear in the title:
    I'm trying to create a Windows partition using Boot Camp. An error comes up telling me that I need to reformat my current partition(s) into one single partition. However, it's already formatted in the correct format, and is already a single partition.
    My computer recently had a kernel panic, which apparently the corruption was in the system and needed to be erased and re-installed. I have a complete back-up using an external hard drive, and I am definitely not willing to do another one of those to reformat a partition that is already singular. I restarted the computer after ejecting my back-up, and after turning off time machine (thinking that boot camp was recognizing it as a secondary partition), however the error still occurs.
    Is there any way to get around this?

    diskutil list:
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *750.2 GB   disk0
       1:                        EFI                         209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh HD            749.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                            Windows7               *2.9 GB     disk1
    diskutil cs list:
    No CoreStorage logical volume groups found
    mount:
    /dev/disk0s2 on / (hfs, local, journaled)
    devfs on /dev (devfs, local, nobrowse)
    map -hosts on /net (autofs, nosuid, automounted, nobrowse)
    map auto_home on /home (autofs, automounted, nobrowse)
    /dev/disk1 on /Volumes/Windows7 (udf, local, nodev, nosuid, read-only, noowners)
    From my very basic knowledge - it still looks as if there is only one partition (not including the windows 7 CD necessary to install the windows partition).

  • Error in Restoring the HDD partition using BootCamp assist

    This is regarding error in restoring the HDD partition using BootCamp assist. Yesterday I was trying to instal Windows 8.1 Pro on my Mac Mini.
    Started had installing windows software using Boot Camp assist using the USB flash drive
    Took the back of Windows Support software from Apple store
    Did the HDD partitioning for Windows,
    Then went ahead to install the windows and automatically machine restarted.
    After few minutes started installing Windows... and stuck for more than 3hrs at by displaying the blue screen of Windows installation... and inactive
    I had restarted the using start button, and finally I could not able to install Windows.
    Then I got black screen with message ' No boot disk, please insert boot the disk and press any key to restart'
    I have restarted using start button by holding 'Alt' key
    Finally I could able to started machine with OS X
    Now I wanted to remove the partition created above, using Boot Camp assist, but it is not able to do it. There is error message ' Error while restoring the hard disk'
    Any help, how to remove this partitioning?  Also in every restart I need to hold 'Alt' key to boot the machine with OS X.
    -Narsimloo Begari

    if you've tried and cannot remove the partition with boot camp assistant, you'll have to open disk utility and reformat the partition there - choose mac journaled and then try to combine this partition back into your existing Mac partition

  • Resized partition, now can only boot using option key

    I made my boot camp partition larger and my os x partition smaller using a 3rd party program. I can still boot into windows, but only using the option key. When I look at my startup disks in OS X, only my OSX partition shows up. Is there any way to make snow leopard recognize this resized partition? Thanks!

    Hi,
    I am not familiar with that program but since it is a Windows program I doubt that it has installed anything in OSX.
    Most likely that program wasn't even "aware" that it was used on a Mac running WIndows.
    And it also might be that that is the reason for your problem.
    To run Windows with BootCamp on a Mac OSX has to establish/use a form of hybrid GPT/MBR partitioning.
    GPT for OSX and MBR for Windows.
    That also means that using any kind pof partitioning tool (resizing etc.) would have to be done best in OSX since only OSX "knows" that there is a Windows partition and can handle the hybrid partitioning accordingly.
    First thing I would propose (if not already there) is a backup / clone of your OSX onto an external HD.
    Secondly boot your Mac from the OSX DVD and use Disk Utility from it to verify/repair your OSX.
    Regards
    Stefan

  • I erased my windows partition using disk utility then realized I should have used boot camp, because now I can't resize the original partition and seem to be stuck with a ghost unusable space. Boot Camp now doesn't give me the option to install or re

    I erased my windows partition using disk utility then realized I should have used boot camp, because now I can't resize the original partition and seem to be stuck with a ghost unusable space. Boot Camp now doesn't give me the option to install or remove windows partition.

    Hi, Ralph,
    The problem is that I did erase the partition, using disk utility, but I can't go back to my original disk size pre-partition, as disk utility won't let me do it and gives the message "Couldn’t modify partition map because file system verification failed." When I try to use Boot Camp Assistant it won't let me select the third option to remove windows.

  • Resize a fat32 partition using linux 3.0

    So I have an external hdd that I use as a backup/archive, and it is formatted using fat32. It is 315GB listed, and 293gb actual. It has about 183gb of data on it, and 110 free. I want to keep some of the data, but also switch the whole thing to ext4. My plan was to shrink the partition, use the free space to copy over the stuff I want, reformat the rest over to ext4, then merge the partitions.
    Apparently as of parted 0.9.0 you can no longer resize fat32 partitions. Is there another utility that I can use to make this happen? Specifically, one that will work with the linux 3.0 kernel? I don't have another drive big enough to get everything onto it, so I need to find a way to keep everything on the drive as I flipflop everything around.
    Thanks!

    ozar wrote:Yes, I just took a look at the latest gparted on the PartedMagic LiveCD and it still offers the option to resize FAT32 partitions.
    Quite possibly PartedMagic links gparted against an old libparted.
    ozar wrote:edit:  oops, looks like I was typing out a response when B pressed ENTER! 
    Heh, PartedMagic != GParted LiveCD

  • Termination error while using 'VRM_SET_VALUES'

    <b></b>
    I m getting program termination error:
    The CODE is as follows:
    MODULE status_9000 OUTPUT.
    *change by satya on 31.08.2006
    data:begin of ws_list occurs 0,
             key(40) type c,
             text(80) type c,
         end of ws_list.
    *data: NAME(25).
    W_NAME = 'L_COMPANY_CODE'.
    ws_list-key = '1'.
    ws_list-text = 'GNPL'.
    append ws_list.
    ws_list-key = '2'.
    ws_list-text = 'NIPA'.
    append ws_list.
    ws_list-key = '3'.
    ws_list-text = 'PPL'.
    append ws_list.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id                    =  W_NAME
        values                = ws_list.
    EXCEPTIONS
      ID_ILLEGAL_NAME       = 1
      OTHERS                = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *end ofchange
    set pf-status 'NEW'.
      set titlebar  'ABC'.
    l_entry_date = sy-datum.
    ENDMODULE.                 " status_9000  OUTPUT

    HI,
    I think you check your declaration part, declare the variables with the same structure,
    See the below Example program:-
      TYPE-POOLS: VRM.
      DATA: NAME TYPE VRM_ID,
      LIST TYPE VRM_VALUES,
      VALUE LIKE LINE OF LIST.
      PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
      AT SELECTION-SCREEN OUTPUT.
      NAME = 'PS_PARM'.
      VALUE-KEY = '1'.
      VALUE-TEXT = 'LINE 1'.
      APPEND VALUE TO LIST.
      VALUE-KEY = '2'.
      VALUE-TEXT = 'LINE 2'.
      APPEND VALUE TO LIST.
      CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
      ID = NAME
      VALUES = LIST.
      START-OF-SELECTION.
      WRITE: / 'PARAMETER:', PS_PARM.
    See the below link for another example:-
    http://www.sap-img.com/ab012.htm
    Regards
    Sudheer

  • Yosemite, Boot Camp, Windows 8.1 - Resizing Partition Guide

    Hey everyone, I had some success with this so I thought I would share:
    What you Need:
    0)  familiarity with the command line, HD partitioning, linux, and lots of nerve.
    1)  Yosemite
    2)  A successful installation of Windows via Boot Camp (I was using 8.1 and I did the installation after I upgraded to Yosemite, i.e., I did not have a Boot Camp partition before upgrading to Yosemite) <-- Any other type of config may not work with this guide!!
    3)  A Linux live usb/cd with gparted (I assume you're familiar with linux and gparted and things like that, I'm not going to go into too many details on how to use that OS or its tools)
    4)  patience and luck
    Disclaimer:  This can really screw up your system if you fail to follow the directions or you have made the storage gods angry... use at your own risk!
    So initially I created a boot camp partition to install Windows 8.1 and after the installation realized I should have allocated more space for Windows.  On the OS X side, I opened the graphical diskutil and discovered I could not resize or change either of the partitions - the only thing I could do was delete the boot camp partition which was not a handy option considering the time I put into installing Windows and its subsequent updates.
    After some careful googling I found this:
    http://apple.stackexchange.com/questions/134498/unable-to-resize-partitions
    Which led me to the solution.  From a terminal run:  'diskutil corestorage list' (without the quotes) to get a list of the logical volumes, groups, and physical disks that OS X created after using boot camp.  The information you will need is the UUID of the logical volume (not the logical volume group or family).  You are then going to use the undocumented command 'diskutil corestorage resizeStack' with the UUID of the logical volume in order to change the size of the volumes and physical disk.  In my case, I wanted to shrink my remaining OS X partition by 40GB and give that to Windows.  Again from the terminal run:
    'diskutil corestorage resizeStack UUID XXXg'  where UUID is the 32 digit identifier of the logical volume and XXX is the desired new size of the disk (e.g., 350g for 350 GB).
    After a few moments, it will finish and in diskutil you should see an amount of unallocated space.  You still can't do anything with it here, but at least it's visible.  Reboot into OS X again just to feel confident that you haven't screwed anything up, yet.  It did seem to take slightly longer to reboot into OS X this one time, but everything turned out ok
    Now using a linux live usb drive, boot into your favorite brand of linux and run gparted.  You should see your unallocated space sandwiched between your OS X partition (which gparted may or may not formally 'see') and the NTFS Windows partition.  Simply move the Windows partition over to occupy the unallocated space and extend it to the end of drive and you're done.  My version of gparted warned me that Windows may not boot after I do this, but for me, it worked fine and booted into Windows properly the first time.  If Windows doesn't boot, you'll need a Windows install on a usb stick (you should have one from your boot camp installation right?) and then you'll need to repair the disk (there are many helpful guides that go through this very thing - just google it).
    It worked for me flawlessly, good luck!

    ashtastic wrote:
    Now using a linux live usb drive, boot into your favorite brand of linux and run gparted.  You should see your unallocated space sandwiched between your OS X partition (which gparted may or may not formally 'see') and the NTFS Windows partition.  Simply move the Windows partition over to occupy the unallocated space and extend it to the end of drive and you're done. 
    Everything has worked so far, I have freed up about 75GB that is in between OSX and my 8.1 Bootcamp Partition, however I can't for the life of me seem to make a working Linux USB. How can you make a BOOTABLE (from this retina macbook pro) Live CD with Gparted. What tools/ISO did you use?

  • Windows Won't Boot after resizing partition

    I am having problems with Windows not rebooting after I resized partition to reduce Mac side and increase Windows side. I do not see the BootCamp partition labelled as such while running disk utility. Upon startup, the Windows partition shows up when I boot up while pressing the ALT key. However, when I try to run Windows, it says " error loading operatig system".
    I also followed instruction and went through to run gdisk successfully. Results towards the end.
    What can be done? Windows still does not boot and It shows ? Suspicious MBR at sector 0.
    Below is information based on typical questions asked here.....
    diskutil list
    /dev/disk0   #:                       TYPE NAME                    SIZE        IDENTIFIER
       0:              GUID_partition_scheme                        *120.0 GB     disk0
       1:                                           EFI                         209.7 MB     disk0s1
       2:                         Apple_HFS Macintosh HD            78.5 GB     disk0s2
       3:                       Apple_Boot Recovery HD             650.0 MB     disk0s3
       4:                   Microsoft Basic Data                         31.7 GB      disk0s4 
    sudo gpt -r -vv show disk0
    gpt show: disk0: mediasize=120034123776; sectorsize=512; blocks=234441648
    gpt show: disk0: Suspicious MBR at sector 0
    gpt show: disk0: Pri GPT at sector 1
    gpt show: disk0: Sec GPT at sector 234441647
          start       size            index       contents
              0          1                             MBR
              1          1                             Pri GPT header
              2         32                            Pri GPT table
             34          6       
             40     409600           1            GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
         409640  153240016      2            GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      153649656    1269544     3            GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
      154919200   17628896       
      172548096   61892608    4            GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
      234440704        911       
      234441615         32                       Sec GPT table
      234441647          1                        Sec GPT header
    sudo fdisk /dev/disk0
    Disk: /dev/disk0 geometry: 14593/255/63 [234441648 sectors]Signature: 0xAA55
             Starting       Ending
    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    1: EE    0   0   2 - 1023 254  63 [         1 -  172548095] <Unknown ID>
    *2: 07 1023 254  63 - 1023 254  63 [ 172548096 -   61892608] HPFS/QNX/AUX
    3: 00    0   0   0 -    0   0   0 [         0 -          0] unused    
    4: 00    0   0   0 -    0   0   0 [         0 -          0] unused 
    sudo gdisk /dev/disk0
    GPT fdisk (gdisk) version 0.8.7
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    Found valid GPT with hybrid MBR; using GPT.
    Command (? for help): r
    Recovery/transformation command (? for help): h
    WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
    just hit the Enter key at the below prompt and your MBR partition table will
    be untouched.
    Type from one to three GPT partition numbers, separated by spaces, to be
    added to the hybrid MBR, in sequence: 4
    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
    Creating entry for GPT partition #4 (MBR partition #2)
    Enter an MBR hex code (default 07):
    Set the bootable flag? (Y/N): y
    Unused partition space(s) found. Use one to protect more partitions? (Y/N): n
    Recovery/transformation command (? for help): o
    Disk size is 234441648 sectors (111.8 GiB)
    MBR disk identifier: "DELETED INFO"
    MBR partitions:
    Number  Boot  Start Sector   End Sector   Status      Code
       1                               1    172548095   primary     0xEE
       2           *     172548096    234440703   primary     0x07
    Recovery/transformation command (? for help): w
    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
    PARTITIONS!!
    Do you want to proceed? (Y/N): y
    OK; writing new GUID partition table (GPT) to /dev/disk2.
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Warning: The kernel may continue to use old or deleted partitions.
    You should reboot or remove the drive.
    The operation has completed successfully.

    So here's what I think happened. Upon resizing the OS X volume, a 5th partition was created. When that happens, diskutil removes the hybrid MBR that's needed to activate the EFI firmware CSM (BIOS emulator) which is still presently used for booting Windows on Apple hardware. Upon removing the hybrid MBR, Windows is no longer bootable. So what you probably did was used Disk Utility to reverse what you did by deleting the extra partition. When you do this, diskutil recreates the hybrid MBR but with the wrong partition type code. It sets it to 0x0C, and therefore thinks it's FAT32, whereas it should be 0x07 for NTFS. Disk Utility will then let you run a disk check on what it erroneously thinks is a FAT32 volume, but is in fact NTFS. If any writes are done, which it appears is the case, it corrupts the NTFS file system.
    So this is just yet another Bootcamp data loss story, without any warning in either documentation or Disk Utility whatsoever.
    What version of OS X is this?
    The easiest, but most tedious thing to do is to totally start over with everything: obliterate the entire drive with Disk Utility making 1 partition only, reinstalling OS X and files from backups, use Bootcamp Assistant to resize the OS X volume the way you really want it, reinstall Windows and restore from its backup. All of that can be done in the GUI.
    You might still use the Windows install disk to run Windows startup repair. It might fix the Bootcamp volume. The remaining problem in that case is what to do with the large pile of free space, but I'll make those suggestions later once you get to that point.
    If Windows startup repair can't fix the Bootcamp volume, and you don't have a backup, then you'll need to download and install testdisk, and read how to use it to try and find your data. It's an iterative process. Once that's done, while it probably won't fix it and make it bootable again, you'll have a basic backup of files. The remaining thing to do is use gdisk remove the broken Windows partition, make a new one that also includes free space you presumably wanted Windows to have, and make a new hybrid MBR adding partitions 2 3 4. Then reinstall Windows, your apps, and restore your data from backups.
    So that's the gist. Ask if you have more questions.

  • Help! Unable to resize partition - Windows XP reverts to old size.

    Hi all,
    I'm trying to resize my Windoze partition and can't seem to get the new size to stick.
    First, I tried CampTune. It proved absolutely useless. I tried simply using it to resize my partitions, I tried using it on an empty Windows partition. Every time I got an error, and the Two Canoes web site doesn't even have a category for CampTune in their help file. Epic fail.
    Second, after backing up my original partition using WinClone, I wiped my old partition, used Boot Camp to create a new (larger) partition, restored my Windoze installation into the new partition, and it's still the same size it was before. The Windows partition is the old size, the Mac partition is the new (smaller) size.
    Anybody have any idea what I'm doing wrong here? Help!
    Thanks!

    Hi Jesse,
    first: CampTune is not a TwoCanoes product but a Paragon product.
    I never used CampTune for resizing, but with WinClone have a look at their FAQs http://www.twocanoes.com/forums/viewtopic.php?t=515 under the section *"My current Windows partition is the wrong size, and I want to make it larger. How do I do this?"*
    Is your Windows partition using the FAT32 file system or NTFS file system.
    With FAT32 you cannot expand the partition size, only with NTFS.
    Regards
    Stefan

Maybe you are looking for

  • Easy way to get a print out of my iTunes library

    I want to get a printout of my library -- it's not big; maybe 1400 songs.  I've not found an easy way to do it.  The best I could come up with was to create a playlist that contains every song in my library and then print out that playlist. It sounde

  • FormsCentral Fillable PDF on iPad

    If I create a fillable PDF and distribute it through FormsCentral, will people be able to fill out the PDF and submit on an iPad like they would on a computer?  We cannot use web based forms because most of our sales people that are in the field do n

  • Apple iphone4 is locked and will not let me dial or access contacts or recents, etc, can anyone help here?

    I can't get my Apple iphone 4 to allow me to access anything (Phone functions only)after it comes up. No dialing, favorites or contacts, etc. What to do to fix it?

  • Editor Issues - Photoshop Elements 8

    My editor will not launch in Photoshop Elements 8.  This program worked 6 to 9 months ago.  The only difference in my system is that I installed a new printer.

  • Labview Automatic Measurement Examples

    Hi I'm totally new to the Labview.. The Equipment I have are Signal Generator, Spectrum Analyser, Network Analyser, Oscilloscope and so on.. I have already connected the GPIB cables to all the equipment and the equipment are able to be reconised unde