Under Linux, you simply use read (2) and write (2) to the block device (/dev/hda, /dev/hda1, etc.). It is up to you the programmer to ensure that reads and writes start and stop on a block boundary (use fdisk to determine the block size, or find the code in fdisk that does that and incorporate it in your program). That is all dd does (and you have to tell it the block size).
The Slackware distribution used to come with a utility called rawrite.exe which was a dd replacement for Windows, for writing boot floppies. It's written in Pascal. You can get it off an old Slackware ISO, e.g. ftp://ftp.encntc.edu.tw/Li
Main Topics
Browse All Topics





by: darrickhartmanPosted on 2009-09-05 at 11:20:04ID: 25267201
You might look at 'dd' it allows you to do block by block transfers specifying various options.
/dd
http://linux.die.net/man/1