iheitla@cs.vu.nl (Ilja Heitlager) (04/09/91)
First a tested the port as described in (>>>>the very clear<<<< hmmmm) sysadmin
manual.
I found out that the standerd printer port was attached to /dev/lp1, and so
while assuming that /dev/lp was a link to /dev/lp0, I linked /dev/lp to /dev/lp1Then /dev/lp /dev/lp0 /dev/lp1 all three had 3 links. So (>>> very stupid, this is not very joung readers <<<) I did "rm /dev/lp /dev/lp0" and lost my printer
device.
So how can I get it back????
hwconfig gives:
name=parallel base=0x3BC offset=0x2 vec=07 dma=- unit=1
>>> Missing base/finish address in hex format 0x????
while typing "date > /dev/lp1" answers:
/dev/lp1: cannot create.
again what should I do to get it back?
Ilja,
====================================================
Ilja Heitlager |
Vrije Universiteit | E-Mail <iheitla@cs.vu.nl>
Amsterdam |
The NetherLands. |
=====================================================
jbayer@ispi.COM (Jonathan Bayer) (04/12/91)
iheitla@cs.vu.nl (Ilja Heitlager) writes: >First a tested the port as described in (>>>>the very clear<<<< hmmmm) sysadmin >manual. >I found out that the standerd printer port was attached to /dev/lp1, and so >while assuming that /dev/lp was a link to /dev/lp0, I linked /dev/lp to /dev/lp1Then /dev/lp /dev/lp0 /dev/lp1 all three had 3 links. So (>>> very stupid, this is not very joung readers <<<) I did "rm /dev/lp /dev/lp0" and lost my printer >device. >So how can I get it back???? >hwconfig gives: > name=parallel base=0x3BC offset=0x2 vec=07 dma=- unit=1 > >>> Missing base/finish address in hex format 0x???? >while typing "date > /dev/lp1" answers: > /dev/lp1: cannot create. >again what should I do to get it back? Type the following command: l /dev/lp* you should get a line (or more than one line) looking something like: c-w--w--w- 2 bin bin 6, 0 Sep 21 1990 /dev/lp The important number is: --->---> ^^^ This is the Major Device Number. If you don't have any printer devices left then type: grep lp0 /etc/perms/* and you should get the following line: /etc/perms/inst:RTS c222 bin/bin 1 ./dev/lp0 6/0 The Major Device Number is: --------->--------->-------->---->---> ^^ To recreate your printer ports type the following, replacing the question mark with the Major Device Number from above. mknod /dev/lp c ? 0 mknod /dev/lp1 c ? 1 mknod /dev/lp2 c ? 2 ln /dev/lp /dev/lp0 Good Luck. JB -- Jonathan Bayer Intelligent Software Products, Inc. (201) 245-5922 500 Oakwood Ave. jbayer@ispi.COM Roselle Park, NJ 07204
paulz (W. Paul Zola) (04/15/91)
In article <4784@gumby.Altos.COM> iheitla@cs.vu.nl (Ilja Heitlager) writes: [ problems that occured from doing 'rm /dev/lp1' deleted] } }what should I do to get it back? } The following article from the SCO Information Tools database should help with your problem. I'm posting because I think this may be of general interest. ################## cut here ################ cut here ################## How do I restore the special files in /dev? KEYWORDS: crash restore dev device special files mknod fixperm xenix RELEASE: SCO XENIX System V Operating System Generic HARDWARE: all hardware configurations PROBLEM: I have accidentally removed some or all of my /dev files and I don't know how to restore them. CAUSE: The files in /dev are special device files. Sysadmin (which uses the backup command) and cpio will back up these files, but tar will not. These files also are not on your original distribution. SOLUTION: A single device special file can be created with the mknod command. However, to restore large numbers of special files with mknod would be inefficient. The fixperm command can be used to restore some or all of your dev files. 1. To restore all of your /dev files if you have no third party device drivers installed, use the following command (If you want to restore some of your /dev files, or if you have third party vendors, skip to #2.): fixperm -dRTS -dSER1 -dSER2 -dSER3 -dSER4 -dFD48 -dFD96 -dHD1 -dLPR -c -s /etc/perms/inst If you are running SCO XENIX Release 2.3, use the command: fixperm -dRTS -dSER1 -dSER2 -dSER3 -dSER4 -dFD48 -dFD96 -dHD1 -dLPR -c -s /etc/perms/inst /usr/lib/mkdev/perms/* Yes, that is all one command and will wrap around to the next line. 2. To restore specific /dev files, you will need to know what package they are in. In the above command, all the upper case names following a '-d' are package names. The names of the files in each package are recorded in the perms files in the /etc/perms directory. With the following command, you can make a file named whatever you want, for example, devpacks which you can look at to find out which packages the files you want to restore are in: grep /dev/ /etc/perms/* > devpacks Then give the same fixperm command as above except only specify the packages you want to restore. You may notice that several files such as /dev/tty1a are in more than one package. When restoring, specifying either package name would be fine. For example, to restore the files /dev/tty1a, /dev/lp0 and /dev/lp1 you could give either one of the following two commands: fixperm -dSER1 -dLPR -c -s /etc/perms/inst --OR-- fixperm -dRTS -dLPR -c -s /etc/perms/inst ################## cut here ################ cut here ################## I hope this helps you with your problem. Followups to: comp.unix.xenix.sco - Paul Zola Software Support Engineer paulz@sco.COM Gotta tend the earth if you want a rose. - Emily Saliers DISCLAIMER: I speak for myself, and not for SCO.