H/P Unix disk problem
rjn at hpfcmp.UUCP
rjn at hpfcmp.UUCP
Mon Feb 2 17:22:45 AEST 1987
re: ucscb.fiatlux at 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
More information about the Comp.unix.questions
mailing list