Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24486 - dd if=/dev/urandom of=x bs=1M count=10 creates a random size file
Summary: dd if=/dev/urandom of=x bs=1M count=10 creates a random size file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
: 28034 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-14 15:51 UTC by Keith Hudson
Modified: 2003-09-06 23:05 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Hudson 2003-07-14 15:51:55 UTC
dd if/dev/urandom of=x bs=1M count=10 should create file x which is 10M in size.
It creates files of all diffrent sizes.  /dev/zero works fine though

Reproducible: Always
Steps to Reproduce:
1.dd if=/dev/urandom of=x bs=1M count=10
2.x will be anything but 10M in size
3.

Actual Results:  
dd if=/dev/urandom of=x bs=1M count=10
1+9 records in
1+9 records out
keith@localhost beer $ ls -l
total 2988
-rw-r--r--    1 keith    parent    3052986 Jul 14 17:47 x


Expected Results:  
dd if=/dev/urandom of=x bs=1M count=10
10+0 records in
10+0 records out
ls -l
total 10256
-rw-r--r--    1 keith    parent   10485760 Jul 14 17:49 x
Comment 1 Lisa Seelye (RETIRED) gentoo-dev 2003-07-14 20:37:19 UTC
Do you have enough entropy built up for /dev/urandom?

This works for me:
lisa@lisa distcc $ dd if=/dev/urandom of=x bs=1M count=10
10+0 records in
10+0 records out
lisa@lisa distcc $ ls -lh
-rw-r--r--    1 lisa     wheel         10M Jul 14 23:35 x
..
-rw-r--r--    1 lisa     wheel    10485760 Jul 14 23:35 x
Comment 2 Keith Hudson 2003-07-14 20:56:21 UTC
System build date was june 6th.  Workstation is used daily. So yes I should.
Comment 3 Jay Pfeifer (RETIRED) gentoo-dev 2003-07-14 23:16:20 UTC
this is fixed in pfeifer-sources-2.4.21_pre4. it is a lowlatency bug in random.c 
 
Jay 
Comment 4 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-06 23:05:22 UTC
*** Bug 28034 has been marked as a duplicate of this bug. ***