[译]从CD/DVD提取启动映像(El Torito)
By robot-v1.0
本文链接 https://www.kyfws.com/applications/extracting-the-boot-image-from-a-cd-dvd-el-torito-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 5 分钟阅读 - 2248 个词 阅读量 0[译]从CD/DVD提取启动映像(El Torito)
原文地址:https://www.codeproject.com/Articles/11210/Extracting-the-boot-image-from-a-CD-DVD-El-Torito
原文作者:Jochen Kalmbach [MVP VC++]
译文由本站 robot-v1.0 翻译
前言
This article explains a simple way to extract the boot-image from a CD/DVD (El Torito). It just uses CreateFile and ReadFile… no mystery about APSI-programming.
本文介绍了一种从CD/DVD(El Torito)中提取启动映像的简单方法.它只使用CreateFile和ReadFile …关于APSI编程的任何信息.
介绍(Introduction)
如果您需要从CD/DVD(El Torito)中提取启动映像,则只需使用此程序即可.它仅使用Win32调用,例如(If you need to extract a boot-image from a CD/DVD (El Torito) you can simply use this program. It only uses Win32-calls like) CreateFile
和(and) ReadFile
.没有使用(. There is no usage of)ASPI(ASPI)-界面或其他本地内容.(-interface or other native stuff.)
背景(Background)
要访问(*To access the*)*生的(*raw*)*CD/DVD映像,您只需使用(CD/DVD image, you can simply use the*) CreateFile
API,并将驱动器号指定为文件名.这将打开可访问扇区的驱动器.现在,您可以读取本机映像,如果您读取了启动映像,则还可以提取启动映像.(API and specify the drive-letter as filename. This opens the drive with access to the sectors. Now, you can read the native image and also extract the boot-image if you read the*) “El Torito” Bootable CD-ROM Format Specification)" El Torito"可启动CD-ROM格式规范( .(.)
使用应用程序(Using the application)
该程序的用法很简单.您只需要将CD-ROM/DVD的驱动器号传递给程序.或者,您可以将文件名传递给ISO映像.如果您的CD-ROM/DVD驱动器是(The usage of the program is simple. You only need to pass the drive-letter of the CD-ROM/DVD to the program. Alternatively, you can pass a filename to an ISO-image. Here is an example of the usage, if your CD-ROM/DVD-drive is)*F:(F:)*然后:(then:)
BootExtract f:
这会将启动映像存储在当前目录中,名称为(This will store the boot-image in the current directory with the name)Drive-f.NoEmulation__Segment-0000__SecCount-4.bin(Drive-f.NoEmulation__Segment-0000__SecCount-4.bin).文件名始终包含以下元素(可使用诸如Nero这样的刻录程序将其写入启动映像):(. The filename always contains the following elements (which can be used to write this boot-image with a burning-program like Nero):)
-
Drive-f
:指定CD/DVD-ROM的驱动器盘符或ISO文件名.(: Specifies either the drive-letter of the CD/DVD-ROM or the ISO-filename.) -
NoEmulation
:此引导映像使用的模式.可能的模式是:(: The mode which is used by this boot-image. The possible modes are:)- 不模拟(NoEmulation)
- 1.2MegDisk(1.2MegDisk)
- 1.44MegDisk(1.44MegDisk)
- 2.88MegDisk(2.88MegDisk)
-
Segment-xxxx
:将存储在该启动映像的初始条目中的段(通常是(: The segment which will be stored in the initial-entry for this boot-image (normally)0000
要么(or)7C00
).().) -
SecCount-y
:用于此引导映像的虚拟扇区数(512字节).(: The number of virtual sectors (512 bytes) used for this boot-image.) 完整的使用说明在这里:(The complete usage-description is here:)
CD/DVD-BootImage-Extractor v1.0 (c) Jochen Kalmbach
http://blog.kalmbachnet.de/
Usage:
BootExtract [switches] <source>
source: The source file (*.iso) or CD/DVD-drive to extract images from
switches: -b Also extract bootrecord and bootcatalog
Examples:
BootExtract z:
兴趣点(Points of interest)
引导映像的位置(Location of the boot-image)
如果您可以访问CD/DVD,则可以简单地按照(If you have sector-access to the CD/DVD, you can simple follow the*) “El Torito” Bootable CD-ROM Format Specification*)" El Torito"可启动CD-ROM格式规范( 读取启动映像.需要了解以下定义(在规范中进行了说明):(to read the boot-image. The following defines need to be known (which are stated in the spec):)
-
CD扇区大小:0x800字节.(CD-sector-size: 0x800 bytes.)
-
虚拟扇区大小:0x200字节.(Virtual-sector-size: 0x200 bytes.)
-
的扇区号(Sector-number of the)引导记录量:0x11(boot-record-volume: 0x11).(.) 现在,如果执行以下操作,则可以读取初始/默认启动映像:(Now, you can read the initial/default boot-image if you do the following:)
-
阅读(Read the)引导记录卷(boot-record-volume)(扇区0x11)并检查其有效性.((sector 0x11) and check for validity.)
-
从中提取扇区号(Extract the sector-number from the)引导记录卷(boot-record-volume)其中包含(which contains the)引导目录(boot-catalog)((()
DWORD
字节偏移量为0x47).(at byte-offset 0x47).) -
阅读(Read the)引导目录(boot-catalog)(从上面提取的扇区号中)并检查有效性.((from the above extracted sector number) and check for validity.)
-
从中提取引导信息(Extract the boot-information from the)初始/默认输入(Initial/Default-Entry)在里面(in the)引导目录(boot-catalog)(从启动目录中的字节偏移量0x20开始).((starting at byte-offset 0x20 in the boot-catalog).)
-
提取(*Extract the*)*起始部门(*starting-sector*)*((*(*)
DWORD
相对字节偏移量0x8)和(*relative byte-offset 0x8) and the*)*虚拟部门数(*virtual-sector-count*)*((*(*)WORD
在相对字节偏移0x6)(*at relative byte-offset 0x6) for the*)*启动映像(*boot-image*)*从此条目中读取引导映像.(*from this entry and read the boot-image.) 有关详细信息,您可以阅读(For a detailed info, you can either read the*) “El Torito” Bootable CD-ROM Format Specification)" El Torito"可启动CD-ROM格式规范( 或看看源代码.(or take a look at the source code.)
历史(History)
-
2005-08-04(2005-08-04)
- 首次公开发行.(First public release.)
-
2006-01-05(2006-01-05)
- 修复了一个错误,现在它可以正确读取1.2/1.44和2.88 MB的启动映像.(Fixed a bug, now it is able to correctly read 1.2/1.44 and 2.88 MB boot images.)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ VC7.1 WinXP Windows .NET .NET1.1 Visual-Studio VS.NET2003 Dev 新闻 翻译