[comp.unix.questions] H/P Unix disk problem

ucscb.fiatlux@ucbvax.Berkeley.EDU (01/30/87)

I have a friend who has an H/P 9000 series computer. He has
the 300 micro-processor with 1 meg of memory. His disk setup
consists of a 10 meg 9153a hard disc with a 9122s micro-floppy
disk drive included as one unit.

When he loads HP-UX onto the hard drive, it's done via the
micro-floppy drive. Well, since he has only a 10 meg hard
drive it limits what he utilities he can have (vi, nroff,
c compiler, the manual entries, etc).

Now, if he could use the floppy drive to mount a file system,
then he would be able to use those utilities. Right? So how do
we get access to the drive? Well, supposedly the drive is 
acessable, other wise we couldn't install the system, right?

According to the manual, we're supposed to do the following:

# mknod /dev/md9122 b 0 0x070010
# mknod /dev/rmd9122 c 4 0x070010

Which creates the special device to mount on.

Then we do:

# mount /dev/md9122 /disc

The disk drive light goes on and the disk spins for second.
Then we get this error message:  

Bad super block magic number on /dev/md9122

or something similar. The kernel is supposed to be setup to
accept a 9122s with a 9153a. When I looked in /dev after we
installed the system, the only other device other than /dev/root
(which is the hard disk) that could be used as disk device
was a device called /dev/rhd which was a character mode device.

So here's the question. How do we get the 9122s built in micro
floppy drive to work? It should be a simple matter of doing a 
mknod for the devices and a simple mount request. The manuals
provided are of dubious help and seem to only confuse us. If
you have had any experience with an H/P Unix setup similar to
this one please send a reply suggesting what to do.

