HP-UX 10.20 devices

Is it possible to create the CDROM device file for a drive attached to the parallel port? I have a removable CDROM drive (gift - I'm trying not to return it, but may have to anyways) that attaches via parallel port. The only device that I can attach to that hardware address is /dev/c1t0d0_lp, a printer device. I may be going about this all wrong, since I'm very new with HP-UX / hp9000's, but I can't seem to get the major/minor/driver/etc. correct...

Also, I think I already know the answer to this, but is it possible to create /dev/zero and /dev/(u)random on an HP-UX system? I didn't see anything in Sam's kernel config, so I doubt it, but it's worth a try, I suppose...

Please help us.

I think what you are asking for is not possible for HP UX platform. I am not sure, but I don't think there are drivers built in the O/S for what you are wanting. We have 10 HP UX-9000 series K and M and L class servers, and they all have built in CD-ROM drives that are attached via SCSI controller.

Yeah, I thought not... After all, would we really want PC hardware on a specialized Unix workstation? Heck, we might as well just use peecees for everything in that case.

I was able to find a device driver for Linux systems, however, and that will do just fine.

Thanks for the reply.

One part of your question is easy... I just made a /dev/zero on an HP-UX 10.20 box:

cd /dev
mknod zero c 3 3
chmod 444 zero

Ah ha!
Right on...

It might seem silly to some, but I missed /dev/zero...

Thanks perderabo!

Since yall brought this up, I have a question.

What is the difference between. These two commands

1) cat /dev/null > somefile

2) cat /dev/zero > somefile

3) > somefile

Zeroing out a file.

I know that "dd can be used to create a file of X bytes for testing and to "hold" space in a filesytem and for doing "disk dumps" an d for destroying data on a disk ( not the prescribed method).

I think I know another reason for /dev/zero. That would be to zero out a disk for reuse.

Any insight would be informative.

:smiley: :cool:

Null is "Nothing"

Zero is actually a device....

On HP-UX 10.20, both /dev/zero and /dev/null have the same major number. That means that the same exact driver is invoked when either file is opened. That driver will look at the minor number which is how it know to behave differently. This driver is a psuedo-driver since it controls no hardware.

A read to /dev/null returns end of file.

A read to /dev/zero succeeds and returns all zeroes.

A simple way of looking at it is to say:

cat /dev/null > my_file
will make my_file zero-length, whereas

cat /dev/zero > my_file
will fill the file with NULL characters...

$ dd if=/dev/zero of=/my/home/test_file bs=1 count=10
$ xd test_file
0000000 0000 0000 0000 0000 0000
000000a
$

Be carefull not to "cat" zero zero to anywhere, lest your filesystem fill up relatively quickly...