You can buy Sun hardware through various vendors or you may find better deals through Ebay. On Ebay, I have found both internal and external disks, and extra processor (I now have an MP Sun), and a SCSI CD ROM. Note that the 3comsat web pages can only be accessed with Internet Explorer. Netscape produces a blank page.
This section describes the steps in adding an internal or external hard drive to your system. Later sections provide more detail on the various steps.
format> verify Primary label contents: Volume name = < > ASCII name = <SUN2.1G cyl 2733 alt 2 hd 19 sec 80> pcyl = 3500 ncyl = 2733 acyl = 2 nhead = 19 nsect = 80 Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 2387 1.73GB (2388/0/0) 3629760 1 swap wu 2388 - 2722 248.63MB (335/0/0) 509200 2 backup wm 0 - 2732 1.98GB (2733/0/0) 4154160 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 stand wm 2723 - 2727 3.71MB (5/0/0) 7600 6 stand wm 2728 - 2732 3.71MB (5/0/0) 7600 7 unassigned wm 0 0 (0/0/0) 0 format> |
format> verify Primary label contents: Volume name = < > ASCII name = <SUN2.1G cyl 2733 alt 2 hd 19 sec 80> pcyl = 3500 ncyl = 2733 acyl = 2 nhead = 19 nsect = 80 Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 2732 1.98GB (2733/0/0) 4154160 1 unassigned wu 0 0 (0/0/0) 0 2 backup wm 0 - 2732 1.98GB (2733/0/0) 4154160 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 format> |
For the internal drive:
/dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /disk2 ufs 1 yes -
For the external drive:
/dev/dsk/c0t4d0s0 /dev/rdsk/c0t4d0s0 /disk2 ufs 1 yes -
Save the file and exit the editor.
Using DD and or the format command, you can damage the volume label of a hard drive. This makes the drive think it is some other kind of drive. It may also make the drive unusable. In general you should not use DD from one raw drive to another unless the drives are the same kind. It is possible to get it to work anyway although you could end up rebuilding a drive now and then.
The Sun Sparc 20 takes a special 1/2 height SCSI CD ROM drive. The internal Sun CD Roms on Ebay seem to go for a premium price. The internal connection in the Sun for the CD ROM is a standard 50 pin SCSI connector and a standard 4 pin power connection. Thus you can plug in any SCSI CD ROM and it will work. If you do manage to get a 1/2 height SCSI CD ROM for the Sun, you will need a special Sun sled which is similar to but not exactly like the sleds used to mount internal drives.
Note that the recommended SCSI ID for the CDROM is 6.
Special note: To be able to boot from a CDROM, via
"boot cdrom"
you need to have the SCSI jumpers set to the CDROM is
at SCSI address 6.
The problem with using a normal SCSI CD ROM is that after you plug it in, you cannot put the cover back on. (Anyone need a SCSI CD :-)). However, if you only use the SCSI for installing software and don't mind pulling the cover off when you want to use the CD ROM this should not be too much a problem.
Note that any 50 pin SCSI device can be connected at this point. If you put a disk drive in this location, you will want to secure it in some way so it does not bounce around. Make sure there is space for ventilation around the drive.
Another option is to get an external Sun SCSI CD ROM. These can be had on Ebay for under $40 with shipping. They usually come in a Sun type 411 external case. You will need a SCSI-2 to SCSI-2 connector and a power cord for them. The SCSI-2 connector plugs into the back of the sun and the back of the drive. The CDROM's you get in the Model 411 case tend to be the old ones which use carriers and are slow. Inside the case is a standard 50 pin SCSI connector, so you can swap the drive for a more modern SCSI drive.
Sun Internal Drives are SCSI. They have a special 80 pin connector which includes the power supply and sets the SCSI ID automatically. To be fitted properly, they have to be attached to a Sun sled. It appears that Sparc 5 and Sparc 20 take the same drives. Sparc 10's take a different type. The machine you have has one sled with it. If you want to add a second internal drive, you will have to get one with a sled or obtain the sled separately from the drive. The sled attaches to the drive with 4 phillips head screws. The Sun you bought has 1.05 GB drive with a sled. All sorts of internal drives, with and without the sleds can be found on Ebay. The sleds seem to command a premium price. If you want to add a second internal drive, you will need to get a second sled.
The internal drives sit one on top of the other in the front left corner of the computer case. The SCSI ID on the drive is automatically configured. The bottom drive is SCSI ID 3 (/dev/rdsk/c0t3d0s[0-7]) and the top drive is SCSI ID 1 (/dev/rdsk/c0t1d0s[0-7]). The machine boots from /dev/rdsk/c0t3d0s0 (partition number zero on SCSI device 3) by default.
External drives for the Sun are readily available. They connect to the Sun with a SCSI-2 to SCSI-2 cable. The Model 411 is not very expensive and often comes with a one or two GB drive. You can also find the 411 case very cheap ($10.00) with a small drives of about 200 MB. One option is to buy the case with the small drive and replace it with a standard SCSI drive. The 411 Case has a standard 50 pin SCSI connector inside and a standard 4 pin power connector.
The Model 411 case has a SCSI ID selector switch on the back which lets you select the SCSI device number. In general don't pick values 1 or 3 which are what the internal drives want to be.
Also available are the Sun Model 611 external cases. As with the Model 411 they can contain a disk drive, a CD, a tape drive, or something else. The Model 611 has a SCSI-3 connector on it. You would therefore need a SCSI-2 to SCSI-3 cable to connect it to the SCSI-2 connector on your Sparc 20. Also, Model 611, takes a Sun 80 pin drive on the inside. This is known to be true for the cases which contain hard drives. The Model 611 drives are generally newer and have bigger 4 - 9 Gig drives already in them.
If you swap out the drive inside the case with a standard SCSI 50 pin drive you will notice a difference between the drive in the case and the one you have. The SCSI selector switch goes to a 4 pin connector which attaches to the bottom of the hard drive. The 4 pins are the 3 SCSI address bits and ground. This will not fit over the normal jumpers on a SCSI drive. You have two choices. The simplest is to pick the SCSI number you want to use for the drive, set the jumpers and forget about the switch on the back of the case. Normally SCSI numbers are not changed. The alternative is to cut apart the connector and attach it to the appropriate pins on the new drive. You might have to build an extender for the cable if the pins are on the back of the drive.
One more thing. The Sun drives seem to deal with SCSI termination quite well. Some drives have a jumper which specifies that they will be the terminator drive. Some do not. You may have to set a jumper, add a SCSI terminator, or make sure the drive is not the last in the chain. You can get manuals and configuration specs for most drives from the manufactures web site.
After you add or remove hard drives or CD ROM drives, you need to tell the Sun
to rebuild the device directory. After you power on the Sun, while the memory
test is going on, press and hold the key marked "Stop" and then press the 'a'
key. This will result in an OK prompt being displayed. At the OK
prompt, type:
boot -r
If you get an second 1 GB hard drive and want to create a backup boot drive,
you can mount it and DD the boot drive over to it. For the sake of example,
we will assume you have a 1.05 GB internal Sun drive to use as the backup.
Mount it into the top drive bay this will give it SCSI ID 1. Power up and then use "Stop-a" and "boot -r"
to boot the machine. Once the machine is up, log in as root. Run the
command:
dd if=/dev/rdsk/c0t3d0s2 of=/dev/rdsk/c0t1d0s2 bs=1024k
Double check the command before you run it. This command uses 'dd' to
copy partition 2 (the backup partition) from SCSI device 3 to SCSI device 1.
The backup partition is a special partition which covers the entire drive.
If you were to 'dd' a 1.05 GB drive to a larger drive, the label gets overwritten and the drive then things it is a 1.05GB drive. Fixing the label is quite a trick but can be done. If the geometry of the two drives is radically different, the drive may begin reporting errors when you are trying to access non-existent tracks.
The mounting of hard drive partitions is controlled by the file /etc/vfstab. Here is an example:
#device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/dsk/c0t3d0s1 - - swap - no - /dev/dsk/c0t3d0s0 /dev/rdsk/c0t3d0s0 / ufs 1 no - swap - /tmp tmpfs - yes -
The above table describes how to mount file systems on the Sun. Only some of these refer to actual disks. The line starting fd describes the floppy drive which most machines don't have unless you add one. The /proc file system allows access to process memory and should not be disturbed.
The /dev/dsk/c0t3d0s1 is the swap space. Partition number 1 (s1) on the boot disk is normally the swap partition. It is not actually mounted and should also be left alone. It is treated as raw disk which is why there is no device to fsck. The last line in the file which mounts at /tmp is the file system which makes /tmp an in memory file system. If you changed this to point to a real disk partition, /tmp would be real disk and not go away when the machine is turned off.
The interesting line is the one colored in red. The entries in /dev/dsk and /dev/rdsk are both pointers to the devices with additional information in the link. The entries in these directories are created when you boot with boot -r. The c0t3d0s0 identifies the partition within the disk. The example is:
The only two numbers you will probably ever see change are the t number and the s number. That is, the SCSI number and the partition.c0t3d0s0 Controller 0 Target 3 (This is the SCSI device number) Drive 0 Slice 0 (This is the partition number)
The third parameter says where the device is mounted. In the case of the
root partition this is device /. On the machines we were delivered,
/usr was on a separate partition (#6) resulting in the line /etc/vfstab line:
/dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6 /usr ufs 1 no -
Note that in the root partition, there is an empty directory called /usr
which is what the file system is mounted over.
The forth parameter tells file system type and it is always ufs for hard drives. The fifth controls whether fsck should check the disk automatically. fsck is to UNIX as chkdsk is to DOS. It is normally 1. The 5th parameter specifies whether to mount the file system at boot. / and /usr are automatically mounted (to be able to boot) and thus you specify no to avoid an error message saying they are already booted.
The last parameter allows you to control the order partitions get mounted. (More Later)
The mounting of hard drive partitions is controlled by the file /etc/vfstab as described above. For this example assume that a second internal drive (SCSI number 1) has been installed and formatted as a single partition which is partition 0. We plan to mount this as /home. We have run the command mkdir /home to create the mount directory in the root directory. The /etc/vfstab line will read:
/dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /home ufs 1 yes -
Once the /home mount point directory is created and the /etc/vfstab line is edited in, you can either reboot or type mount /home to mount the partition.
/dev/dsk/c0t4d0s0 /dev/rdsk/c0t4d0s0 /disk2 ufs 1 no -
mount and mountall are described in the manual pages
If you want to share the drive so that other machines can access it via NFS, you use
the share command. The manual page has all the options, but the default:
share /disk2
will allow it to be mounted read/write by anybody.
share -o ro /disk2
will allow it to be mounted read only by anybody.