Subject: Re: The smallest multi-user system
To: NetBSD - current-users <current-users@netbsd.org>
From: Brian Rose <lists@brianrose.net>
List: netbsd-users
Date: 08/14/2003 14:58:41
Jeremy C. Reed wrote:
>
> How did you build /sbin/init? (Did you use a ramdisk-big script that set
> the LETS_GET_SMALL directive? If so, the functions to run the system
> startup script, to read the ttys(5) and to run getty are not built.)
I simply went to /usr/src/sbin/init and did a 'make clean; make'. The makefile does not seem to have the LETS_GET_SMALL defined. When I do the make I don't see it in the compiler output either.
(from 'crunchgen -m Makefile file.conf')
cc -Os -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-unin
itialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow -Werror -DMFS_DEV_IF
_NO_CONSOLE -DALTSHELL -DSECURE -c /usr/src/sbin/init/init.c
(from 'make clean; clean')
bash-2.05b# make clean; make
rm -f init.o init.ln
rm -f a.out [Ee]rrs mklog core *.core init
/usr/src/tools/obj/tools.NetBSD-1.6_STABLE-i386/bin/i386--netbsdelf-gcc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow -Werror -DMFS_DEV_IF_NO_CONSOLE -DALTSHELL -DSECURE -nostdinc -isystem /usr/include -c init.c
/usr/src/tools/obj/tools.NetBSD-1.6_STABLE-i386/bin/i386--netbsdelf-gcc -static -o init -nostdlib /usr/lib/crt0.o /usr/lib/crtbegin.o init.o -lutil -lcrypt -L/usr/lib -lgcc -lc -lgcc /usr/lib/crtend.o
>
> Also, do you have a /etc/ttys file? If the ttys(5) is empty, then (if I
> read the code correctly), it won't run a getty (because of no "session").
I did include a standard /etc/ttys file.
>
> Or another idea: If I am reading the code correctly, if dbopen can't
> create a temporary database (maybe because filesystem not writable), then
> it fails to get to the getty step. The code uses dbopen(NULL, ...). I
> don't know if this temporary database is in memory or disk.
>
Is this in init or another program?
--
Brian