东北大学bootblock.docVIP

  • 6
  • 0
  • 约2.39万字
  • 约 12页
  • 2017-11-10 发布于江苏
  • 举报
东北大学bootblock

2000?? !?? Bootblock 1.4 - Minix boot block.?? Author: Kees J. Bot 2001?? !?? 21 Dec 1991 2002?? ! 2003?? ! When the PC is powered on, it will try to read the first sector of floppy 2004?? ! disk 0 at address 0x7C00.? If this fails due to the absence of flexible 2005?? ! magnetic media, it will read the master boot record from the first sector 2006?? ! of the hard disk.? This sector not only contains executable code, but also 2007?? ! the partition table of the hard disk.? When executed, it will select the 2008?? ! active partition and load the first sector of that at address 0x7C00. 2009?? ! This file contains the code that is eventually read from either the floppy 2010?? ! disk, or the hard disk partition.? It is just smart enough to load the 2011?? ! secondary boot code from the boot device into memory at address 0x10000 and 2012?? ! execute that.? The disk addresses for this secondary boot code are patched 2013?? ! into this code by installboot as 24-bit sector numbers and 8-bit sector 2014?? ! counts above enddata upwards.? The secondary boot code is in turn smart 2015?? ! enough to load the different parts of the Minix kernel into memory and 2016?? ! execute them to finally get Minix started. 当PC加电后,PC试图读软盘0的第一扇区到0x7C00。如果因为没有可用的磁介子而失败,则它试图读从硬盘的第一个扇区读主引导记录(master boot record),该扇区不仅包含可执行代码,也包含硬盘的分区表(DPT,partition table)。当他执行时,他将选择活动分区并他的第一个扇区到0x7C00。 本文件包含最终从软盘或从硬盘分区读出的代码,它将从引导设备上加载次级引导代码到内存地址0x10000处,并执行他。次级引导代码在磁盘上的地址是由installboot将24位的扇区号和8位的扇区数(above enddata upwards)。次级引导代码也足够聪明,能够将MINIX内核的不同部分加载到内存,并执行他们直到最后使Minix启动。 2017 ??! Its also important to know that dl contains the drive that was booted (in other words, the drive from which this code originated).? This is 0x00 or 0x01 for the first or second floppy drives or 0x80, 0x81, 0x82, or 0x83 for the first through fourth hard drives. If this code originated from a hard drive and the master boot code loaded this code, then the partition table entry that corresponds to the booted partition

文档评论(0)

1亿VIP精品文档

相关文档