CD Burning HOWTO
treba scsi v jadre
SCSI supp
SCSI cdroms
SCSI generic

IDE CD napalovacka
treba v jadre IDE SCSI Emulation
a cez lilo treba povedat ktory atapi driver sa ma tvarit ako scsi
u mna hdc
/etc/lilo.conf #podstatna cast
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
compact
timeout=300
image=/boot/vmlinuz-2.0.35
	label=2.0.35
	root=/dev/hda2
	read-only
	append = "hdc=ide-scsi"

Samotne napalovanie skusal som urobit bootovatelne cd
Step1
mkisofs -b boot.img -c Boot.Catalog -r -o /root/cdimage .
Step2
mount -t iso9660 -o ro,loop=/dev/loop0 cdimage /mnt/floppy/
Step3
/usr/local/bin/cdrecord -v speed=2 dev=0,0 cdimage 

Dalsie
Tento prida Volume RedHat a TRANS table pre systemy ktore nevedia pracovat s RR
mkisofs -V RedHat -T -b images/boot.img -c Boot.Catalog -r -o ../cdimage .
-a dolezity prepinac ktory sa postara o to aby bral aj subory zacinajuce #~ atd

Toto je total complex image
#!/bin/sh
/usr/local/bin/mkisofs -V RedHat5.2 -P [email protected] \
-A "RedHat 5.2 Linux distribution. Linux is the operating system for humans." \
-p [email protected] \
-b images/boot.img -c images/boot.catalog \
-r -a -J -o ../cdimage .

#Napalovanie audio
treba package cdda2wav
nacitanie audio cdcka radsej pouzavam scsi emul. ako ATAPI mozno len zdanie
a povercivost pri prvom pokuse ale predsa teda podme:
pri bootovani dat scsi emul aj CD-ROM v sucasnosti (hdd=ide-scsi)
potom juchuchu radsej ako root (mozno dalsia povercivost)
/usr/local/bin/cdda2wav -D0,1,0 -B -x -S 1 
toto sposobi	-x max kvalita
		-B track za trackom
		-S read speed single (som si nie isty ci na to CD-ROM reflektuje)
		-D (device zavisi aj od -I interface (default generic_scsi))
teda pre scsi ako to mam ja (hdd) -D0,1,0 pozri man cdda2wav aj dmesg.
pomodlit a
/usr/local/bin/cdrecord -v speed=2 dev=0,0 timeout=900 -audio *.wav
niekedy moze byt treba -pad napr. ked pocet bytov nema spravne nasobky
takto sa to da na novej napalovacke
cdrecord dev=0,0 -v speed=24 -audio -eject -dao track*.wav

Data disk to disk
dd if=/dev/hdd of=image
vytvori rovnaky subor ako mkisofs

#Multi session CD
Musi byt RockRidge -R

Prva session
vytvorit dir a vnej subdirectories a tie nahrat
mkisofs -o ../image1.raw -R .
cdrecord -v speed=2 dev=0,0 timeout=9999 -multi image1.raw
Druha session
cdrecord dev=0,0 -msinfo
mkisofs -o ../image2 -R -C xx,yy -M /dev/scd0 . 
#kde xx,yy je vystup z cdrecord -msinfo
cdrecord -v speed=2 dev=0,0 timeout=9999 -multi image2.raw

#viac k msisofs standartny rockridge s joliettom
#subory ako root
#-r rozumny rock-ridge
#-J joliett
#-V volume
mkisofs -o /2dos/cdimage.raw -r -J -hide-joliet-trans-tbl -hide-rr-moved -V Java02-03 .


#DAO
cdrdao simulate --driver generic-mmc-raw --device 0,0,0 --speed 2 -v 10 -n AAB1.cue
cdrdao write --driver generic-mmc-raw --device 0,0,0 --eject --speed 2 --buffers 64 -v 10 -n AAB1.cue
or
cdrdao write --device ATAPI:0,1,0 --eject --speed 2 --buffers 64 -v 10 -n AAB1.cue

#VCD stuff
#vcd2 is the type info-album is album name volume-count number of CDS volume-number is # of disk in set
vcdimager -t vcd2 --info-album-id=KHGT --volume-count=2 --volume-number=1 -b khtg1.bin -c khtg1.cue I_kurvahosigutntag.mpg

#-n is to skip the break
#v 10 is verbouse level of 10
#devide buffer by speed to get the time that cdrdao can be without audio before time runs out
cdrdao write --driver generic-mmc --device 0,0,0 --speed 40 --buffers 64 -v 10 -n --eject khtg1.cue

#napalovanie s novou 42 rychlostnou napalovackou vyhod dummyho pre napalovanie na zivo
cdrecord dev=0,0 speed=32 -v -eject -dummy cdimage.raw

#CD CLONE STUFF 
#read
readcd dev=ATAPI:0,0,0 -clone f=archive.iso


#DVD WRITING

#as of kernel 2.6.8 all writing for atapi uses ATAPI or ATA no more ide-scsi

#display drives
dvdrecord -scanbus dev=ATAPI

#display info about media
dvd+rw-mediainfo /dev/hdd

#burn video DVD
dvdrecord speed=4 -dao dev=ATAPI:0,1,0 DVDImage.iso

#loopback mount
modprobe loop
modprobe udf
mount -t udf -o ro,loop=/dev/loop1 DVDImage.iso /cdrom/

#dvdbackup
dvdbackup -i /dev/dvd -M -o .
#make iso
mkisofs -dvd-video -o dvd.iso DVD_D1
#check iso
isoinfo -i dvd.iso -l
#burning DVD in gentoo -> for whatever reason this seems to work best
cdrecord speed=4 -v -dao dev=/dev/hdd dvd.iso