Tampilkan postingan dengan label master boot record. Tampilkan semua postingan
Tampilkan postingan dengan label master boot record. Tampilkan semua postingan

Jumat, 21 Februari 2014

Membuat sebuah Bootsector

   Sektor boot pada disk selalu ada di sektor pertama pada track pertama pada kepala pertama . Ketika komputer dinyalakan ( atau reset) , BIOS dijalankan dan melakukan POST . Ini menginisialisasi semua data itu , maka mencari boot sector yang valid . Pertama terlihat di A : drive , maka terlihat C : . Jika tidak menemukannya kemudian menginterupt pada 18h disebut ( pada PC IBM original ) BASIC ROM . Sebuah boot sector yang valid ( untuk BIOS ) adalah salah satu yang bernilai 0AA55h pada offset 510 di sektor boot .

   Ketika BIOS menemukan boot sector , ia membaca bahwa sektor ( 512 byte ) dari disk dan ke memori pada 00:07 C00h . Kemudian melompat ke 0:07 C00h dan kode boot sector mendapatkan kontrol . Pada titik ini , semua yang telah diinisialisasi adalah area data BIOS ( 40h : 0 ) dan interupsi BIOS ( 10h - 1Ah ) . Pada titik ini , memori sebagian besar tidak terpakai , tapi tidak perlu dibersihkan ke 0. ( Chris Lattner )

Kamis, 20 Februari 2014

How It Works -- Master Boot Record

   This article is a disassembly of a Master Boot Record (MBR).  The MBR is the sector at cylinder 0, head 0, sector 1 of a hard disk. An MBR is created by the FDISK program.  The FDISK program of all operating systems must create a functionally similar MBR. The MBR is first of what could be many partition sectors, each one containing a four entry partition table.

   At the completion of your system's Power On Self Test (POST), INT 19 is called.  Usually INT 19 tries to read a boot sector from the first floppy drive.  If a boot sector is found on the floppy disk, the that boot sector is read into memory at location 0000:7C00 and INT 19 jumps to memory location 0000:7C00. However, if no boot sector is found on the first floppy drive, INT 19 tries to read the MBR from the first hard drive.  If an MBR is found it is read into memory at location 0000:7c00 and INT 19 jumps to memory location 0000:7c00.  The small program in the MBR will attempt to locate an active (bootable) partition in its
partition table.  If such a partition is found, the boot sector of that partition is read into memory at location 0000:7C00 and the MBR program jumps to memory location 0000:7C00.  Each operating system has its own boot sector format.  The small program in the boot sector must locate the first part of the operating system's kernel loader program (or perhaps the kernel itself or perhaps a "boot manager program") and read that into memory.

INT 19 is also called when the CTRL-ALT-DEL keys are used.  On most systems, CTRL-ALT-DEL causes an short version of the POST to be executed before INT 19 is called.