I wonder if it is possible to restore one partition to another in command line? The similar operation can be performed with Disk Utility, but unfortunately I cannot boot in graphics mode (even safe mode does not work). Man page of diskutil does not describe such option. I use Mac OS X 10.7.
Restore disk in single user mode
command linedisk-utility
Related Question
- Disk Utility – Command Line Equivalent to Obtain UUID
- IOS – Disk Utility (recovery mode) stuck at loading
- Cannot partition SSD in Bootcamp or Disk Utility
- Disk Utility – Fix Lost Space After Merging Disk Partition in macOS Mojave
- How to restore a disk image to source disk using Disk Utility
- How to Remove Container Disk and Reclaim Space with Main Partition
Best Answer
Normally you can't. If you boot into single-user mode you'll find that diskutil can't run because it's required modules aren't available.
You can try this: http://sabiancrash.blogspot.com/2011/06/how-to-run-diskutil-in-single-user-mode.html
But, the easiest way would be to use an OSX install CD. Boot from the CD (put it in, hold C at boot). When the installer first loads you can choose Disk Utility from the Tools menu.