Friday, September 17, 2010

Extend Partition on Mac

I had a bootcamp partition that I never used and wanted to extend my Mac partition to the Windows partition.  In the Disk Utility, there were no options to do this without destroying your data.  I investigated further and found a solution using the command line version of the Disk Utility.

This command allows you to merge two or more existing partitions into one.  The partitions will be merged and all data will be lost except for the first one.  Run the command diskutil mergePartitions for more details.

Steps I used to extend my partition are explained below.  The commands below are for my disk setup and may have to be modified to suit your configuration.  

1) Show the partitions installed on your mac:

macbook-pro:~ mactimes$ sudo diskutil list
Password:
/dev/disk0
   #: TYPE NAME SIZE IDENTIFIER
   0: GUID_partition_scheme *500.1 GB disk0
   1: EFI 209.7 MB disk0s1
   2: Apple_HFS MacBook 449.8 GB disk0s2
   3: Microsoft Basic Data WINDOWSXP 50.0 GB disk0s3

 2) Merge the partitions by running the following command.  Be very careful of the syntax and order. 
macbook-pro:~ mactimes$ sudo diskutil mergePartitions "Journaled HFS+" New disk0s2 disk0s3
Password:
Merging partitions into a new partition
     Start partition: disk0s2 MacBook
     Finish partition: disk0s3 BOOTCAMP
Started partitioning on disk0
Merging partitions
Waiting for disks to reappear
Growing disk
Finished partitioning on disk0
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS MacBook                 499.8 GB   disk0s2
Once done, you will see that the partition table has been merged and you are able to recover the wasted space of your Boot camp partition.  

14 comments:

  1. Great! Thanks for sharing the information. That is very helpful for increasing my knowledge in this field.
    pacman
    happy wheels
    my little pony games
    unblocked games
    unblockedgames
    friv4
    kizi4
    stunt master hacked

    ReplyDelete
  2. Truyen ngon tinh hay la the loai truyen tinh cam
    Truyen teen hay la nhung truyen tinh yeu tuoi teen
    Don doc tai trang doc truyen online.

    ReplyDelete
  3. Thanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well.this was actually what i was looking for,and i am glad to came here
    earn to die 3
    earn to die 3
    Hi! I’ve been reading your blog for a while now and finally got the courage to go ahead and give youu a shout out from Austin Texas! Just wanted to tell you keep up the fantastic work!my weblog
    earn to die 3
    earn to die 3
    earn to die 3

    ReplyDelete
  4. age of waraz game free
    Thanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well.this was actually what i was looking for,and i am glad to came here!
    game tanlk trouble
    earn to die 3
    game tank trouble
    age of waraz23456

    ReplyDelete
  5. I was working and suddenly I visits your site frequently and recommended it to me to read also. Age Of War 2
    Big Farm | Slitherio
    Tank Trouble | Happy Wheels
    Goodgeme Empire | Slither.io

    ReplyDelete
  6. And money. Thank God for instant loans! It is usually fast loans difficult to approach
    happy wheels | friv | girlsgogames | games2girls | happy wheels

    ReplyDelete
  7. This is one of the cult game now, a lot of people enjoy playing them . Also you can refer to the game :
    gold mine strike | pokemon go 2
    The game controls are shown just under . Movement mechanisms primarily include acceleration and tilting controls.
    stickman games | stick war 2 | animal jam 2

    ReplyDelete
  8. Your blog posts are more interesting and impressive. I think there are many people like and visit it regularly, including me.I actually appreciate your own position and I will be sure to come back here.
    facebook entrar l outlook iniciar sesión l hotmail login l baixar facebook l hola launcher l run 2 l b612 app l geometry dash 2.0

    ReplyDelete
  9. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    http://www.jualobataborsiherbal.com/ obat aborsi
    http://caramenggugurkankandungan.info/ cara menggugurkan kandungan
    http://www.jualobataborsiherbal.com/cara-menggugurkan-kandungan/ cara menggugurkan kandungan
    http://jualobatpenggugurkandungan.net/ obat penggugur kandungan
    http://tandatandakehamilan.net/ tanda tanda kehamilan
    http://tandatandakehamilan.net/cara-cepat-dan-selamat-menggugurkan-kandungan/ cara menggugurkan kandungan
    http://obataborsi59.com/ obat aborsi
    http://obattelatdatangbulan.info/ obat telat datang bulan

    ReplyDelete
  10. Thanks for sharing the information. It is very useful for my future. keep sharing
    run2online.net

    ReplyDelete