Partition table to parted script
Julien BLACHE
jblache at debian.org
Mon Mar 7 17:54:43 CET 2011
Michael Tautschnig <mt at debian.org> wrote:
Hi Michael,
> I have no idea about the python-parted API,
Well, it's largely suboptimal, just like parted itself, and don't get me
started on the d word :)
> but isn't there some alternative to using the geometry in
>
> start = part.geometry.start * disk.device.sectorSize
>
> ? This sounds really dangerous as the C/H/S geometry (if that is what geometry
> is about) isn't really useful anymore these days...
It's been a while since I wrote the script, so all I can tell you is
that if I used that, it's probably because I didn't find a better way...
That said, the sector size is there to stay and alignment must be a
multiple of the sector size, so that part is safe. As for the geometry
in part.geometry.start, it's just a naming thing and has no relation to
the CHS disk geometry IIRC.
But it does screw up partitions when used with msdos partition tables
and improper alignment, hence my warning about this in my initial mail :)
JB.
--
Julien BLACHE - Debian & GNU/Linux Developer - <jblache at debian.org>
Public key available on <http://www.jblache.org> - KeyID: F5D6 5169
GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169
More information about the linux-fai-devel
mailing list