Difference between revisions of "Partition editing"
From Noah.org
Jump to navigationJump to searchm |
|||
Line 1: | Line 1: | ||
[[Category:Engineering]] | [[Category:Engineering]] | ||
− | [[Category: | + | [[Category:Drives_and_Filesystems]] |
== sfdisk == | == sfdisk == | ||
Revision as of 08:13, 4 August 2010
sfdisk
On Ubuntu you may have to install the util-linux package:
aptitude install util-linux
Backup extended partition table
sfdisk -d /dev/hda > /tmp/hda
Restore extended partition table
sfdisk /dev/hda < /tmp/hda
Note that you can edit /tmp/hda between Backup and Restore. You can use this to extend the last partition if you imaged from a smaller drive to a larger drive. You cannot use this to manipulate partitions in the middle without destroying their contents.