Cloning a system and copying the partition table to another drive
Gordon Henderson
gordon at drogon.net
Mon Feb 19 16:49:41 CST 2007
On Mon, 19 Feb 2007, Mukarram Syed wrote:
> Hi
>
> Two part question:
>
> 1.
>
> Is there a procedure to moving a drive to another system? Meaning.
>
> You could disable a mirrored drive from mdadm or raid controller and put it
> in another system, boot it in Single User mode. Change hostname/IP address
> and boot it off.
I've done this many times. Works a treat for me. I wouldn't use mdadm on
the donor server - just shut it down cleanly, then remove a drive. Take
one drive into the new system, then ...
> I tried this on my PE2950's but the other system would not boot. I don't
> remember the error exactly I think it was referring to the MBR. Is there
> something in the grub.conf file that we need to modify?
Can't answer this - I use LILO ...
> 2.
>
> Also in Solaris you could copy the partition table from one drive to another
> using the following command:
>
> Prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
>
> Is there such a command in Linux using fdisk or something? I haven't found
> one in my research.
Best to use sfdisk, I've found.
sfdisk -d /dev/sda > sda.part
sfdisk /dev/sdb < sda.part
Gordon
More information about the Linux-PowerEdge
mailing list