> > To check my understanding - would it be correct to say that;
> > 1. Using dd to copy the first 512 bytes (MBR) is ALL that is needed to
> > setup the partitions - that is i wont need to run fdisk etc afterward.
>
> This is correct if you only have primary partitions.  It will not copy the
> extended partition and any logical partitions in it.  They reside in the
> first
> sector of the extended partition, which is not a boot sector, but contains
> the
> logical partition table. (I found this out the hard way!)
>
> Have a look at this to see how you can back up the extended partition
> tables
> with sfdisk (there's more than one of these, if you have more than one
> logical
> partition) :
>
> http://www.partimage.org/Partimage-manual_Backup-partition-table
>
>
> > 2. Using dd in this way of course will not update the kernel's knowledge
> of
> > the partition table so a partprobe is necessary
>
> Yes, or a reboot.
>
>
> > 3. When using fdisk to write a partition table and exit, it calls a
> re-read
> > of the partition table by the kernel so any changes should be ready
> > straight away. (there's a message about calling ioctl when it exits - so
> i
> > guess that is the update)
>
> They are ready (i.e. written) but not yet read by the OS.  Tools like
> gparted
> (part)probe the device to re-read the partition table after saving changes
> to
> disk.
>

Thanks Mick. Great info, esp about the extended partitions. Fortunately, I
dont have any on this disk but good to know.

Reply via email to