Problem "cloning" disks

Problem "cloning" disks

Post by Shawn A. Cliffor » Wed, 24 Feb 1999 04:00:00



Here's the problem I encountered:

    1)  I can "clone" a disk from a Sparc5 (sun4m architecture), run
'installboot' on it, change the 6 files (under Solaris) that contain the
hostname, and stick it into another Sparc5 and it works fine.  By
cloning, I mean that I take a second disk of roughly the same size as
the disk to be cloned, partition it roughly the same (so that there is
ample room in each partition for the copy), and then use
ufsdump/ufsrestore to copy all of the files over, then run 'installboot'
to make it bootable.

    2)  If, however, I put this cloned disk in a Sparc10 (also sun4m
architecture), the system goes crazy when it boots up.  Even if I use
'installboot' from a Sparc10, the disk cloned from a Sparc5 will not
boot.  Once the boot scripts start to be processed, and the system tries
to configure the network interface, things get ugly.  Even if I boot
with 'boot -b' to bypass script processing, it doesn't work.

Why?  I'm just curious, 'cause I lost a lot of time trying to replicate
systems in this fashion when I encountered a Sparc10.

-- Shawn

------------------------------------------------------
 Shawn A. Clifford, Unix Systems Administrator
 Work Phone:  (407) 356-5179   Pager: (407) 941-4979

 Web       :  www.nuphase.com/~sac/
------------------------------------------------------

 
 
 

Problem "cloning" disks

Post by Michael Wa » Thu, 25 Feb 1999 04:00:00


It is my experience that you can only clone a disk on sparc 1
for sparc 1, on sparc 2 for sparc 2, on sparc n for sparc n. I
once clone a disk on Enterprise 4000 and use it on Enterprise 5000
and it does not work. Maybe someone familiar with the hardware internals
can answer why.
--
unix programs: niftp (non-interactive recursive ftp), hide (hide command args),
submit (replace nohup), etc from ftp://ftp.mindspring.com/users/mwang/unix-prog


 
 
 

Problem "cloning" disks

Post by Dave Ba » Thu, 25 Feb 1999 04:00:00



Quote:>    2)  If, however, I put this cloned disk in a Sparc10 (also sun4m
>architecture), the system goes crazy when it boots up.  Even if I use

For this and other reasons (often disk geometries of shipped disks
vary, making cloning more tricky), as a rule now I never clone disks
any more.

I bit the bullet and set up a JumpStart configuration which does
all my local mods, including installing patches.  Most of the
configuration is done with GNU cfengine.  It takes longer than a
disk cloning, but I don't have to open and shut boxes and this system
is far more flexible.  I can re-install anything from desktops
to servers from my chair.

--Dave
--
http://www.cis.ohio-state.edu/~barr/

 
 
 

Problem "cloning" disks

Post by Shawn A. Cliffor » Sat, 27 Feb 1999 04:00:00



> It is my experience that you can only clone a disk on sparc 1
> for sparc 1, on sparc 2 for sparc 2, on sparc n for sparc n. I
> once clone a disk on Enterprise 4000 and use it on Enterprise 5000
> and it does not work. Maybe someone familiar with the hardware internals
> can answer why.

I spoke to Sun technical support yesterday for a different issue, but asked the
tech about this curiosity.  He told me that in order to properly clone a disk from
Sparc5 to Sparc10 (for example), you have to do the following after you have
copied all of the partitions and done the installboot:
    1)  Copy the /dev and /devices directories from an existing Sparc10 (or target
platform)
    2)  Copy /etc/path_to_inst from an existing Sparc10
    3)  ok> boot -rw

Obviously the two machine involved need to be the same architecture (sun4m,
su4c,...).

I haven't tried it yet, but he sent me an email with an outline, if anyone is
interested.

-- Shawn

------------------------------------------------------
 Shawn A. Clifford, Unix Systems Administrator
 Work Phone:  (407) 356-5179   Pager: (407) 941-4979

 Web       :  www.nuphase.com/~sac/
------------------------------------------------------

 
 
 

Problem "cloning" disks

Post by Matthew SA » Sun, 28 Feb 1999 04:00:00



Quote:>I spoke to Sun technical support yesterday for a different issue, but asked the
>tech about this curiosity.  He told me that in order to properly clone a disk from
>Sparc5 to Sparc10 (for example), you have to do the following after you have
>copied all of the partitions and done the installboot:
>    1)  Copy the /dev and /devices directories from an existing Sparc10 (or target
>platform)
>    2)  Copy /etc/path_to_inst from an existing Sparc10
>    3)  ok> boot -rw

Sun has an Infodoc on sunsolve.sun.com about this. I always lose my hardcopy
and never remember to mark a bookmark. Basically you do the following

1) boot cdrom -s
2) fsck /dev/rdsk/c0t0d0s0 ; fsck /dev/rdsk/c0t0d0s3;
3) mount /dev/dsk/c0t0d0s0 /a
4) mount /dev/dsk/c0t0d0s3 /a/usr
5) _INIT_RECONFIG=1;export _INIT_RECONFIG
6) /usr/sbin/chroot /a /etc/rcS.d/S50drvconfig
7) /usr/sbin/chroot /a /etc/rcS.d/S60devlinks
8) reboot

The caveat of "same architecture" holds.

-Matthew