BIOS如何访问MBR [英] How BIOS access MBR

查看:111
本文介绍了BIOS如何访问MBR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的理解,MBR位于硬盘的第一个分区,大小为512字节。我的问题是BIOS如何在没有驱动程序的情况下访问位于硬盘上的MBR? BIOS是否从硬盘读取特定扇区,如果是,哪个中断?

解决方案

这是可能的,因为BIOS的一部分位于每个磁盘控制器的固件上,可通过标准化API访问。特别是,您可以读取任何逻辑扇区。 BIOS级API基于中断0x13:

http://en.wikipedia.org/ wiki / INT_13H [ ^ ]。



实际上,这是一个相当复杂的程序。首先,BIOS需要自动检测驱动器,查询BIOS设置数据中的引导顺序记录,选择驱动器(光驱,USB驱动器等),读取分区信息,选择分区,然后才能访问正确的扇区并尝试加载MRB,检测记录是否是有效的MRB并报告是否找不到,使用引导顺序序列中的下一个驱动器重试所有内容,重复直到成功启动失败。



另请参阅:

http://en.wikipedia。 org / wiki / Master_boot_record [ ^ ],

http://en.wikipedia.org/wiki/BIOS_Boot_partition [ ^ ]。



-SA

As per my understanding MBR is located at first partition of hard disk and of size 512 bytes. My question is how BIOS accesses the MBR located on harddisk without drivers? Does BIOS reads specific sector from hard-disk, if yes which interrupt?

解决方案

This is possible because a portion of BIOS is located on the firmware of each disk controller, accessible with standardized API. In particular, you can read any logical sector. The BIOS-level API is based on the interrupt 0x13:
http://en.wikipedia.org/wiki/INT_13H[^].

In fact, this is a pretty complex procedure. First, BIOS needs to auto-detect the drives, consult the boot order record in the BIOS setup data, for the selected drive (optical drive, USB drive, etc.), read partition information, select a partition, and only then access a correct sector and try to load the MRB, detect if the record is a valid MRB and report if it is not found, retry it all with the next drive from the boot order sequence, repeat until successful boot of failure.

See also:
http://en.wikipedia.org/wiki/Master_boot_record[^],
http://en.wikipedia.org/wiki/BIOS_Boot_partition[^].

—SA


这篇关于BIOS如何访问MBR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