{"record":{"id":"e9518ac6431d829e","repo":"can1357/oh-my-pi","slug":"unsupported-udf-only-image-no-iso-9660-volume-des","errorCode":null,"errorMessage":"Unsupported UDF-only image (no ISO 9660 volume descriptor)","messagePattern":"Unsupported UDF-only image \\(no ISO 9660 volume descriptor\\)","errorType":"exception","errorClass":"ArchiveError","httpStatus":null,"severity":"error","filePath":"packages/utils/src/ar/iso.ts","lineNumber":300,"sourceCode":"\t\t\t\t\tdescriptor[89] === 0x2f &&\n\t\t\t\t\t[0x40, 0x43, 0x45].includes(descriptor[90]!)\n\t\t\t\t) {\n\t\t\t\t\tjoliet = parseVolumeDescriptor(descriptor, true);\n\t\t\t\t}\n\t\t\t\tif (type === 255) {\n\t\t\t\t\tterminated = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpendingOffset += ISO_SECTOR_SIZE;\n\t\t\tscanned += ISO_SECTOR_SIZE;\n\t\t}\n\t\tposition += pending.byteLength;\n\t\tchunkSectors = Math.min(chunkSectors * 2, Math.ceil(limits.maxIndexSize / ISO_SECTOR_SIZE));\n\t}\n\tif (!primary && !joliet) {\n\t\tif (sawHighSierra) throw new ArchiveError(\"Unsupported High Sierra CD-ROM filesystem (not ISO 9660)\");\n\t\tif (sawUdf) throw new ArchiveError(\"Unsupported UDF-only image (no ISO 9660 volume descriptor)\");\n\t\tthrow invalidIso(\"primary volume descriptor not found\");\n\t}\n\tif (!terminated) throw invalidIso(\"volume descriptor terminator not found\");\n\tif (joliet) return { ...joliet, rockRidgeRoot: primary?.root };\n\treturn primary!;\n}\n\nfunction decodeIdentifier(identifier: Uint8Array, joliet: boolean): string {\n\tlet name: string;\n\tif (joliet) {\n\t\tif (identifier.byteLength % 2 !== 0) throw invalidIso(\"Joliet identifier has an odd byte length\");\n\t\tconst codeUnits = new Uint16Array(identifier.byteLength / 2);\n\t\tfor (let index = 0; index < codeUnits.length; index++) codeUnits[index] = readUInt16BE(identifier, index * 2);\n\t\tconst chunks: string[] = [];\n\t\tfor (let index = 0; index < codeUnits.length; index += 4096) {\n\t\t\tchunks.push(String.fromCharCode(...codeUnits.subarray(index, index + 4096)));\n\t\t}\n\t\tname = chunks.join(\"\");","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/utils/src/ar/iso.ts#L282-L318","documentation":"The volume scan encountered UDF (Universal Disk Format) descriptors but no ISO 9660 primary or Joliet descriptor, meaning the image is a UDF-only optical/disc filesystem. This reader implements ISO 9660/Joliet only, so it throws this specific error instead of the generic 'primary volume descriptor not found'.","triggerScenarios":"Calling the ISO reader (readVolume via the volume/entry APIs) on a pure UDF image — e.g. DVD-Video/Blu-ray UDF 2.x dumps, or USB-stick-format UDF images — where the descriptor sequence contains only UDF descriptors (NSR02/NSR03) and no ISO 9660 descriptor.","commonSituations":"Reading DVD/Blu-ray dumps, UDF-formatted flash drives imaged to a file, or modern optical images authored without the usual ISO 9660 bridge (no 'dual' ISO+UDF layout).","solutions":["Read the image with a UDF-capable tool or library (e.g. mount -t udf, libudf-based extractors) instead of the ISO reader","Re-author the content as an ISO 9660 + UDF bridge image: xorriso -as mkisofs -udf -o image.iso dir/","If the source is a live UDF filesystem you control, copy the files out and pack them into a supported archive format","Confirm with a hex dump that sector 16+ hold UDF (NSR) descriptors and no ISO 9660 'CD001' descriptor"],"exampleFix":"// before\nconst vol = await readIso(udfDump); // ArchiveError: Unsupported UDF-only image\n// after: create ISO/UDF bridge\n// $ xorriso -as mkisofs -udf -o hybrid.iso content-dir/\nconst vol = await readIso(hybridImage);","handlingStrategy":"fallback","validationCode":"// scan descriptor sequence for 'CD001' (ISO) vs 'BEA01'/'NSR02'/'NSR03' (UDF)\nconst dec = new TextDecoder();\nasync function tag(file, sector) {\n  const b = new Uint8Array(await Bun.file(file).slice(sector * 2048 + 1, sector * 2048 + 6).arrayBuffer());\n  return dec.decode(b);\n}\nconst t = await tag(imagePath, 16);\nif (t !== 'CD001') throw new Error('not an ISO 9660 bridge image (got ' + t + ')');","typeGuard":"null","tryCatchPattern":"try {\n  vol = await readIso(image);\n} catch (err) {\n  if (err instanceof ArchiveError && err.message.includes('UDF-only')) {\n    return extractWithUdfTool(image); // mount -t udf / UDF-aware extractor\n  }\n  throw err;\n}","preventionTips":["Prefer ISO/UDF bridge images (xorriso -udf) so ISO readers still work","Route pure UDF images (DVD/BD dumps, UDF flash drives) to a UDF reader","Check sector-16 descriptor identifiers during ingestion"],"tags":["iso9660","udf","optical-disc","unsupported-format"],"backgroundTag":"unsupported-filesystem-format","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}