Reading a sector on the boot disk
This is a continuation of my question about reading the superblock . Let's say I want to target the HFS+ file system in Mac OS X. How could I read sector 2 of the boot disk? As far as I know Unix only provides system calls to read from files, which are never stored at that location. Does this require either 1) the program to run kernel mode, or 2) the program to be written in Assembly? I would prefer to avoid either of these restrictions, particularly the latter. In Linux, you can read from the special device file /dev/sda , assuming the hard drive you want to read is the first one. You need