From ArchWiki
Revision as of 09:12, 13 March 2011 by Cb474 (talk | contribs) (Example)
Jump to: navigation, search


frandom is a fast alternative to /dev/urandom. It can be used wherever fast random number generation is required, eg for randomising large hard drives prior to encryption.

From the frandom page: "The frandom suite comes as a Linux kernel module for several kernels, or a kernel patch for 2.4.22. It implements a random number generator, which is 10-50 times faster than what you get from Linux' built-in /dev/urandom."

Does frandom generate good random numbers? Refer to the frandom page for this and other technical info.


Frandom is available as a package from the AUR.

Once the daemon has been started, it is available from /dev/frandom. It is run in the normal way:

# /etc/rc.d/frandom {start|stop|restart}

Or if you prefer, it can be started at boot by adding it /etc/rc.conf:

DAEMONS=(... frandom ...)

Wiping a drive/partition

Use the following dd command. This will wipe all the data on the specified device, take care!

# dd if=/dev/frandom of=/dev/sdx1


1) On a 1.73 GHZ Thinkpad T43 with 2 GB ram:

# time dd if=/dev/frandom of=/dev/sdb2
dd: writing to `/dev/sdb2': No space left on device
587384596+0 records in
587384595+0 records out
300740912640 bytes (301 GB) copied, 12844.6 s, 23.4 MB/s
real    214m4.620s
user    3m34.693s
sys     77m28.660s

Summary: 300 GB in approx 3.5 hours

2) On a 2.4 GHZ Thinkpad T61 with 2 GB ram:

# dd if=/dev/frandom of=/dev/sdb bs=1M
dd: writing `/dev/sdb': No space left on device
476941+0 records in
476940+0 records out
500107862016 bytes (500 GB) copied, 5954.52 s, 84.0 MB/s

Summary: 500 GB in approx 1.65 hours