This is my first post, please excuse the incoherency of it.
(we've been up all night try to get the thing to work).

fiatlux@ucscc.BITNET
fiatlux@ucscc.ucscb.uucp
fiatlux@ucscb.ucsc.edu

Bitnet or news-group posts would be best for replies as I'm not
sure what the exact path to me should be. 

Thank you,

		

			-david

Time out for a fortune: 

Barometer: An ingenious instrument which indicates what kind of weather
we are having.

stroyan@hpfcdc.UUCP (02/02/87)

  You will need to initialize a floppy and create a file system on it
before you can mount it.  Consult the manual entries for mediainit(1),
mkfs(1M), and newfs(1M).

  The software installation floppies do not have file systems on them.
Each floppy is treated as a single data file.  You will need to read
tools from the install disks and write them to mountable disks in
order to execute them from floppies.

  Be careful to unmount each disk before removing it from the drive,
so that all memory caches are copied out to disk.

Mike Stroyan, [hplabs|ihnp4]!hpfcla!stroyan

All opinions expressed above are my own, not my employer's.
Any overlap of the above with reality is a happy coincidence.

rjn@hpfcmp.UUCP (02/02/87)

re: ucscb.fiatlux@ucbvax.Berkeley.EDU

Regarding use of the HP9153A's built-in HP9122S flexible disk drive as a
mounted volume in HP-UX (rev 5.1, I presume).

> According to the manual, we're supposed to do the following:
> 
> # mknod /dev/md9122 b 0 0x070010
> # mknod /dev/rmd9122 c 4 0x070010

Looks fine.

> 
> Which creates the special device to mount on.

Actually only the block ("md") device file is necessary for mounting, but
you'll need the "raw" (character) file for what follows here.  I presume
from the minor number that the drive is on the built-in HP-IB at select code
(I/O slot address) 0x07, at bus address 0x00.  The flexible disk is indeed
unit 0x1 as long as the bus address is in the range 00-07.  The final digit
(volume number) should be 0x0 if the configuration switch on the drive is
set to 0 or 1.

> Then we do:
> 
> # mount /dev/md9122 /disk
> 
> The disk drive light goes on and the disk spins for second.

This probably means that the device file is specifying the drive correctly,
which is good news.

> Then we get this error message:  
> 
> Bad super block magic number on /dev/md9122

Well, a couple of steps appear to be missing here.  Are you trying to mount
an existing, pre-formatted flex disk or a fresh disk?  Fresh disks are
totally unformatted, which also means they have no file system data
structure on them.  (The install disks are in HP Logical Interchange Format
(LIF) and are also not mountable, with the possible exception of SYSCORE #1.)

So, you need to execute the following two procedures before the 'mount':

1. Mediainit - writes blank tracks and sectors on media, spares as req.

   # mediainit -v -f3 -i2 /dev/rmd9122

   Narrative: -v   [verbose] tells you what's happening

	      -f3  [format]  specifies 788,480 byte format: 1024 
		   bytes/sector, 5 sectors/track, 77 tracks/surface,
		   and 2 surfaces.  This gives the maximum capacity
		   possible at present on 3.5" flex disks.  See the
		   Configuration Reference Manual (98561-90020),
		   page A-257 for other formats.
    
	       -i2 [interleave] causes every other sector to be
		   sequentially numbered.  No sectors are lost, but it
		   requires two rotations to read a whole track.  If
		   you have DMA (98620B board), you might try an
		   interleave of 1.

   Mediainit only prepares the media for a file system.  HP-UX supports
   several file systems and there is an 'init' command for each.  Only HFS
   (McKusick) is mountable.  The commands for making an HFS file system are
   'newfs' and 'mkfs'.

2. newfs (or mkfs) - make file system.

   'newfs' is a friendly version of 'mkfs', but it requires an entry in file
   '/etc/disktab' that describes the geometry of the disk to be written on.
   Due to an oversight, the flexible disk entry in the 5.1 /etc/disktab
   describes only the 270 Kb format.  You will need to fire up your favorite
   editor and add the following entry to /etc/disktab (as superuser, by the
   way):

-----------cut here--------------
hp9122_F3:\
	:ty=removable:ns#5:nt#2:nc#77:\
	:pa#770:ba#8192:fa#1024:\
	:se#1024:rm#300:
-----------cut here--------------

   Now you can build the filesystem with:

   # /etc/newfs -v -n /dev/rmd9122 hp9122_F3

   Narrative: -v  [verbose] again

	      -n  [no boot area]  If you omit "-n", newfs will attempt
		  to build a boot area outside the file system.  This
		  will consume [i.e. waste] most of the space on the
		  flex disk.
  

   If you prefer not to edit /etc/disktab, you can also merely pass the disk
   description parameters as arguments to /etc/newfs or /etc/mkfs.  This is
   somewhat error-prone compared to 'newfs', so I will leave it as an
   exercise for the student :-)

Now you should be able to mount the flexible disk,  and store over 700 Kb
worth of stuff on it.

I'm sorry that this is not a simpler process and that it is not better
documented.  It is clear that we need a "cookbook" description of how to
access, initialize, build and mount flexible disks.  I will bring it to the
attention of our documentation group.

In closing, I'd like to say that although knowledgable HP people regularly
read comp.sys.hp, and generally respond to questions posted there, HP offers
software support services that can provide much faster answers than the net.
You might ask your local HP sales office about Response Center Support (RCS)
for HP-UX.

Regards,                                              Hewlett-Packard
Bob Niland                                            3404 East Harmony Road
[ihnp4|hplabs]!hpfcla!rjn                             Fort Collins CO  80525

mouse@mcgill-vision.UUCP (02/05/87)

In article <4122@brl-adm.ARPA>, ucscc!ucscb.fiatlux@ucbvax.Berkeley.EDU (David Vangerov) writes:
> [about an H/P 9000 machine with 10Mb hard disk and a floppy]

> Now, if he could use the floppy drive to mount a file system, then he
> would be able to use those utilities.

> According to the manual, we're supposed to do the following:
> # mknod /dev/md9122 b 0 0x070010
> # mknod /dev/rmd9122 c 4 0x070010
> Which creates the special device to mount on.

> Then we do:
> # mount /dev/md9122 /disc
> The disk drive light goes on and the disk spins for second.
> Then we get this error message:  
> Bad super block magic number on /dev/md9122

> So here's the question. How do we get the 9122s built in micro floppy
> drive to work?  It should be a simple matter of doing a mknod for the
> devices and a simple mount request.

I don't know HP-UX specifically, but it sounds as though you don't have
a filesystem on the floppy.  UNIX requires that you format the disk
(which I assume you have already done) *and* that you then make a
filesystem on it.  The kernel can clearly access the disk because (a)
the light goes on and it spins when you try to use it and (b) because
the bad magic number complaint means that it didn't like what it read
off the disk, which means that it did read something.

Try reading up on mkfs(8) or newfs(8), which are programs which make
filesystems on disk devices.

					der Mouse

USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!mcgill-vision!mouse
     think!mosart!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!mcgill-vision!mouse
ARPAnet: think!mosart!mcgill-vision!mouse@harvard.harvard.edu