|
||||
FreeBSD howto: burning and ripping cd's
To create iso
Code:
$ mkisofs -o /path/to/output.iso -R -J /path/to/files/you/want/on/cd Code:
$ burncd data /path/to/output.iso fixate Code:
mkisofs -o /dev/stdout -R -J /path/to/files/you/want/on/cd | burncd data /dev/stdin fixate Code:
$ burncd blank Code:
$ dd if=/dev/acd0 of=/path/to/disk.iso bs=2048 to burn dvd iso to disk Code:
$ growisofs -dvd-compat -Z /dev/cd0=/path/to/image.iso Code:
$ growisofs -Z /dev/cd0 -R -J /some/files 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 Code:
$ growisofs -M /dev/cd0=/dev/zero to burn audio cd from wav files Code:
$ burncd audio file1.wav file2.wav file3.wav fixate 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 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 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 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 from 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 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 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: man 8 burncd man 8 mkisofs man 8 growisofs man 8 mplayer man 1 cdparanoia man 8 mdconfig man 1 lame , hmm why this is not available in freebsd online manual pages? origianl post: https://forums.freebsd.org/showthread.php?t=1195 Last edited by graudeejs; 30th December 2008 at 05:03 PM. |
|
|||
Quote:
Specifying a larger block size in dd will increase the speed. |
|
||||
Nope, it won't (or, at least not by enough to make a difference):
Code:
[root@thehive /storage]# dd if=/dev/acd0 of=2k.iso bs=2K 230426+0 records in 230426+0 records out 471912448 bytes transferred in 208.567875 secs (2262632 bytes/sec) [root@thehive /storage]# dd if=/dev/acd0 of=1m.iso bs=1M 450+1 records in 450+1 records out 471912448 bytes transferred in 208.797817 secs (2260141 bytes/sec) [root@thehive /storage]# md5 /dev/acd0 2k.iso 1m.iso MD5 (/dev/acd0) = d41d8cd98f00b204e9800998ecf8427e MD5 (2k.iso) = 400fdb244d7540fd01b82d194d99c284 MD5 (1m.iso) = 400fdb244d7540fd01b82d194d99c284 [root@thehive /storage]# dd if=/dev/acd0 of=1m-2.iso bs=1M 162+1 records in 162+1 records out 170164224 bytes transferred in 88.262563 secs (1927932 bytes/sec) [root@thehive /storage]# dd if=/dev/acd0 of=2k-2.iso bs=2K 83088+0 records in 83088+0 records out 170164224 bytes transferred in 88.409275 secs (1924733 bytes/sec) [root@thehive /storage]# md5 /dev/acd0 2k-2.iso 1m-2.iso MD5 (/dev/acd0) = d41d8cd98f00b204e9800998ecf8427e MD5 (2k-2.iso) = 6830513ed854155bd0b0bba5ce0c3f92 MD5 (1m-2.iso) = 6830513ed854155bd0b0bba5ce0c3f92 On a side note, anyone know how to create an md5 hash of a cdrom on FreeBSD? In Linux, one can just "md5sum /dev/cdrom" and get the same md5 hash as the .iso generated via dd, which doesn't seem to work on FreeBSD. |
|
|||
@Phoenix, Apologies.. I was basing my claims on OpenBSD findings.
Each device has a block/character device, /dev/rcd0a and /dev/cd0a, respectively.
Code:
[bsdfan@bluebox $ttyp0]~/tests: $ disklabel cd1 # /dev/rcd1c: type: ATAPI disk: KR9053430 label: flags: bytes/sector: 2048 sectors/track: 100 tracks/cylinder: 1 sectors/cylinder: 100 cylinders: 2310 total sectors: 230930 rpm: 300 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # microseconds track-to-track seek: 0 # microseconds drivedata: 0 3 partitions: # size offset fstype [fsize bsize cpg] a: 230930 0 ISO9660 c: 230930 0 ISO9660 [bsdfan@bluebox $ttyp0]~/tests: $ dd if=/dev/rcd1a of=2k.iso bs=2k 230930+0 records in 230930+0 records out 472944640 bytes transferred in 159.694 secs (2961550 bytes/sec) [bsdfan@bluebox $ttyp0]~/tests: $ dd if=/dev/rcd1a of=1m.iso bs=1m 451+1 records in 451+1 records out 472944640 bytes transferred in 118.886 secs (3978121 bytes/sec) [bsdfan@bluebox $ttyp0]~/tests: $ dd if=/dev/rcd1a of=10m.iso bs=10m 45+1 records in 45+1 records out 472944640 bytes transferred in 123.956 secs (3815423 bytes/sec) [bsdfan@bluebox $ttyp0]~/tests: $ md5 2k.iso 1m.iso 10m.iso MD5 (2k.iso) = 2870e9cf5455d769372bb5d45bc22d9c MD5 (1m.iso) = 2870e9cf5455d769372bb5d45bc22d9c MD5 (10m.iso) = 2870e9cf5455d769372bb5d45bc22d9c [bsdfan@bluebox $ttyp0]~/tests: $ md5 /dev/rcd1a md5: /dev/rcd1a: read error: Invalid argument [bsdfan@bluebox $ttyp0]~/tests: $ md5 /dev/cd1a MD5 (/dev/cd1a) = 2870e9cf5455d769372bb5d45bc22d9c [bsdfan@bluebox $ttyp0]~/tests: $ Things must work differently on FreeBSD... |
|
||||
Yes, that is right. ATAPI (ie IDE) cd-rom drives are exposed as acd. SCSI cdroms are exposed as cd (as they came first)
ATAPICAM produces a SCSI interface to ATAPI devices - this is possible because ATAPI was basically SCSI commands over the what the IDE interface developed into. So, if you have ATAPICAM installed, your optical devices will be known as both /dev/acd0 and /dev/cd0. See? Not strange at all. Blame those Hysterical Raisins.
__________________
The only dumb question is a question not asked. The only dumb answer is an answer not given. |
Tags |
burn, cd, dvd, freebsd |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FreeBSD GPT howto | graudeejs | Guides | 10 | 21st December 2010 12:24 AM |
HOWTO: Enemy Territory on FreeBSD | tangram | Guides | 0 | 9th June 2009 03:31 PM |
HOWTO: QEMU on FreeBSD | vermaden | Guides | 10 | 9th March 2009 07:10 PM |
HOWTO: FreeBSD with CCACHE | vermaden | Guides | 10 | 9th July 2008 06:14 PM |
HOWTO: BURNCD like DVD and CD CLI burning | vermaden | Guides | 0 | 5th May 2008 10:45 AM |