Partition editing

From Noah.org
Revision as of 08:13, 4 August 2010 by Root (talk | contribs)
Jump to navigationJump to search

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.