Partition editing

From Noah.org
Revision as of 18:54, 3 March 2008 by Root (talk | contribs) (New page: Category:Engineering == sfdisk == On Ubuntu you may have to install the util-linux package: <pre> aptitude install util-linux </pre> === Backup extended partition table === <pre> sfd...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.