Hardware manual
"AUTOSAVE-ONCE" option was created which only does a save when time the system is shut down for the
first time (just after you install or update the setserial program).
The file most commonly used to run setserial at boot-time (in conformance with the configuration file) is now
/etc/init.d/setserial (Debian) or /etc/init.d/serial (Redhat), or etc., but it should not normally be edited. For
2.15, Redhat 6.0 just had a file /usr/doc/setserial-2.15/rc.serial which you have to move to /etc/init.d/ if you
want setserial to run at boot-time.
To disable a port, use setserial to set it to "uart none". This will not be saved. The format of
/etc/serial.conf appears to be just like that of the parameters placed after "setserial" on the command line with
one line for each port. If you don't use autosave, you may edit /etc/serial.conf manually.
In order to force the current settings set by setserial to be saved to the configuration file (serial.conf) without
shutting down, do what normally happens when you shutdown: Run the shell-script
/etc/init.d/{set}serial stop. The "stop" command will save the current configuration but the
serial ports still keep working OK.
In some cases you may wind up with both the old and new configuration methods installed but hopefully only
one of them runs at boot-time. Debian labeled obsolete files with "...pre-2.15".
IRQs
By default, both ttyS0 and ttyS2 will share IRQ 4, while ttyS1 and ttyS3 share IRQ 3. But while sharing serial
interrupts (using them in running programs) is OK for the PCI bus, it's not permitted for the ISA bus unless
you: 1. have kernel 2.2 or better, and 2. you've compiled in support for this, and 3. your serial hardware
supports it. See
Interrupt sharing and Kernels 2.2+
If you only have two serial ports, ttyS0 and ttyS1, you're still OK since IRQ sharing conflicts don't exist for
non-existent devices.
If you add a legacy internal modem (without plug-and-play) and retain ttyS0 and ttyS1, then you should
attempt to find an unused IRQ and set it in your serial port (or modem card) and then use setserial to assign it
to your device driver. If IRQ 5 is not being used for a sound card, this could be used for a modem.
Laptops: PCMCIA
If you have a Laptop, read PCMCIA-HOWTO for info on the serial configuration. For serial ports on the
motherboard, setserial is used just like it is for a desktop. But for PCMCIA cards (such as a modem) it's a
different story. The configuring of the PCMCIA system should automatically run setserial so you shouldn't
need to run it. If you do run it (by a script file or by /etc/serial.conf) it might be different and cause trouble.
The autosave feature for serial.conf shouldn't save anything for PCMCIA cards (but Debian did until 2.15-7).
Of course, it's always OK to use setserial to find out how the driver is configured for PCMCIA cards.
11.4 Stty
Serial HOWTO
Configuration method using /etc/serial.conf, etc. 47