# [SOLVED] localhost agetty[19060]: /dev/ttyS0: No such file

## ycUygB1

So every ten seconds I am getting the above message in my system log.  Every six or seven minutes, I also get

```
localhost init: Id "s0" respawning too fast: disabled for 5 minutes
```

In order to solve the second problem, I commented out these two lines in /etc/inittab

```
# SERIAL CONSOLES

#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100

#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100

```

But this now has probably caused the first message.  Any ideas?  The system is a Raspberry Pi.  Just for good form, here is my emerge --info.

```
Portage 2.2.3 (default/linux/arm/13.0/armv6j, gcc-4.6.3, glibc-2.15-r3, 3.6.11+ armv6l)

=================================================================

System uname: Linux-3.6.11+-armv6l-ARMv6-compatible_processor_rev_7_-v6l-with-gentoo-2.2

KiB Mem:      448776 total,    145664 free

KiB Swap:          0 total,         0 free

Timestamp of tree: Thu, 12 Sep 2013 10:30:01 +0000

ld GNU ld (GNU Binutils) 2.23.1

ccache version 3.1.9 [enabled]

app-shells/bash:          4.2_p45

dev-lang/python:          2.7.5, 3.2.5-r1

dev-util/ccache:          3.1.9

dev-util/pkgconfig:       0.28

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.11.8

sys-apps/sandbox:         2.6-r1

sys-devel/autoconf:       2.69

sys-devel/automake:       1.12.6

sys-devel/binutils:       2.23.1

sys-devel/gcc:            4.6.3

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r4

sys-kernel/linux-headers: 3.7 (virtual/os-headers)

sys-libs/glibc:           2.15-r3

Repositories: gentoo

ACCEPT_KEYWORDS="arm ~arm"

ACCEPT_LICENSE="* -@EULA"

CBUILD="armv6j-hardfloat-linux-gnueabi"

CFLAGS="-Ofast  -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"

CHOST="armv6j-hardfloat-linux-gnueabi"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-Ofast  -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe -march=armv6j"

FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"

FFLAGS="-O2 -pipe -march=armv6j"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

USE="acl arm berkdb bindist bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 modules mudflap ncurses nls nptl openmp pam pcre readline session ssl tcpd unicode zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

```

Last edited by ycUygB1 on Thu Sep 12, 2013 5:17 pm; edited 1 time in total

----------

## eccerr0r

If you have udev running and working, then this means you don't have a serial port or the improper driver was installed. 

Commenting those lines out should have solved the problem, did you reboot or kill -1 1 to reload inittab?

----------

## ycUygB1

I certainly did not send SIGHUP to process #1.  I would have been too scared to do that.  However, with your encouragement, I have done that now, and it has stopped the messages.  

While I have you here, I'd like to point out that the timestamps in the system log are a bit bizarre.  I am in London, which is on British Summer Time now.  BST is one hour ahead of UTC. The time is 6 PM now, and the timestamps are for the most part correct.  But the timestamps for the respawning messages are in UTC.  Why would that be?

```
Sep 12 18:00:06 localhost agetty[20401]: /dev/ttyS0: No such file or directory

Sep 12 18:00:16 localhost agetty[20402]: /dev/ttyS0: No such file or directory

Sep 12 18:00:26 localhost agetty[20405]: /dev/ttyS0: No such file or directory

Sep 12 18:00:36 localhost agetty[20408]: /dev/ttyS0: No such file or directory

Sep 12 17:00:46 localhost init: Id "s0" respawning too fast: disabled for 5 minutes
```

----------

## Atom2

 *hnaparst wrote:*   

> I certainly did not send SIGHUP to process #1.  I would have been too scared to do that.

 

In which case you simply might have used

```
init q
```

----------

## ycUygB1

Thanks.  It is really more important to learn than to fix, so your comment is appreciated.  I find that SIGHUP is often used to reload a config file without killing the process.  Although this depends on the program.  Without going through each program, it would be hard to know if SIGHUP (hangup) would have the desired effect.  The name "hangup" is certainly a misnomer in these cases, and that is what scared me off.  Who would want to hangup on the init process?

In the old days, if you wanted to kill something, you were supposed to start gently, with SIGHUP, and then if that didn't work, move on to kill -9, but only as a last resort.   Apparently, things have changed.

----------

## eccerr0r

It actually is kind of weird, I don't know since when un*x used a sighup to init to reread inittab, it's been like that since antiquity, my Xenix machine used this as well.  I suppose people don't know about it unless they're a sysadmin of sorts...

----------

## Atom2

It's actually not that weird. Quiet a number of unix/linux daemons use SIGHUP to re-read their configuration files. A few that immediately come to mind include

· sshd

· inetd

· xinetd

· squid

· bind

· smbd

If I remember correctly, noteable exceptions to this not too uncommon behaviour of re-eading their configuration files upon receipt of SIGHUP are

· dhcpd

· ntpd

· nmbd (which upon receipt of SIGHUP dumps debug information to a file)

I am sure either list can easily be expanded ...

----------

## eccerr0r

It is weird because one would think you should use like signal 10 (SIGUSR1) or something to reload config.  But this has historically been this way.  Init has been around a lot longer than any of those servers - sshd, *inetd, squid, bind, samba... they probably copied init's behavior.

I forget which of the signals were the original but I have a feeling most of them are "new" as newer un*x come along.  It almost seems signal 28 (SIGWINCH) would be somewhat appropriate but I'm sure this came a lot later, after X11 was created.

But alas, I think signal 1 (SIGHUP) was chosen not because it was hanging up - you can't hang up init - it was chosen because...

it was easy to remember (and about the only thing you need to tell init was to reload pretty much...)?

----------

