Created
February 12, 2013 18:51
-
-
Save fessyfoo/4772245 to your computer and use it in GitHub Desktop.
copy partition tables from one disk to another using sfdisk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| bail () { | |
| echo "$@" | |
| exit 1; | |
| } | |
| test -z "$2" && bail "Usage: $0 FROMDEV TODEV" | |
| set -x | |
| sfdisk -d "$1" | sfdisk "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment