Skip to content

Instantly share code, notes, and snippets.

@3dprogramin
Last active February 5, 2025 19:25
Show Gist options
  • Save 3dprogramin/59f58b0ff04959248f5f373ad5522ceb to your computer and use it in GitHub Desktop.
Save 3dprogramin/59f58b0ff04959248f5f373ad5522ceb to your computer and use it in GitHub Desktop.
Burning and verifying CD/DVD/Blu-ray discs

πŸ” Check available write speeds for DVD/Blu-ray

dvd+rw-mediainfo /dev/sr0 | grep "Write speed"

πŸ” Check available write speeds for CDs

cdrecord -prcap dev=/dev/sr0 | grep "Write speed"

πŸ“€ Create ISO from files (for DVD/Blu-ray)

mkisofs -o my_disc.iso -udf -iso-level 3 -J -R -V "REPLACE-DISC-LABEL" /path/to/files

(Use -iso-level 3 to allow files larger than 2 GiB to be included in the ISO.)

πŸ”₯ Burn ISO to DVD/Blu-ray (automatic detection)

growisofs -Z /dev/sr0=my_disc.iso -speed=2

πŸ”₯ Burn ISO to CD (use cdrecord instead of growisofs)

cdrecord -v speed=8 dev=/dev/sr0 -data -eject -pad my_disc.iso

βœ… Verify the burned disc with dvdisaster (checks for read errors)

dvdisaster -c -i /dev/sr0

(This checks for errors and maps bad sectors on the disc.)

βœ… Verify the disc can be fully read (good for detecting corrupt sectors)

readom dev=/dev/sr0 f=/dev/null

(Reads the entire disc without copying files to ensure it’s fully readable.)

βœ… Verify data integrity (compare checksum of ISO generated with ISO read from disc)

dd if=/dev/sr0 of=read_from_disc.iso bs=4M status=progress
md5sum my_disc.iso read_from_disc.iso

(Reads disc and generates ISO, then compare with original ISO that was burned.)

πŸ”Ή Determine burn speed, check metadata (if stored on the disc)

dvd+rw-mediainfo /dev/sr0 | grep "Write speed"

πŸ”Ή For CDs, check disc ATIP (may contain burn speed info)

cdrecord -atip dev=/dev/sr0

(Displays detailed information about CD media, including supported write speeds.)

πŸ”Ή For detailed Blu-ray/DVD information

isoinfo -d -i /dev/sr0

(Displays the disc's ISO 9660 structure and metadata, including volume labels and file system.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment