Red Hat Bugzilla – Bug 62349
Replace with fgetty
Last modified: 2007-04-18 12:41:28 EDT
When looking at the output of 'ps axu' the reasons for a change are
| root 15469 0.0 0.0 20 20 vc/5 S 01:31 0:00 /local/sbin/fgetty vc/5
| root 15496 0.0 0.3 1440 440 vc/6 S 01:31 0:00 /sbin/mingetty vc/6
fgetty (http://www.fefe.de/fgetty/) provides similar features (expansion
of \X sequences in /etc/issue) and works perfectly with the other Red
Hat tools (e.g. /bin/login).
Therefore, you gain a significantly less memory-footprint at null
 In fact, I had to comment out '-DTEST' in the Makefile and the
final 'echo_off();' in fgetty.c
Generally, we do not want to head down the path of diet-izing the entire
Generally, this might be right.
But in the fgetty-case it is wrong... fgetty has the same behavior as mingetty,
because it IS mingetty (without stdio-stuff).
Do you see any drawbacks when using fgetty instead of mingetty?
The memory savings come from then linking against diet0libc and not just from
removing stdio, right? It does not make sense to start linking against that.
If the memory footprint can be reduced by changing how error messages are
output, please reopen again and I'll consider this for future mingetty versions.
Florian La Roche
I do not understand why linking against dietlibc does not make
sense. Linking happens static so there are no runtime-dependencies
Not using stdio saves 16KB which are 80% of the memory needed by the
diet-libc compiled fgetty:
| root 1173 0.0 0.0 20 20 vc/5 S 22:53 0:00 /sbin/fgetty vc/5
| root 1663 0.4 0.0 36 36 vc/7 S 23:41 0:00 /sbin/mingetty.diet vc/7
| root 1666 2.0 0.3 1440 440 vc/8 S 23:41 0:00 /sbin/mingetty.glibc vc/8
| root 1667 7.0 0.1 444 160 vc/9 S 23:41 0:00 /sbin/mingetty.glibcs vc/9
| $ ls -l /sbin/fgetty /sbin/mingetty.* ## files are stripped
| -rwx------ 1 root root 5908 Mar 30 04:20 /sbin/fgetty
| -rwxr-xr-x 1 root root 20172 Apr 3 23:36 /sbin/mingetty.diet
| -rwxr-xr-x 1 root root 8136 Apr 3 23:40 /sbin/mingetty.glibc
| -rwxr-xr-x 1 root root 435432 Apr 3 23:40 /sbin/mingetty.glibcs
/sbin/fgetty is fgetty-0.5 static linked with dietlibc
/sbin/mingetty.diet is mingetty-1.00-1 static linked with dietlibc
/sbin/mingetty.glibc is mingetty-1.00-1 dynamic linked with glibc
/sbin/mingetty.glibcs is mingetty-1.00-1 static linked with glibc
Compilerflags were '-Os -D_GNU_SOURCE'.
 plus '--long-hostname' patch; should be now in 0.6 also
 without the nologin-patch and with s!sys_errlist!strerror!
mingetty stays in Red Hat Linux.
Florian La Roche