[opensuse] Parted question
Hello everybody, With the command parted - m /dev/sda > file.txt I get machinereadeble partition info. How can I use this info to recreate the partiontable. I want exact the same partitions on a new disk. In the man page I can't find how to use this machine readable output. Thanks, Hans -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hans defaber schreef:
Hello everybody,
With the command parted - m /dev/sda > file.txt I get machinereadeble partition info. How can I use this info to recreate the partiontable. I want exact the same partitions on a new disk. In the man page I can't find how to use this machine readable output.
Thanks, Hans correction: The command is parted -l -m /dev/sda > file.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Dear Hans, just remembered your posting. Maybe you're still interested in.
With the command parted - m /dev/sda > file.txt I get machinereadeble partition info. How can I use this info to recreate the partiontable. I want exact the same partitions on a new disk. In the man page I can't find how to use this machine readable output.
Thanks, Hans correction: The command is parted -l -m /dev/sda > file.txt
No guarantee (please take backups before) but this worked for me: # sfdisk -d /dev/sda | sfdisk /dev/sdb So transfered to your question: 1.# sfdisk -d /dev/sda > diskpart.txt 2.# less diskpart.txt | sfdisk /dev/sdb Maybe it helped, Johannes -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
No guarantee (please take backups before) but this worked for me:
# sfdisk -d /dev/sda | sfdisk /dev/sdb
So transfered to your question:
1.# sfdisk -d /dev/sda > diskpart.txt 2.# less diskpart.txt | sfdisk /dev/sdb ??
2.# cat diskpart.txt | sfdisk /dev/sdb ;-) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Administrator
-
Hans defaber
-
Johannes Nohl