Re: Read/Write bytes directly from hard drive

From: tom (
Date: 04/22/05

Date: Fri, 22 Apr 2005 23:12:15 +0200

asharma wrote:
> We are writing a disk partitioner from scratch. We were not sure how to
> access any byte from the disk, including the master table or any other
> data. Are there any system calls that handle read/write operations?

int fd = open("/dev/hda", O_SYNC);

Read the first x bytes and you get the partition table of your first IDE
disk. Replace x with the size of your partition table.