Backup the partition table

$ sfdisk -d /dev/sda > /tmp/partitions.sda

Partition the disk

$ fdisk /dev/sda

Restore partition table after major mistake

$ sfdisk /dev/sda < /tmp/partitions.sda

Update /proc/partitions

$ partprobe /dev/sda

Leave a Reply

You must be logged in to post a comment.