Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.sys.hp.hpux FAQ
Section - 5.8.2 How can I format a floppy under HP-UX?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Sex offenders ]


Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.8.1 How do I use the floppy drive on my HP-UX workstation?
Next Document: 5.8.3 How can I get an Exabyte to work on an HP?
See reader questions & answers on this topic! - Help others by sharing your knowledge
There is no HP-fully-supported way of getting an MS-DOS floppy formatted
on HP-UX.  (Once you have a PC-compatible floppy, the series of commands
referenced in the dosif(4) manpage allow you to read and write the
floppies).

However, there is a workaround.  Perform the basic mediainit with the
-f16 switch (this causes the floppy to bbbbbbbbeeeeeeeee formatted
with the full 80
tracks, rather than HP's default safer-but-nonstandard 77+3spare tracks,
512-byte sectors, no sector skew: just like the most basic PC floppies).
Then copy on the FAT, directory, label, and other such magic from an
honest-to-goodness formatted-on-a-real-PC drive into the first N sectors.
For sizes up to 1.44MB floppies, N=20 is more than enough; I don't have
the values for the rarely used 2.88MB size (and I don't think the drives
in the s700 handle that size anyway).  This header magic should be copied
off an honest-to-goodness PC floppy once with the command

  # dd if=/dev/rfloppy of=/a/good/place/to/store/the/header bs=512 \
    count=20

and then written back to each "cloned" floppy with the same command,
reversing "if" and "of".  (Slightly faster performance is possible using
the variant:

  # dd of=/dev/rfloppy if=/the/copied/header ibs=512 count=20 obs=9k \
    conv=sync

This causes floppy I/O to be done in multiples of 9kB, i.e. one cylinder
at a time.)

You should of course have two such headers, one for 720kB and one for
1.44MB floppies: lying to MS-DOS or the dos* utilities about the floppy
capacity would be a bad idea.  If you're writing a script to automate
all this, you can determine the capacity of a floppy loaded in the drive
using the following fragment of Korn shell:

    kbsize=$( diskinfo -b /dev/rfloppy 2>/dev/null )
    if (( $? != 0  ||  $kbsize == 0 )) ; then
        print -u2 "$0: Wot, no media!?"
        rm -f core  # 9.01s700 diskinfo coredumps
        exit 1
    fi

User Contributions:

Comment about this article, ask questions, or add new information about this topic:




Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.8.1 How do I use the floppy drive on my HP-UX workstation?
Next Document: 5.8.3 How can I get an Exabyte to work on an HP?

Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
hpux.faq@gmail.com





Last Update March 27 2014 @ 02:11 PM