From: nathan@laplace.biology.yale.edu (Nathan F. Janette)
Subject: NeXT-FAQ.disks: Questions about disk drives
Reply-To: nathan@laplace.biology.yale.edu
Organization: Yale University, Department of Computer Science, New Haven, CT
Date: Fri, 13 Nov 1992 19:57:34 GMT
Expires: Fri, 18 Dec 1992 00:00:00 GMT

NeXT-FAQ.disks: Questions about disk drives

____________________________________________________________________________

*** Subject: D1. What disk drives will work with the NeXT?

First get a copy of NextAnswers and review hardware.586

Most scsi disk drives will work with 2.0 without modifying disktab. You should
read the Network and Systems Administrator manual provided with all new
systems and available on-line on 2.0 extended.  There have been problems with
the installation of boot blocks and badly formed  fstab generated by
BuildDisk.  A disk connected to the NeXT will need to have a NeXT specific  
label
written to it before it can be properly recognized by the system.  If you get  
an
error message "Invalid Label..." this indicates that the drive was
successfully seen by the NeXT machine but it does not have the proper label, to
install a label use the /usr/etc/disk program on the raw disk device that the
system assigned to the device and use the label command to write the label onto
the disk. [how the NeXT assigns disk devices is explained in the N&SA manual] 

NeXT provides a low level disk formatter with 2.0, most drives are already
formatted at the factory.  The sdform program does not offer much flexibility.

____________________________________________________________________________

*** Subject: D2. How do I customize BuildDisk to create a bootable disk of my  
own configuration?

The BuildDisk application is extremely limited in terms of the  types of disks
configuration it knows how to build.  Essentially it "knows" about swapdisks,
optical disks, 330 and 660 MB SCSI disks. If you wish to do custom
configurations you should look at existing BLD script files in /etc/BLD.* 
There is a script which you can use to specify which BLD script you are using,
which disktab entry, and other useful parameters in /usr/etc/builddisk 

Some things to note: - the fstab installed on the target disk is specified in  
the
newclient command in the BLD script.  standard fstabs are extracted from
/usr/template/client/fstab.* - the BLD scripts do not put down a new boot
block on the scsi disk, you may want to install one by hand using the
/usr/etc/disk program. - some disks boot fine but NeXTstep comes up with a
blank window and no login window.  This is due sometimes to forgetting to
install an accessible /NextLibrary/{Fonts,Sounds}  In general you need
quite a lot of things to make a bootable disk.  

Mike Carlton adds - you can build a minimally usable bootable floppy (for crash
recovery purposes).  There is a modified version of builddisk (to make it
support building floppies, a minimal change) and a BLD script to build the boot
floppy available at cs.orst.edu in next/sources/Bootfloppy.tar.Z.  (I put
this together in response to several requests.)  A newer version of Bootfloppy
for 2.1 is on the archives as next/sources/util/Bootfloppy2.1.tar.Z  

____________________________________________________________________________

*** Subject: D3. How much disk space is lost due to formatting and file system  
overhead?

Rex Pruess (rpruess@umaxc.weeg.uiowa.edu) offers the following
explanation: Let's assume you bought a disk drive advertised with 400 MB
unformatted capacity.  Vendors are not consistent with the MB definition.  You
may have much less space less than you think you have.  Which of the following  
did
you buy?  

         400 * 1000 * 1000 = 400,000,000 bytes
         400 * 1024 * 1000 = 409,600,000 bytes
         400 * 1024 * 1024 = 419,430,400 bytes

The disk must be formatted.  This is often done by the vendor, but occasionally
by the user.  Formatting maps the disk into sectors.  Space is reserved for the
disk geometry and bad sectors.  Formatting can take 10-20% of the capacity
depending on the sector size.  Common sector sizes are 512 and 1024.   
Generally,
bigger sectors mean less waste.

Once formatted, the UNIX file system must be created.  On the NeXT, this is one  
of
the steps performed by the BuildDisk application.  It invokes the mkfs command
to make a file system.  This reserves space for the UNIX file system (e.g.,
superblocks, inode tables).  This overhead can take another 2-3% of the
available disk space. 

If you issue the df command, you may be surprised to see another 10% the
available disk space has disappeared.  The df command shows the total, used,
and available disk space.  The df units are in kbytes (1024 bytes). The sum of  
the
used and available numbers will generally be about 10% less than the total
kbytes.  This space is reserved to allow the UNIX file system to be efficient  
in
its storage allocation.  If your disk fills up, only the superuser can store
files in the remaining 10%.  

To complete the picture, here's a snapshot of what may occur:

	 Capacity     Lost/Used/Reserved    Reason
	(in bytes)       (in bytes)
        419,430,000      19,430,000         Marketing hype (~5%)
	400,000,000      60,000,000         Formatting (~15%)
	340,000,000       6,800,000         UNIX file system (~2%)
	333,200,000      33,320,000         Efficiency & superuser (~10%)
	299,880,000          -                 -

For more information, refer to the df and mkfs man pages.

____________________________________________________________________________

*** Subject: D4. Can I run my SCSI-2 disks in synchronous mode?

Quick answer is: No!  Reason is that the NeXT does not support synchronous
transfers from the SCSI bus.  It does support SCSI-2 disks running in
asynchronous mode, which all SCSI-2 disks must do.  

____________________________________________________________________________

*** Subject: D5. How do I configure my HP 660 to boot properly?

It has been reported that HP drives fail to autoboot on power on or while other
devices are on the scsi bus.  The problem seems to be with drives configured to
spin-up automatically on power on do not get recognized at boot time.  To  
remedy
this problem reliably with HP 660Mb (HP97548) and 1Gbyte (HP 97549) drives
remove the auto spinup jumper on the back of the drive.  Looking at the disk  
from
the back with the power connector on the lower left, it is the sixth jumper.  

____________________________________________________________________________

*** Subject: D6. What is the procedure for installing a Fujitsu M2263SA/SB SCSI  
Disk as the NeXT Boot Disk?

See Izumi Ohzawa's note in /pub/next/docs/fujitsu.recipe available via
anonymous ftp from sonata.cc.purdue.edu.  

____________________________________________________________________________

*** Subject: D7. How do mount a corrupted OD that won't automount?

If you can't automount an OD, and you can't fix it, you can still manually  
mount
it.  Log in as root.  Type "/usr/etc/mount /dev/od0a /FoO".  It will ask you to
insert the disk.  Insert it.  It is mounted.

This method WILL mount a corrupted OD so you can read its contents.  Since  it  
is
corrupted, it is not recommended to write to it.  You should copy the   
important
files to something else, then reformat it. 


____________________________________________________________________________

NeXT-FAQ Editor:
Nathan Janette nathan@laplace.csb.yale.edu


--
Nathan Janette		"I'm a NeXTstep man,
Dept MB&B, Yale Univ	 I'm a NeXTcube guy"
New Haven, CT
nathan@laplace.biology.yale.edu (NeXT)

Newsgroups: comp.sys.next.announce