Next | Prev | Up | Top | Contents | Index

Creating a New System Disk From IRIX

This procedure describes how to turn an option disk into a system disk. The option disk doesn't need to have a filesystem or be mounted prior to starting the procedure.

Caution: The procedure in this section destroys all data on the option disk. If the option disk contains files that you want to save, back up all files on the option disk to tape or another disk before beginning this procedure. You can use this procedure when you want to change to a larger system disk, for example from a 1 GB disk to a 2 GB disk, or when you want to create a system disk that you can move to another system. With this procedure, you create a "fresh" disk by installing software from an IRIX system software CD. (To create an exact copy of a system disk, use the section "Creating a New System Disk by Cloning" in this chapter instead.) Note that if you plan to create a system disk for another system, the systems must be identical because of hardware dependencies in IRIX.

You must perform this procedure as superuser. The procedure requires several system reboots, so other users shouldn't be using the system.

  1. Using hinv, determine the controller and drive addresses of the disk to be turned into a system disk. In this procedure, the example commands and output assume that the disk is on controller 0 and drive address 2. Substitute your controller and drive address throughout these instructions.

  2. To repartition the disk so that it can be used as a system disk, begin by invoking fx:

    # fx

    fx version 5.3, Dec 19, 1994

  3. Answer the prompts with the correct controller number and drive address for the disk you are converting and 0 for the lun number, for example:
fx: "device-name" = (dksc) <Enter>
fx: ctlr# = (0) <Enter>
fx: drive# = (1) 2
fx: lun# = (0) <Enter>
...opening dksc(0,2,0)
...controller test...OK
Scsi drive type == SGI     SEAGATE ST31200N8640

----- please choose one (? for help, .. to quit this menu)-----
[exi]t               [d]ebug/             [l]abel/
[b]adblock/          [exe]rcise/          [r]epartition/

  1. Choose the repartition command:
fx> repartition

----- partitions-----
part  type       cyls             blocks          Megabytes   (base+size)
  7: efs        4 + 2722       3024 + 2057832       1 + 1005
  8: volhdr     0 + 4             0 + 3024          0 + 1
 10: volume     0 + 2726          0 + 2060856       0 + 1006

capacity is 2061108 blocks

  1. Choose rootdrive or usrrootdrive, depending upon whether you want a combined root and usr partition or separate root and usr partitions. (See the section "System Disks, Option Disks, and Partition Layouts" in Chapter 1 for advantages and disadvantages of each.) In this example, a combined root and usr disk, configured for XFS, is chosen:
----- please choose one (? for help, .. to quit this menu)-----
[ro]otdrive        [u]srrootdrive     [o]ptiondrive      [re]size

fx/repartition> rootdrive

fx/repartition/rootdrive: type of data partition = (xfs) <Enter>

----- partitions-----
part  type       cyls             blocks          Megabytes   (base+size)
  0: xfs        4 + 2614       3024 + 1976184       1 + 965  
  1: raw     2618 + 108     1979208 + 81648       966 + 40   
  8: volhdr     0 + 4             0 + 3024          0 + 1    
 10: volume     0 + 2726          0 + 2060856       0 + 1006 

capacity is 2061108 blocks

  1. Quit fx:
----- please choose one (? for help, .. to quit this menu)-----
[ro]otdrive        [u]srrootdrive     [o]ptiondrive      [re]size
fx/repartition> ../exit

  1. Use the procedure in the section "Adding Files to the Volume Header With dvhtool" in this chapter to examine the contents of the volume header of the disk to be converted and to add sash to its volume header if it isn't there already.

  2. Make a Root filesystem on the root partition of the disk you are converting. If the disk has a separate Usr partition, make a filesystem on that partition, too. For example, to make an XFS filesystem with 4 KB block size and a 1000 block internal log (the default values), give this command:

    # mkfs /dev/dsk/dks0d2s0

    As another example, to make an EFS filesystem, give this command:

    # mkfs -t efs /dev/rdsk/dks0d2s0

    For additional instructions on making an XFS filesystem, see the sections "Planning for XFS Filesystems" and "Making an XFS Filesystem" in Chapter 4. For additional instructions on making an EFS filesystem, see the section "Making an EFS Filesystem" in Chapter 4. There is no need to mount the filesystems after making them.

  3. Insert a CD containing the IRIX release you plan to install into either your system's CD-ROM drive or a CD-ROM drive on a remote system.

  4. Shut down the system and bring up the miniroot from the CD. For instructions, see the guide IRIX Admin: Software Installation and Licensing.

  5. Switch to the Administrative Commands Menu, unmount the root and usr (if used) partitions from the old system disk, and mount the root and usr (if used) partitions of the new disk in their place. For example, if the old system disk has root and usr partitions and the new system disk has only a root partition, the commands are:

    Inst> admin

    Admin> umount /root

    Admin> umount /root/usr

    Admin> mount /dev/dsk/dks0d2s0 /root

    Admin> return

  1. Confirm that the root and usr (if used) partitions of the new system disk are mounted as /root and /root/usr (if used). This example shows the output for the example in step 11:

    Inst> sh df

    Filesystem Type blocks use avail %use Mounted on

    /dev/miniroot xfs 49000 32812 16188 67 /

    /dev/dsk/dks0d1s0 xfs 1984325 251 1984074 0 /root

    Caution: If the wrong partitions are mounted, inst installs system software onto the wrong partitions, which destroys the data on those partitions.

  2. Install system software from this CD and options and patches from other CDs as usual. Instructions are in the guide IRIX Admin: Software Installation and Licensing.

  3. Quit inst and bring the system back to IRIX (the system boots the old system disk).

  4. To test the new system disk before replacing the old system disk or moving the disk to a different system, begin by shutting down the system to the PROM Monitor.

  5. Bring up the Command Monitor by choosing the fifth item on the System Maintenance Menu.

  6. Boot the system in single user mode from the new system disk by giving the commands below. It uses controller 0 and drive address 2; substitute the values for the new system disk in the first and second positions of each of the three triples of numbers in this example.

    >> setenv initstate=s

    >> boot -f dksc(0,2,8)sash dksc(0,2,0)unix root=dks0d2s0

  7. Run MAKEDEV and autoconfig:

    # cd /dev

    # ./MAKEDEV

    # /etc/autoconfig -f

  8. Restart the system in multiuser mode by choosing Restart System from the System menu of the Toolchest or with the reboot command.
The new system disk is ready to replace the system disk on this system or another system with the same hardware configuration.



Next | Prev | Up | Top | Contents | Index