On Fri, 21 Dec 2001, Marcelo Chiapparini wrote:
> Hi to all!
> I am in a bit trouble. I deleted the /dev/ttyS1 file. Now I can't use the
> modem. The file exist in another machine (both of them run potato 2.2r4). How
> can I recover the file? Is a matter of copy the file to a floppy and copy back
> in the first machine?
It is not a real file, it is a device, so it cannot be copied to a disk.
You have to remake the device again.
Log in as root and go to /dev. There, run './MAKEDEV ttyS1'. This will
restore your serial port device. Alternatively, you can do it by hand. An
'ls -l /dev/ttyS*' will give you:
crw-rw---- 1 root dialout 4, 64 Jul 5 2000 /dev/ttyS0
crw-rw---- 1 root dialout 4, 66 Jul 5 2000 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Jul 5 2000 /dev/ttyS3
^ ^ ^
|character device |major and minor device number
So, it looks like /dev/ttyS1 has a minor device number of 65. By hand:
# mknod /dev/ttyS1 c 4 65
# chmod u+rw,g+rw,o-rwx /dev/ttyS1
# chown root.dialout /dev/ttyS1
NT is the OS of the future. The main engine is the 16-bit Subsystem
(also called MS-DOS Subsystem). Above that, there is the windoze 95/98
16-bit Subsystem. Anyone can see that 16+16=32, so windoze NT is a
*real* 32-bit system.
- From: Marcelo Chiapparini <email@example.com>