「UDF(Universal Disk Format)」の編集履歴(バックアップ)一覧に戻る

UDF(Universal Disk Format) - (2007/03/07 (水) 20:24:43) の編集履歴(バックアップ)


一番最低のレベルではあるものの、データの抜き出しに一応成功したとはいえ、タイトル単位で抜き出せない事には意味が無い。
そのためには、UDF(Universal Disk Format)を勉強することに…

UDF(Universal Disk Format)は、ファイルシステムの一種で、DVD-RAMの標準フォーマットとしても採用されている。
OSTA(Optical Storage Technology Association)を中心に規格化されている。

また、UDFは、ECMA-167を参照しているらしい。
ECMAは、European Computer Manufacturer Association: 欧州電子計算機工業会のこと。

2007年2月末時点では、
  • UDF 2.6
  • ECMA-167 3rd Edition
が最新らしい。

とりあえず、
  • Volume and Boot Blockから始まり、Volume Structureが続く
  • Volume and Boot Blockは、Volume Structure Descriptorから始まり、StandardIdentifierの値によってDescriptorの意味を示す(ECMA-167 Part2)
  • Volume Structureは、Descriptor Tagから始まり、TagIdentifierの値によってDescriptorの意味を示す(ECMA-167 Part3)
  • Descriptorデータはバイト単位で記録され、ワードデータの場合、Little Endianで記録される(ECMA-167 Part1 7.1)
  • DVDメディアのセクタ長は2048バイト

※packが2048バイト固定だったのは、ここから来ている??

Volume and Boot Block

[volume recognition sequence] {
    <CD-ROM Volume Descriptor Set> 0+1
    [Extended Area] {
        <Beginning Extended Area Descriptor> 1+
        { <Volume Structure Descriptor> | <Boot Descriptor> } n+
        <Terminating Extended Area Descriptor> 1+
    } 0+
}

Volume Structure Descriptorは、2048バイト長のデータで、以下の構造となっている
struct tag {
    Uint8  StructureType;
    byte   StandardIdentifier[5];
    Uint8  StructureVersion;
    byte   StructureData[2041];
};

StandardIdentifierの値は、以下の通り
"BEA01"  Beginning Extended Area Descriptor
"TEA01"  Terminating Extended Area Descriptor
"BOOT2"  Boot Descriptor
"CD001"  Volume Structure Descriptor
"CDW02"  Volume Structure Descriptor
"NSR02"  Volume Structure Descriptor(NSR Descriptor)
"NSR03"  Volume Structure Descriptor(NSR Descriptor)

Volume and Boot Blockは、
  • Beginning Extended Area Descriptorで始まる
  • Terminating Extended Area Descriptorで終わる
  • その間にBoot Descriptorを1個入れる事が出来る
  • NSR Descriptorを1個入れる事が出来る


Volume Structure


Descriptor Tagは16バイト長のデータで、以下の構造となっている
struct tag {
    Uint16 TagIdentifier;
    Uint16 DescriptorVersion;
    byte   TagChecksum;|261
    byte   Reserved;
    Uint16 TagSerialNumber;
    Uint16 DescriptorCRC;
    Uint16 DescriptorCRCLength;
    Uint32 TagLocation;
};
  • Descriptorの意味は、TagIdentifierで区別される、具体的な値はUDFのドキュメントには記載されておらず、ECMA-167を参照する必要がある
  • TagChecksumは、tagの0~3、5~15バイト目の各値を加算した値の下位8bit
  • 16バイト目以降の有効データ長は、DescriptorCRCLengthと一致する
  • TagLocationには自身の論理セクタ値を記録する。つまり、複数のディスクを使用している環境でもセクタの配置を追いかける事が可能

TagIdentifierの値は、以下の通り
 1  Primary Volume Descriptor
 2  Anchor Volume Descriptor Pointer
 3  Volume Descriptor Pointer
 4  Implementation Use Volume Descriptor
 5  Partition Descriptor
 6  Logivcal Volume Descriptor
 7  Unallocated Space Descriptor
 8  Terminating Descriptor
 9  Logical Volume Integrity Descriptor
256  File Set Descriptor
257  File Identifier Descriptor
258  Allocation Extent Descriptor
259  Indirect Entry
260  Terminal Entry
261  File Entry
262  Extended Attribute Header Descriptor
263  Unallocated Space Entry
264  Space Bitmap Descriptor
265  Partition Integrity Entry
266  Extended File Entry