Summary Partition Table Info

From: McIntire, John (john_mcintire@unitrode.com)
Date: Tue Aug 03 1999 - 07:41:01 CDT


Here is a summary of info received regarding saving and then restoring a
saved partition table. Thanks to all for your very informative responses

1) Use format
2) select the disk you want to use as template for the new disk
3) option "partition",
4) option "name" and give your template a name
5) quit to the format> prompt and select "disk"
6) select the new disk
7) option "partition"
8) option "select"
9) enter the number corresponding to the name you gave your template
10) label
--------------------
1.- Execute the command format.
2.- Select the disk you want to work on.
3.- From the format menu, select partition.
4.- From this menu, choose the option select. The system should show you all

the tables that it has in the /etc/format.dat file, including the table you
already saved.
5.- Select the table you want.
6.- Execute the command label from the partition menu, and then quit from
the partition and quit from the format menu.
--------------------
If you have both disks connected to the same system and cXtYdZs0 is the
source
and cAtBdCs0 is the new one:
        dd if=/dev/rdsk/cXtYdZs0 of=/dev/rdsk/cAtBdCs0 count=1 bs=512
If you have the disks in diferent systems, copy sector0 to a file:
        dd if=/dev/rdsk/cXtYdZs0 of=/tmp/sector0 count=1 bs=512
and then take the file to the second system:
        dd if=/tmp/sector0 of=/dev/rdsk/cAtBdCs0 count=1 bs=512
This is the fastest way to do it.
--------------------
/etc/prtvtoc /dev/dsk/c0t0d0s2 > somefilename
then copy this to your new disk, once there I believe that if you perfrom
/etc/fmthard -s somefilename /dev/rdsk/c0t0d0s2

you will have a new partition table. Note that the prtvtoc is done on the
disk and the fmthard is on the rawdisk. The new disk will, of course have to
have been formated, and labeled prior to all of this as fmthard cannot label
an unformated and unlabled disk.
---------------------
add them to /etc/format.dat in the 'partition =' section, usually at the
lower end of the file
---------------------
Set up a FORMAT_PATH variable to include the file name
---------------------
/usr/sbin/prtvtoc /dev/rdsk/c?t?d?s2 > /tmp/vtoc # The existing
/usr/sbin/fmthard -s /tmp/vtoc /dev/rdsk/c?t?d?s2 # The new
---------------------
>From Sun
How to label the disk and save the customized partition table:

The following procedure adds the new partition table definition to a file
called /etc/format.dat -- this enables a customized partition to be reused.

1) label the disk to update the disk label:

        partition > label
        Are you sure? yes

2) Name the current table. Names frequently used include the disk
manufacture
   information:

        partion > name
        Enter table name (remember quotes) : " Prod.SUN1.05"

3) Quit the partition table.

        partition > quit

4) Save the new disk and partition definitions.

        format> save
        Saving new partition definition
        Enter file name [ "./format.dat"]:

5) To quit the format utility:

        format > quit

John McIntire
Senior Systems Analyst
Unitrode Corporation
7 Continental Blvd
Merrimack, NH 03054
Tel: (603)429-6227
Fax: (603)429-6085



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:24 CDT