boot cd_rom struct
资料:
1、introduction_to_iso9660.pdf
2、boot-cdrom.pdf
Normal ISO9600:
offset: 16*2048[0x8000]
The Primary Volume Descriptor
#pragma pack(push,1)
typedef struct _PRIMARY_VOLUME_DESCRIPTOR
{
char VolDesType; //Volume Descriptor Type[1]
char StandardId[]; //Standard Identifier[CD001]
char VolDesVer; //Volume Descriptor Version[1]
char Reserved1; //[0x00]
char SystemId[]; //System Identifier[a-characters allowed18]
char VolumeId[]; //Volume Identifier[d-characters allowed19]
char Reserved2[]; //[0x00]
unsigned long dwVolSpaSizeLow; //Number of logical blocks in the Volume.
unsigned long dwVolSpaSizeHigh;
char Reserved3[]; //[0x00]
unsigned long dwVolSetSize; //The assigned Volume Set size of the Volume.
unsigned long dwVolSeqNum; //The ordinal number of the volume in the Volume Set.
unsigned long dwLogBlockSize; //The size in bytes of a Logical Block.
unsigned long dwPathTabSizeLow; //Length in bytes of the path table.
unsigned long dwPathTabSizeHigh;
unsigned long dwLocTypeLPT;
unsigned long dwLocOptionalTypeLPT;
unsigned long dwLocTypeMPT;
unsigned long dwLocOptionalTypeMPT;
char DirRecTootDir[];
char VolSetId[]; //Volume Set Identifier. d-characters allowed.
char PublisherId[]; //Publisher Identifier. a-characters allowed.
char DataPerId[]; //Data Perparer Identifier. a-characters allowed.
char AppId[]; //Applicatoin Identifier.
char CopyrightFileId[]; //Copyright File Identifier.
char AbbstractFileId[]; //Abstract File Identifier.
char BiblioFileId[]; //Bibliographic File Identifier.
char VolCreaDT[]; //Volume Creation Date and Time.
char VolModifDT[]; //Volume Modification Date and Time.
char VolExpirDT[]; //Volume Expiration Date and Time.
char VolEffecDT[]; //Volume Effective Data and Time.
char FileStrucVer; //File Structure Version[1]
char Reserved4; //Reserved for future standardization.[0x00]
char AppUse[]; //Application Use.
char Reserved5[]; //Reserved for future standardization.[0x00]
}PRIMARY_VOLUME_DESCRIPTOR, *PPRIMARY_VOLUME_DESCRIPTOR;
#pragma pack(pop)
Date and Time:
Represented by seven bytes:
1: Number of years since 1900
2: Month of the year from 1 to 12
3: Day of the Month from 1 to 31
4: Hour of the day from 0 to 23
5: Minute of the hour from 0 to 59
6: second of the minute from 0 to 59
7: Offset from Greenwich Mean Time in Number of
15 minute intervals from -48(West) to +52(East)
boot CD_ROM:
offset: 16*2048[0x8000]
The Primary Volume Descriptor
offset: 17*2048[0x8800]
Boot Record Volume Descriptor
#pragma pack(push,1)
typedef struct _BOOTRECORD_VOLUME_DESCRIPTOR
{
char BootRecordInd; //Boot Record Indicator, must be 0.
char ISO_9660Id[]; //ISO-9660 Identifier, must be "CD001".
char VolVer; //Version of this descriptor, must be 1.
char BootSystemId[]; //Boot System Identifier, must be "EL TORITO SPECIFICATION" padded with 0's.
char Reserved1[]; //Unused, must be 0.
unsigned long dwSecOfBootCatalog; //Absolute pointer to first sector of Boot Catolog.
char Reserved2[]; //Unused, must be 0.
}BOOTRECORD_VOLUME_DESCRIPTOR, *PPBOOTRECORD_VOLUME_DESCRIPTOR;
#pragma pack(pop)
Booting Catalog:
1. Validation Entry
#pragma pack(push,1)
typedef struct _BC_VALIDATION_ENTRY
{
char HeaderID; //Header ID, must be 01.
char PlatformID; //Platform ID. 0=80x86, 1=Power PC, 2=Mac
unsigned short wReserved; //Reserved, must be 0.
char DeveloperID[]; //ID string. to identify the developer of the CD_ROM
unsigned short wChecksum; //Chaecksum Word. This sum of all the words in this record should be 0.
char kb55; //Key byte,must be 0x55
char kbAA; //key byte,must be 0xAA
} BC_VALIDATION_ENTRY, *PBC_VALIDATION_ENTRY;
#pragma pack(pop)
2. Initial.Default Entry
#pragma pack(push,1)
typedef struct _BC_VALIDATION_ENTRY
{
char HeaderID; //Header ID, must be 01.
char PlatformID; //Platform ID. 0=80x86, 1=Power PC, 2=Mac
unsigned short wReserved; //Reserved, must be 0.
char DeveloperID[]; //ID string. to identify the developer of the CD_ROM
unsigned short wChecksum; //Chaecksum Word. This sum of all the words in this record should be 0.
char kb55; //Key byte,must be 0x55
char kbAA; //key byte,must be 0xAA
} BC_VALIDATION_ENTRY, *PBC_VALIDATION_ENTRY;
#pragma pack(pop)
2.1 Boot media type.
This specifies what media the boot image is intended to
emulate in bits 0-3 as follows, bits 4-7 are reserved and must be 0.
Bits 0-3 count as follows:
0 No Emulation
1 1.2 meg diskette
2 1.44 meg diskette
3 2.88 meg diskette
4 Hard Disk (drive 80)
5-F Reserved, invalid at this time
3. Section Header
#pragma pack(push,1)
typedef struct _BC_SECTION_HEADER_ENTRY
{
char HeaderInd; //Header Indicator as follows: 90-Header more headers follow, 91-Final Header
char PlatformID; //Platform ID. 0=80x86, 1=Power PC, 2=Mac
unsigned short wNumber; //Number of section entries following this header
char ID[]; //ID string
} BC_SECTION_HEADER_ENTRY, *PBC_SECTION_HEADER_ENTRY;
#pragma pack(pop)
4. Section Entry
#pragma pack(push,1)
typedef struct _BC_SECTION_ENTRY
{
char BootInd; //Boot Indicator. 88=Bootable, 00=Not Bootable
char BootMediaType; //Boot media type.
unsigned short wLoadSegment; //Load Segment. 0 use 0x7C0, non-zero use the specified segment.
char SystemType; //System Type.
char Reserved1; //Unused, must be 0
unsigned short wSectorCount; //Sector Count.
unsigned long dwLoadRBA; //Load RBA. CD's use Relative/Logical block addressing.
char CriteriaType; //Selection criteria type.
char UniqueCriteria[]; //Vendor unique selection criteria.
} BC_SECTION_ENTRY, *PBC_SECTION_ENTRY;
#pragma pack(pop)
4.1 Boot media type.
This specifies what media the boot image emulates in bits 0-32.
Bits 6 and 7 are specific to the type of system.
Bits 0-3 count as follows
0 No Emulation
1 1.2 meg diskette
2 1.44 meg diskette
3 2.88 meg diskette
4 Hard Disk (drive 80)
5-F Reserved, invalid at this time
bit 4 - Reserved, must be 0
bit 5 - Continuation Entry Follows
bit 6 - Image contains an ATAPI driver
bit 7 - Image contains SCSI drivers
4.2 Selection criteria type.
This defines a vendor unique format for bytes 0D-1F.
The following formats have currently been assigned:
0 - No selection criteria
1- Language and Version Information (IBM)
2-FF - Reserved
5. Section Entry Extension
#pragma pack(push,1)
typedef struct _BC_SECTION_ENTRY_EXT
{
char ExtInd; //Extension Indicator. must be 0x44
char Follow; //Bits 1-4:Unused, 5:1=Extension Record follows, 0=This is final Extension, 6-7:Unused
char UniqueCriteria[]; //Vendow unique selection criteria
} BC_SECTION_ENTRY_EXT, *PBC_SECTION_ENTRY_EXT;
#pragma pack(pop)
boot cd_rom struct的更多相关文章
- Python GIL 多线程机制 (C source code)
最近阅读<Python源码剖析>对进程线程的封装解释: GIL,Global Interpreter Lock,对于python的多线程机制非常重要,其如何实现的?代码中实现如下: 指向一 ...
- Linux时间子系统(四) timekeeping
一.前言 timekeeping模块是一个提供时间服务的基础模块.Linux内核提供各种time line,real time clock,monotonic clock.monotonic raw ...
- 计算机启动boot
原创博文:转载请标明出处:http://www.cnblogs.com/zxouxuewei 零.boot的含义 先问一个问题,"启动"用英语怎么说? 回答是boot.可是,boo ...
- MIT JOS学习笔记01:环境配置、Boot Loader(2016.10.22)
未经许可谢绝以任何形式对本文内容进行转载! 一.环境配置 关于MIT课程中使用的JOS的配置教程网上已经有很多了,在这里就不做介绍,个人使用的是Ubuntu 16.04 + qemu.另注,本文章中贴 ...
- 使用spring boot和thrift、zookeeper建立微服务
Spring cloud适应于云端服务,也适用于企业信息化SOA建设.spring boot也是restful微服务开发的利器.但对于内网服务,即服务与服务之间的调用,spring并没有去刻意封装,也 ...
- android boot.img 结构
android 的boot.img 包括 boot header,kernel, ramdisk 首先来看看Makefile是如何产生我们的boot.img的: boot镜像不是普通意义上的文件系统, ...
- boot.img的分析
1 boot.img boot.img是由文件头信息,内核数据以及文件系统数据组成,它们之间非页面对齐部分用0填充 文件头信息的具体结构可以在system/core/mkbootimg/bootim ...
- 嵌入式系统 Boot Loader 技术内幕
转载:http://www.ibm.com/developerworks/cn/linux/l-btloader/index.html 1. 引言 在专用的嵌入式板子运行 GNU/Linux 系统 ...
- u-boot分析——struct gd_t与struct bd_t
gd_t和bd_t是u-boot中两个重要的数据结构,在初始化操作很多都要靠这两个数据结构来保存或传递.分别定义在./include/asm/global_data.h和./include/asm/u ...
随机推荐
- sessionId与cookie 的关系(百度文库)
这篇文档讲的很清楚,推荐阅读 http://wenku.baidu.com/view/2ecf0b350b4c2e3f572763d1.html
- C++ error: passing 'const std::map<>]' discards qualifiers或pass-by-reference-to-const-map导致的“discards qualifiers”
产生问题的场景: int func(const map<int, string> &aMap) { string value = amap[0]; } 或者 int Test:: ...
- WPF学习总结1:INotifyPropertyChanged接口的作用
在代码中经常见到这个接口,它里面有什么?它的作用是什么?它和依赖属性有什么关系? 下面就来总结回答这三个问题. 1.这个INotifyPropertyChanged接口里就一个PropertyChan ...
- ReferenceError: weakly-referenced object no longer exists Python kafka
Python存入kafka报错,ReferenceError: weakly-referenced object no longer exists. Exception in thread 14: p ...
- U811.1接口EAI系列之六--物料上传--VB语言
1. 业务系统同步U811.1存货档案通用方法. 2.具体代码处理如下: 作者:王春天 2013-11-06 地址:http://www.cnblogs.com/spring_wang/p/34098 ...
- HBase中多Filter查询示例
在Hbase查询中有时需要用到多个Filter关联的查询. 代码如下: ArrayList<Filter> listForFilters = new ArrayList<Filter ...
- java线程五种状态
java线程五种状态: 创建 -> 就绪 -> 运行 -> 销毁 创建 -> 就绪 -> 运行 -> 等待(缺少资源) -> 销毁 下图:各种状态转换
- 译: 3. Axis2快速入门指南
本指南的目的是让您尽快使用Axis2开始创建服务和客户端.我们将采用一个简单的StockQuote服务,向您展示可以创建和部署它的一些不同方式,以及快速查看Axis2附带的一个或两个实用程序.然后,我 ...
- 【Unity】6.8 Quaternion类(四元数)
分类:Unity.C#.VS2015 创建日期:2016-04-20 一.四元数的概念 四元数包含一个标量分量和-个三维向量分量,四元数Q可以记作: Q=[w,(x,y,z)] 在3D数学中使用单位四 ...
- HTML5学习笔记(十二):JavaScript新增Map和Set
Map JavaScript的默认对象表示方式{}可以视为其他语言中的Map或Dictionary的数据结构,即一组键值对. 但是JavaScript的对象有个小问题,就是键必须是字符串.但实际上Nu ...