Linux/CD Burning

Coasterless CD Burning
Coasterless CD Burning

Installing Your ATAPI CDRW Drive in Linux

Accurately Reading a CD Device
Install mkisofs package: yum install mkisofs

How to consistently read the correct number of blocks. isoinfo -d -i /dev/cdrom

"Logical block size is: 2048" and "Volume size is: 329989" dd if=/dev/cdrom of=image.iso bs=2048 count=329989 conv=notrunc,noerror

rawread script: device=$1
 * 1) !/bin/sh

blocksize=`isoinfo -d -i $device | grep "^Logical block size is:" | cut -d " " -f 5` if test "$blocksize" = ""; then echo catdevice FATAL ERROR: Blank blocksize >&2 exit fi

blockcount=`isoinfo -d -i $device | grep "^Volume size is:" | cut -d " " -f 4` if test "$blockcount" = ""; then echo catdevice FATAL ERROR: Blank blockcount >&2 exit fi

command="dd if=$device bs=$blocksize count=$blockcount conv=notrunc,noerror" echo "$command" >&2 $command

rawread /dev/cdrom > myiso.iso

rawread /dev/cdrom | md5sum

Writing a CD
Burn Ubuntu ISO: cdrecord -v -dev /dev/cdrw ubuntu-18.04.3-server-amd64.iso

Report SCSI number of your CDRW: cdrecord -scanbus cdrecord dev=ATA -scanbus

Blank CDRW: cdrecord dev=0,0,0 speed=10 blank=fast padsize=63s -pad -dao -v -eject

Burn the CD from the ISO: cdrecord dev=0,0,0 speed=10 padsize=63s -pad -dao -v -eject myimage.iso

Proper burning:
 * Burn at the right speed
 * Pad properly (padsize=63s and -pad)
 * Use disk at once (-dao)
 * Unless your burner prevents buffer underflow, do no other work while you're burning.

Make sure the CD is properly padded
cdrecord dev=0,0,0 speed=10 padsize=63s -pad -dao -v -eject /home/myuid/myiso.iso

Disk at Once
This argument helps clarify to CD readers where the last block is: cdrecord dev=0,0,0 speed=10 padsize=63s -pad -dao -v -eject /home/myuid/myiso.iso

Summary
To burn a CD correctly, you must take care of the following:
 * Set up your burner correctly.
 * Burn at the right speed.
 * While burning, do not perform other CPU or disk intensive work, as it will cause buffer underflow on burners without underflow protection.
 * Always pad correctly with the padsize=63s and -pad argument to cdrecord. Without excellent reason, do not defeat the -pad default of the mkisofs program.
 * Always use disk at once. In the cdrecord program, you signify disk at once (session at once) with -dao.

Testing a CD
md5sum myiso.iso rawread /dev/cdrom | md5sum

If they match, you've burned a winner.

Verifying an ISO
rawread /dev/cdrom > myiso.iso rawread /dev/cdrom | md5sum md5sum myiso.iso

Mounting ISO Images
mount -o loop -t iso9660

mount /dev/cdrom /mnt/cdrom

Check if an old burned CD is still Good
CLI Magic: Is that CD still fresh?

cdck -i

Make an ISO Image
Make an ISO Image dd if=/dev/dvd of=dvd.iso # for dvd dd if=/dev/cdrom of=cd.iso # for cdrom dd if=/dev/scd0 of=cd.iso # if cdrom is scsi

ISO, CDR, and CDRW in Linux mkisofs -RJ -o image.iso /burndirectory/ mkisofs -J -o image.iso /burndirectory dd if=/dev/cdrom of=image.iso cat /dev/cdrom >image.iso cdrecord -v dev=3,0,0 image.iso

mkdir /mnt/isotest mount -t iso9660 /dev/cdrom /mnt/isotest -o loop ls /mnt/isotest

cdrecord -scanbus
 * 1) Setting up your system to work with cdrecord
 * 2) append="hda=ide-scsi"

Command-line CD-ROM burning in Linux mount -t iso9660 -o loop image.iso /mnt/isoimage umount /mnt/isoimage mkisofs -f -R -r -l -J -Vvolid -Aappid  -Ppubid  -odest.iso  src

YoLinux Tutorial: Burning a CD or DVD
 * LOTS of details

CD-Writing HOWTO
 * Good Details

IBM: Burning CDs on Linux
 * Linux SCSI emulation adventures

cdrecord -v -tao -data speed=8 dev=/dev/hdc your_file.iso cdrecord -dev=ATA:1,0,0 Desktop/berry-0.72.iso cdrecord -dev=/dev/hdc Desktop/berry-0.72.iso
 * cd burning problem (forum)
 * No CD-Recorder available... (thread)