title: Direct access to hard disk with no FS from C program on Linux
body: <p>I want to access the whole hard disk directly from a C program. There's no FS on it and never's gonna be one.  </p>
  
  <p>I just want to open /dev/sda (for example) and do I/O at the block/sector level of the disk.  </p>
  
  <p>I'm planning to write some programs for learning C programming in the Linux environment (I know C language, Python, Perl and Java) but lack confidence with the Linux environment.</p>
  
  <p>For my learning purposes I'm thinking about playing with kyoto-cabinet and saving the value corresponding to the computed hash directly into a "block/sector" of the hard disk, recording the pair: "hash, block/sector reference" into a kyoto-cabinet hash database file.</p>
  
  <p>I don't know if this is feasible using standard C I/O functions or otherwise I'd have to write a "device driver" or something like...</p>