SUMMARY: copying a system disk to a new one

From: Howard Schultens (
Date: Thu Sep 10 1992 - 10:04:05 CDT

SUMMARY: copying a system disk to a new one

I received a number of very helpful replies. Most prefer using
a dump|restore pipe after defining partitions on the new disk and
doing a newfs on them. Anne Hammond (hammond@solarz.Colorado.EDU) sent me
the specific commands:

(after mounting new disk partition on /mnt)

dump 0f - / | (cd /mnt; restore xf -)

I had thought of using simply cp -R / /mnt , but the dump|restore pipe is
sure to copy all the different links correctly. After copying, one must
install a scsi boot block on the new disk: for example

mount /dev/sd1a /mnt
cd /usr/kvm/mdec
installboot -vlt /mnt/boot bootsd /dev/rsd1a

svein (??) (nedre@gest20.SINet.SLB.COM) gives an alternative method using

| This is an easy and fast way to copy your system disk :
| - Connect your new disk to SCSI bus, format and partition it.
| Create new filesystems.
| Copy one partition at a time like this :
| (Example using sd0 as old (source) system disk and sd2 as new (destination) syst
| em disk)
| - # mount /dev/sd2a /mnt CC : Mount destination parti
| tion to /mnt
| - # find . -xdev -depth -print | cpio -pdlm /mnt CC : Copy 'a' partition to n
| ew disk.
| - Then do the same for the other partitions !
| When finished install bootblock to the new disk :
| - # mount /dev/sd2a /mnt CC : Mount destination parti
| tion to /mnt
| - # cd /usr/kvm/mdec
| - # installboot -vlt /mnt/boot bootsd /dev/rsd2a
| And then your new disk is ready !
| The best is to exit any window manager before you do all this stuff.
| That is because you also copies the temporary files under /tmp which som window
| managers (like openwin) are using. If you then boot from your new disk, and try
| to
| start openwin, you will get an error message saying that openwin is already runn
| ing !

Perry Hutchison ( reminded me to set the
boot device in the eeprom correctly.

John Schneider ( suggested formatting a new
drive and then doing about 6 passes of surface analysis before the copying,
as insurance against "infant mortality".

Thanks to: (Adam Shostack) (Frank Allan (Network Manager))
Steve Elliott <>
Jeffrey Marans <> (John D Schneider)
dasun!wdceng!muir@sunkist.West.Sun.COM (Scott Muir (Muir) x6764)
Larry Chin <>
Joseph C. Grant <>
hammond@solarz.Colorado.EDU (Anne Hammond)

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:49 CDT