Date: Sat, 31 Jul 2004 21:37:15 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: freebsd-arch@FreeBSD.ORG Subject: Random-ness when booting into single-user Message-ID: <p06110426bd31f528ef8d@[128.113.24.47]>
next in thread | raw e-mail | index | archive | help
When I was at the devsummit, a few developers remarked at the
annoying situation one can get into when booting into single-
user mode. Something about various operations which can hang
because they need some random number(s), but at that point
/dev/random (or whatever the key thing is) has not been seeded
with enough entropy to give random numbers. Apparently once
you get into this state, you have to start typing a lot of
random gibberish to get past the problem. Something about
"dancing the fandango", if I remember right.
Happily I have not run into this, and I think I would like to
make sure that I don't run into it -- even though I obviously
don't remember any of the details...
I have been looking at sbin/init/init.c, and I was wondering
if it might be fairly easy to provide a fix to this situation.
Let's say you request single-user mode. If you asked for
single-user mode, init.c is what will ask you which shell you
want use.
Once it knows the shell, couldn't it just do something like
first execute:
${SHELL} -c /etc/rc.d/preseedrandom
(and ignore any failures)
And *then* execute the standard
${SHELL}
for single-user mode?
Or maybe it would execute some other script to seed the
entropy, if /etc/rc.d/preseedrandom is not appropriate under
those circumstances.
--
Garance Alistair Drosehn = gad@gilead.netel.rpi.edu
Senior Systems Programmer or gad@freebsd.org
Rensselaer Polytechnic Institute or drosih@rpi.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06110426bd31f528ef8d>
