On Linux, you can read from a special device file /dev/sda, assuming that the hard drive you want to read is the first. You need to be root to read this file. To read sector 2, you are simply trying to compensate 2*SECTOR_SIZEand read in SECTOR_SIZEbytes.
I do not know if this device file is available in OS X. Check for interesting file names under /dev, for example, /dev/sdaor /dev/hda.
source
share