A/UX: Using "dd" To Copy Partitions (9/94)


One way of copying A/UX disks is to do a "dd" copy of the various partitions. This is particularly useful on large disks, or when a CD-ROM is not available. However, if you do a "dd" copy, the file system is also copied. This may cause problems on drives that do not like the way Apple has fine-tuned the file system for its files (some drives come with their own parameter files for creating file systems--so that the Generic file is not used).

1) Is this true?

2) Does it make a difference if you specify "rdsk" or "dsk"?

3) Are there better ways to install A/UX on large disks (in particular,
allowing larger root&usr partitions), like special versions of tar?

1) Yes, "dd" is often used to do an entire image copy from one hard drive
to another of the same size. For instance, to copy an Apple HD80 SC to
another Apple HD80 SC, use this command:

dd if=/dev/dsk/c0d0s31 of=/dev/dsk/c5d0s31 bs=20k

It also can copy file system by file system (with the same size). For
example, to copy one A/UX root file system to another, do:

dd if=/dev/dsk/c0d0s0 of=/dev/dsk/c5d0s0

Since it is an imaging copy from one hard drive to another, everything,
including partition map and super block information in the file system,
is copied to the destination disk or partition. Therefore, size
differences are significant. If you "dd" an entire HD80 SC to an HD160
SC, only 80MB is usable on the HD160 SC.

The two hard drives do not necessarily have to be the same brand. For
instance, you can copy from an Apple HD80 SC to a third-party 80MB hard
drive, or copy the root file system from an A/UX CD-ROM drive to an
Apple HD80 SC A/UX root file system.

2) There is no particular difference when specifying "dsk" or "rsk"; they
give the same result. However, specifying "rdsk" (raw device I/O) seems
to be much faster than "dsk" (block device I/O) because, under raw I/O,
there is no block transfer size constraint by the file system logical
block size--it can transfer many disk blocks per disk operations.

3) If the non-standard procedures section in the "A/UX Installation Guide"
documentation does not meet your needs, you can install A/UX on large
disks with larger Root&Usr partition than the standard size. For
instance:

- Initialize and partition the large disk with the desired Root&Usr
size. This can be done using the vendor formatter software or the
A/UX "dp" utility.

- Make a new root file system. For example:

newfs -s size device-file type

- Mount the new root file system on a directory. For example:

mount /dev/dsk/c5d0s0 /big

- Use "cpio" to copy the standard A/UX Root&Usr file system to a new
one. For example:

find / -depth -print | cpio -pdlmu /big


Article Change History:
23 Sep 1994 - Reviewed
31 Aug 1992 - REVIEWED For technical accuracy.

Support Information Services
Published Date: Feb 18, 2012