Hi Everybody,

Could somebody give me a suggestion on how I could create "logical
partitions" (the ones inside a "DOS Extended" partition) under FreeBSD?
I am trying to put together an sh script which reads the partition layout
from one of two identical harddisks and recreates the same layout on the
other. Important: I don't need to duplicate the contents of the partitions,
all I need is the exact duplicate of the partition layout.

The so called "Primary partitions" (or slices in our FreeBSD namespace) are
easy to do. All I had to do is copy the first 63 sectors of disk1 to disk2
and I already have the same MBR including max 4 primary partitions and also
the boot manager. :-)
But if one of these maximum 4 partitions is a DOS Extended partition, all I
have so far on the second disk is that one "container" partition, and I do
not yet have any of the logical partitions inside it.
If you have any idea on how I could create these within an sh script under
FreeBSD, please let me know!


if you need to reply directly: