To create iso
to burn cd-r/cd-rw
To burn files/directory, to cd without making iso file (thanks to Vermaden @ daemonforums.org)
to burn compressed cd:
to blank cd-rw
to get cd/dvd image (to get iso from disk)
to burn dvd iso to disk with burncd
to burn dvd iso to disk with growisofs
to burn files to dvd without creating iso
above 2 commands will overwrite content on dvd+-rw disk
no need to blank (so it seams. i tested on my pc)
to append to dvd (must use same options as when creating this dvd)
to finalize dvd (slow) (you need this after appending to dvd, to maintain maximal compatibility, it's not 100% necessary)
to format dvd-rw with burncd (slow!)
to format dvd+rw with burncd (slow!)
To blank dvd-rw (very slow!) (thanks to Vermaden @ daemonforums.org)
to blank dvd+rw (slow)
to burn audio cd from wav files
here's simple script that uses mplayer and burncd to burn audio cd's from directory with music files (basically any file that mplayer can play)
and here's another simple script to rip audio cd's to mp3
you can rip 1 audio track to wav with
in this example it'll rip track 1 only
and convert it to mp3 with
to attach and mount iso image
to umount and detach iso image
To make it all happen you need:
in kernel
and permission to write to /dev/acd0 /dev/cd0 /dev/pass1
note: The pass device number will also depend on the order that SCSI devices are enumerated by the kernel. To determine exactly which one it is, one can use camcontrol devlist as root [thanks to phoenix @ daemonforums.org]
note, you can't run growisofs using su, you need to do that as user....
here's some part of my /etc/devfs.conf
Here's list of utils you can install to convert from different formats to iso files:
sysutils/iat - converts BIN, MDF, PDI, CDI, NRG, and B5I to ISO
sysutils/nrg2iso - Convert Nero .nrg CD-Image format to ISO
sysutils/ccd2iso - A CloneCD to ISO converter
sysutils/daa2iso - Convert PowerISO DAA files to ISO9660
sysutils/mdf2iso - A Alcohol 120% to ISO converter
sysutils/nrg2iso - Convert Nero .nrg CD-Image format to ISO
sysutils/uif2iso - Convert MagicISO UIF files to ISO9660
sysutils/bchunk - Converts .bin/.cue files to .iso/audio
note: if you have more than one drive, you need to specify which one to use with burncd as well
use -f flag for this
to use mkisofs you need to install sysutils/cdrtools
to use growisofs you need to install sysutils/dvd+rw-tools
to use cdparanoia you need to install audio/cdparanoia
to use lame you need to install audio/lame
to use mplayer you need to install multimedia/mplayer
resources:
burncd(8)
mkisofs(8)
growisofs(1)
mplayer(1)
cdparanoia(1)
mdconfig(8)
lame(1) , hmm why this is not available in freebsd online manual pages?
UPDATE
To avoid allowing rw access to all pass* devices (thanks to mart), you can do fallowing:
This will make sure that your burner on ata1 (in this case) will be assigned to pass0 always, as long as it's on ata1
now all you have to do is allow only
in /etc/devfs.conf
Code:
$ mkisofs -o /path/to/output.iso -R -J /path/to/files/you/want/on/cd
to burn cd-r/cd-rw
Code:
$ burncd data /path/to/output.iso fixate
To burn files/directory, to cd without making iso file (thanks to Vermaden @ daemonforums.org)
Code:
$ mkisofs -J -R /path/to/some/file/or/dir | burncd data - fixate
to burn compressed cd:
Code:
$ gunzip -c file.iso.gz | burncd data - fixate
to blank cd-rw
Code:
$ burncd blank
to get cd/dvd image (to get iso from disk)
Code:
$ dd if=/dev/acd0 of=/path/to/disk.iso bs=2048
to burn dvd iso to disk with burncd
Code:
$ burncd dvdrw /paht/to/image.iso
to burn dvd iso to disk with growisofs
Code:
$ growisofs -dvd-compat -Z /dev/cd0=/path/to/image.iso
to burn files to dvd without creating iso
Code:
$ growisofs -Z /dev/cd0 -R -J /some/files
above 2 commands will overwrite content on dvd+-rw disk
no need to blank (so it seams. i tested on my pc)
to append to dvd (must use same options as when creating this dvd)
Code:
$ growisofs -M /dev/cd0 -R -J /some/more/files
to finalize dvd (slow) (you need this after appending to dvd, to maintain maximal compatibility, it's not 100% necessary)
Code:
$ growisofs -M /dev/cd0=/dev/zero
to format dvd-rw with burncd (slow!)
Code:
$ burncd format dvd-rw
to format dvd+rw with burncd (slow!)
Code:
$ burncd format dvd+rw
To blank dvd-rw (very slow!) (thanks to Vermaden @ daemonforums.org)
Code:
$ growisofs -Z "/dev/cd0=/dev/zero"
to blank dvd+rw (slow)
Code:
dvd+rw-format /dev/cd0
to burn audio cd from wav files
Code:
$ burncd audio file1.wav file2.wav file3.wav fixate
here's simple script that uses mplayer and burncd to burn audio cd's from directory with music files (basically any file that mplayer can play)
Code:
#!/bin/sh
for i in `ls`; do
rm -f /tmp/cd_track.wav
mplayer -vo null -vc dummy -af resample=44100 -ao pcm:file=/tmp/cd_track.wav $i
burncd audio /tmp/cd_track.wav
done
rm -f /tmp/cd_track.wav
burncd audio fixate
exit 0
and here's another simple script to rip audio cd's to mp3
Code:
#!/bin/sh
mkdir /tmp/cd
cd /tmp/cd
cdparanoia -B -d /dev/acd0
for i in `ls *.wav`; do
lame -m s "$i" -o "$(echo $i | awk '{print substr($0,6,2)}' -).mp3"
rm -f "$i"
done
echo 'files are in /tmp/cd'
exit 0
you can rip 1 audio track to wav with
Code:
$ cdparanoia -B -d /dev/acd0 1
and convert it to mp3 with
Code:
lame -m s audio.wav -o audio.mp3
to attach and mount iso image
Code:
$ mdconfig -a -t vnode -u 0 -f /path/to/image.iso
$ mount -t cd9600 /dev/md0 /mnt
to umount and detach iso image
Code:
$ umount /mnt
$ mdconfig -du 0
To make it all happen you need:
in kernel
Code:
options CD9660 # ISO 9660 Filesystem, because you want to read them ;)
device atapicd # ATAPI CDROM drives
device atapicam
device cd # nessacery for dvd's
device pass
device scbus
options MD_ROOT
device md
options UDF
and permission to write to /dev/acd0 /dev/cd0 /dev/pass1
note: The pass device number will also depend on the order that SCSI devices are enumerated by the kernel. To determine exactly which one it is, one can use camcontrol devlist as root [thanks to phoenix @ daemonforums.org]
note, you can't run growisofs using su, you need to do that as user....
here's some part of my /etc/devfs.conf
Code:
own acd0 root:users
perm acd0 0660
own cd0 root:users
perm cd0 0660
own pass1 root:users
perm pass1 0660
own pass0 root:users
perm pass0 0660
Here's list of utils you can install to convert from different formats to iso files:
sysutils/iat - converts BIN, MDF, PDI, CDI, NRG, and B5I to ISO
sysutils/nrg2iso - Convert Nero .nrg CD-Image format to ISO
sysutils/ccd2iso - A CloneCD to ISO converter
sysutils/daa2iso - Convert PowerISO DAA files to ISO9660
sysutils/mdf2iso - A Alcohol 120% to ISO converter
sysutils/nrg2iso - Convert Nero .nrg CD-Image format to ISO
sysutils/uif2iso - Convert MagicISO UIF files to ISO9660
sysutils/bchunk - Converts .bin/.cue files to .iso/audio
note: if you have more than one drive, you need to specify which one to use with burncd as well
use -f flag for this
Code:
burncd -f /dev/acd1 data /path/to/image.iso fixate
to use mkisofs you need to install sysutils/cdrtools
to use growisofs you need to install sysutils/dvd+rw-tools
to use cdparanoia you need to install audio/cdparanoia
to use lame you need to install audio/lame
to use mplayer you need to install multimedia/mplayer
resources:
burncd(8)
mkisofs(8)
growisofs(1)
mplayer(1)
cdparanoia(1)
mdconfig(8)
lame(1) , hmm why this is not available in freebsd online manual pages?
UPDATE
To avoid allowing rw access to all pass* devices (thanks to mart), you can do fallowing:
Code:
$ dmesg | grep -i cd0.*target
cd0 at [color="Red"]ata1[/color] bus 0 target 0 lun 0
$ echo 'hint.scbus.0.at="[color="Red"]ata1[/color]"' >> /boot/device.hint
now all you have to do is allow only
Code:
own pass0 root:users
perm pass0 0660