Path: utzoo!utgpu!watmath!clyde!feg From: feg@clyde.ATT.COM (Forrest Gehrke) Newsgroups: comp.sys.ibm.pc Subject: Re: Boot sector of harddisk? Keywords: where is it? Message-ID: <38656@clyde.ATT.COM> Date: 27 Dec 88 14:50:39 GMT References: <6941@xanth.cs.odu.edu> Distribution: na Organization: AT&T Bell Labs, Whippany NJ Lines: 31 In article <6941@xanth.cs.odu.edu>, kahn@xanth.cs.odu.edu (Gary I Kahn) writes: > The boot sector on a floppy disk is at head 0, track 0, sector 1. > Can someone tell me where the corresponding sector is on a hard disk? > I'm trying to locate the bytes on the disk which give information about > the number of sectors, heads, and tracks. I tried using INT 13 to read > the sector mentioned above (0/0/1), but it turned out to not be the > boot sector. The disk-editor utilities I tried use logical sector numbers, > not tracks and heads. Thanks in advance. Unlike floppy disks, the HD uses the first sector as the partition sector, and this is the sector you accessed. The last 4 paragraphs of the 512 bytes of this sector list the data of the 4 possible partitions of the HD. The bootable partition paragraph begins with hex 80 and this paragraph will have the head, cyl and sector info for the boot sector. If memory serves me, using INT 13, the boot sector is located as 0/1/0. You can identify the boot sector by looking at bytes (decimal) 4 through 11. This will give information including the msdos version number. Somewhere around the end of this sector you will see listed the two hidden file names. If you are not sure what the boot sector looks like, try this: In debug: l ds:1000 2 0 1 d ds:1000 l200 The first command loads the first relative sector of the C disk to memory starting at ds:1000 The second command reads the 512 (decimal) bytes of the boot sector. Debug can not access the partition sector. Forrest Gehrke