dd command

Hi
i need to write file on middle of device with dd command.
in linux , i do this :
Code:
dd if=/tmp/abc of=/dev/da0 bs=10
but in freebsd 7.2 give this error :
Code:
dd: /dev/da0: Invalid argument
 
bs is the block size. Use a multiple of 512 (512 bytes usually being the smallest physical sector size), e.g. 8192, 24m, etc. Or just remove the bs parameter altogether to use the default.
 
And if it does exist, make sure nothing is mounted from it or disable geom's anti-foot-shooting feature:

Code:
sysctl kern.geom.debugflags=16
 
When working with a block device (which /dev/da0 is), you need to use blocks. Disk blocks are 512 bytes (which is why everyone is telling you to set bs=512)
 
mmy said:
Code:
dd if=a of=/dev/da0 skip=10 count=18
0+0 records in
0+0 records out
0 bytes transferred in 0.000091 secs (0 bytes/sec)
Dont work :(
Try switching if<=>of (% dd of=a if=/dev/da0 skip=10 count=18). Does it read da0 and create a 9KB file called "a" or not?


chavez243ca said:
to see if such a device exists
If the device didn't exist he should get
Code:
dd: /dev/da0: No such file or directory
 
chavez243ca said:
actually... come to think of it, I think I've also seen some SATA drives end up as /dev/adX instead of /dev/daX

Normally SATA drives are ad4 and higher. You could get daX if you have atapicam installed.
 
Thanks a lot .
Now i can use freeBSD instead linux without any worry .
because freeBSD have great community ;)
 
Back
Top