Any doc reference on /entropy file ?

2008-12-16 Thread Bernard Dugas

Hi,

When i look at / in a standard installation like :
FreeBSD XXX 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 
2008 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386


There is only 1 file, named entropy :

-rw---   1 root  wheel  4096 Dec 11 17:36 entropy

I can't find any reference to that file in FreeBSD doc.

Any reference to it ? What is it used for ? I have look in RANDOM area, 
but no reference...


Do i have to keep it read/write ? Can i put it in /var instead of / to 
be able to keep / read-only ?


Thanks a lot,
Best regards,



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread Daniel Bye
On Tue, Dec 16, 2008 at 02:08:10PM +0100, Bernard Dugas wrote:
 Hi,
 
 When i look at / in a standard installation like :
 FreeBSD XXX 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 
 2008 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
 
 There is only 1 file, named entropy :
 
 -rw---   1 root  wheel  4096 Dec 11 17:36 entropy
 
 I can't find any reference to that file in FreeBSD doc.
 
 Any reference to it ? What is it used for ? I have look in RANDOM area, 
 but no reference...
 
 Do i have to keep it read/write ? Can i put it in /var instead of / to 
 be able to keep / read-only ?

It is used to safely seed the random number generator, I believe.

A quick search through /etc/rc.d/* and /etc/defaults/rc.conf reveals
that you can set $entropy_file in /etc/rc.conf to anything you like, 
although a comment suggests

  # Set to NO to disable caching entropy through reboots.
  # /var/db/entropy-file is preferred if / is not avail.

So yes, it seems you could move it off / if you want.

Dan

-- 
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpzUNzpkVMxg.pgp
Description: PGP signature


Re: Any doc reference on /entropy file ?

2008-12-16 Thread Bernard Dugas

Wojciech Puchar wrote:

-rw---   1 root  wheel  4096 Dec 11 17:36 entropy

I can't find any reference to that file in FreeBSD doc.
Any reference to it ? What is it used for ? I have look in RANDOM 
area, but no reference...


at startup it seeds random generator, every 11 minutes and at shutdown 
it's saved from random generator.


it's here to make random generator more random - not starting clean at 
boot.


Thanks a lot !

1- How may i suggest/learn to add this info in the random generator man 
page, so that a search in doc gives the right result ?


2- As / will be mounted read-only, how can i tell the ramdom generator 
to put this /entropy file somewhere in /var, where i think it should be 
? Or is there any tricky hidden problem ?


Thanks a lot,
Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread RW
On Tue, 16 Dec 2008 16:07:48 +0100 (CET)
Wojciech Puchar woj...@wojtek.tensor.gdynia.pl wrote:

 at startup it seeds random generator, every 11 minutes and at
 shutdown it's saved from random generator.

Only at shutdown, the entropy stored every eleven minutes is
in  /var/db/entropy/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread Wojciech Puchar

boot.


Thanks a lot !

1- How may i suggest/learn to add this info in the random generator man page, 
so that a search in doc gives the right result ?


use sent-pr




2- As / will be mounted read-only, how can i tell the ramdom generator to put 
this /entropy file somewhere in /var, where i think it should be ? Or is 
there any tricky hidden problem ?


man rc.conf

seek entropy_file and entropy_dir
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread Wojciech Puchar

shutdown it's saved from random generator.


Only at shutdown, the entropy stored every eleven minutes is
in  /var/db/entropy/


thanks for correction.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread RW
On Tue, 16 Dec 2008 16:23:05 +0100
Bernard Dugas bern...@dugas-family.org wrote:


 2- As / will be mounted read-only, how can i tell the ramdom
 generator to put this /entropy file somewhere in /var, where i think
 it should be ? Or is there any tricky hidden problem ?

It has to be on the root partition as it's used in the early stage of
the boot before any other partitions are mounted, but like like I said
there are other entropy files that are applied a little later as a
boot, and on most machines enough entropy will be generated from
the disk interrupts to suffice anyway.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread RW
On Tue, 16 Dec 2008 14:08:10 +0100
Bernard Dugas bern...@dugas-family.org wrote:

 Hi,
 
 When i look at / in a standard installation like :
 FreeBSD XXX 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52
 UTC 2008 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
 i386
 
 There is only 1 file, named entropy :
 
 -rw---   1 root  wheel  4096 Dec 11 17:36 entropy
 
 I can't find any reference to that file in FreeBSD doc.
 

It contains random numbers that are written-out at shutdown and used to
seed /dev/random on the next boot.

 
 Do i have to keep it read/write ? Can i put it in /var instead of /
 to be able to keep / read-only ?

It has to be on the root-partition, if it's going to be used. 

You can set entropy_file=NO if you don't want it. There are additional
entropy files under /var, and the system generates it's own entropy
during the boot stage, which is good enough for normal cases.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread Wojciech Puchar


-rw---   1 root  wheel  4096 Dec 11 17:36 entropy

I can't find any reference to that file in FreeBSD doc.

Any reference to it ? What is it used for ? I have look in RANDOM area, but 
no reference...


at startup it seeds random generator, every 11 minutes and at shutdown 
it's saved from random generator.


it's here to make random generator more random - not starting clean at 
boot.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread Bernard Dugas

Wojciech Puchar wrote:
2- As / will be mounted read-only, how can i tell the ramdom generator 
to put this /entropy file somewhere in /var, where i think it should 
be ? Or is there any tricky hidden problem ?


man rc.conf  seek entropy_file and entropy_dir


Thanks, detail is available in /etc/default/rc.conf :

entropy_file=/entropy # Set to NO to disable caching entropy through 
reboots.
# /var/db/entropy-file is preferred if / is not 
avail.


It means that i can put it in /var when L is read-only. There should be 
no problem as the file is choosen in rc.conf, so after /var is mounted.


As this is for diskless station, it would be fun to change the entropy 
file through the nfs server RANDOM, even better thant at each boot :-)


Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread Bernard Dugas
Thank you RW, i am new on the list, i didn't answer you because i didn't 
received your answer while i received others, don't know why yet.


I would be very interested to find a large but right view in the man 
documentation of what is happening exactly to this poor lost file :-)


The etc/default/rc.conf detailled file is not searchable in the man 
page, nor the default /entropy file.


Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any doc reference on /entropy file ?

2008-12-16 Thread RW
On Tue, 16 Dec 2008 21:39:56 +0100
Bernard Dugas bern...@dugas-family.org wrote:

 Wojciech Puchar wrote:
  2- As / will be mounted read-only, how can i tell the ramdom
  generator to put this /entropy file somewhere in /var, where i
  think it should be ? Or is there any tricky hidden problem ?
  
  man rc.conf  seek entropy_file and entropy_dir
 
 Thanks, detail is available in /etc/default/rc.conf :
 
 entropy_file=/entropy # Set to NO to disable caching entropy
 through reboots.
  # /var/db/entropy-file is preferred if / is
 not avail.
 
 It means that i can put it in /var when L is read-only. There should
 be no problem as the file is choosen in rc.conf, so after /var is
 mounted.

Whatever it says in /etc/default/rc.conf, /entropy is read before /var
is mounted.  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org