Re: Disk Geometries reported incorrectly on 2.6.0-testX

From: Andries Brouwer
Date: Sat Nov 29 2003 - 08:00:28 EST


> > Also, can Parted save/restore the full and exact partition table a
> > scriptable way? I mean something like this:
> >
> > sfdisk -d /dev/hda > hda.pt # save
> > sfdisk /dev/hda < hda.pt # restore
> >
> > sfdisk can't recover geometry so apparently no one-liner, widely available,
> > partition table backup/recovery is possible at present on Linux :-o
> > dd if=/dev/hda of=hda.mbr bs=512 count=1 won't save the logical partitions.

sfdisk has a slightly different option: -O will save all sectors that
you change during an sfdisk operation, so that you can restore them later.

You see, saving the logical partitions is not enough - these sectors
are spread out over the disk, and there used to be something else
where these sectors are written. If the user makes a partitioning mistake
he destroys a sector worth of data. It is that data that sfdisk -O will save
(and -I will restore).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/