Another use for gdisk, for moving a Lion installation with Recovery HD to a new larger disk.
With Snow Leopard you could simply boot from a 2nd disk and: dd /dev/disk0 /dev/disk1 bs=1M diskutil resizevolume /dev/disk1 limits and you figure out how much bigger you can make it, and then fill in the blank in G like: diskutil resizevolume /dev/disk1 749G Done. But in Lion this won't work by default because you will have a Recovery HD partition in the way of your main system/data partition and the unallocated space of the new disk. So resize won't work. In retrospect it seems to me Apple should have put the Recovery HD as slice 2, and Lion main in slice 3. But whatever... Using gdisk you can make a new 620M partition with ab00 partition type at the end of the new disk as disk0s4 then dd disk0s3 (recovery hd) to disk0s4. That's it, you have two Recovery HDs now. Next gdisk to remove the old Recovery HD leaving a pile of unallocated space in between disk0s2 and disk0s4. Diskutil's resize will now work and let you add in all that unallocated space by growing disk0s2. Way faster than cloning to a larger disk. Now if you're using FileVault 2 with Lion...that's a bit more tricky because unlike LVM2, CoreStorage does not appear to have a (documented) way to move physical extents from one physical volume to another, whether you're using encryption or not. Chris _______________________________________________ MacOSX-admin mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-admin
