PDA

View Full Version : cdrecord da riga di comando


Cascio78
14-11-2003, 11:19
Salve a tutti!!

Avrei la necessita' di creare un cd bootabile di una immagine iso(knopix) vorrei sapere come farlo da riga di comando con cdrecord!!! NON ci rieco, ho guardato il man....ma nulla!!!

Qualcuno e' cosi' gentile da farmi un esempio??


Daniele

ilsensine
14-11-2003, 11:27
cdrecord -v -dao -eject speed=16 dev=0,0 file.img
Al posto di 0,0 devi usare la posizione scsi del tuo masterizzatore, nel caso sia diversa (v. cdrecord --scanbus per l'elenco dei dispositivi scsi e il loro indice)

DjMix
14-11-2003, 11:28
cdrecord dev=/dev/quello_che_è speed=quella_che_preferisci <nome_file_iso>

se cdrecord è già configurato puoi fare direttamente
cdrecord <nome_file_iso>

Cascio78
14-11-2003, 11:31
Grazie!! adesso provo!!

cn73
14-11-2003, 11:51
Se può esserti utile...

copy-cd: Copying a data CD


#!/bin/bash
# copy-cd.sh: copying a data CD

CDROM=/dev/cdrom # CD ROM device
OF=/home/bozo/projects/cdimage.iso # output file
# /xxxx/xxxxxxx/ Change to suit your system.
BLOCKSIZE=2048
SPEED=2 # May use higher speed if supported.

echo; echo "Insert source CD, but do *not* mount it."
echo "Press ENTER when ready. "
read ready # Wait for input, $ready not used.

echo; echo "Copying the source CD to $OF."
echo "This may take a while. Please be patient."

dd if=$CDROM of=$OF bs=$BLOCKSIZE # Raw device copy.


echo; echo "Remove data CD."
echo "Insert blank CDR."
echo "Press ENTER when ready. "
read ready # Wait for input, $ready not used.

echo "Copying $OF to CDR."

cdrecord -v -isosize speed=$SPEED dev=0,0 $OF
# Uses Joerg Schilling's "cdrecord" package (see its docs).
# http://www.fokus.gmd.de/nthp/employees/schilling/cdrecord.html


echo; echo "Done copying $OF to CDR on device $CDROM."

echo "Do you want to erase the image file (y/n)? " # Probably a huge file.
read answer

case "$answer" in
[yY]) rm -f $OF
echo "$OF erased."
;;
*) echo "$OF not erased.";;
esac

echo

exit 0

Cascio78
14-11-2003, 12:02
Originariamente inviato da ilsensine
cdrecord -v -dao -eject speed=16 dev=0,0 file.img
Al posto di 0,0 devi usare la posizione scsi del tuo masterizzatore, nel caso sia diversa (v. cdrecord --scanbus per l'elenco dei dispositivi scsi e il loro indice)


ho bruciato il cd(credo) !!!



:cry:

questo e' il verbose:
[deben@iron knopix]# cdrecord -v -dao -eject speed=16 dev=0,4,0 KNOPPIX_V3.3-2003-11-03-EN.iso
Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 J?rg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,4,0'
scsibus: 0 target: 4 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.5'
atapi: 0
Device type : Removable CD-ROM
Version : 2
Response Format: 2
Capabilities : SYNC LINKED
Vendor_info : 'WAITEC '
Identifikation : 'T-REX '
Revision : '4.27'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags : SWABAUDIO
Drive buf size : 1843200 = 1800 KB
FIFO size : 4194304 = 4096 KB
Track 01: data 699 MB
Total size: 803 MB (79:34.33) = 358075 sectors
Lout start: 803 MB (79:36/25) = 358075 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 4
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, low Beta category (A-) (2)
ATIP start of lead in: -12508 (97:15/17)
ATIP start of lead out: 359845 (79:59/70)
Disk type: Short strategy type (Phthalocyanine or similar)
Manuf. index: 22
Manufacturer: Ritek Co.
Blocks total: 359845 Blocks current: 359845 Blocks remaining: 1770
Starting to write CD/DVD at speed 16 in write mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Sending CUE sheet...
Writing pregap for track 1 at -150
cdrecord: Input/output error. write_g1: scsi sendcmd: retryable error
CDB: 2A 00 FF FF FF 6A 00 00 1F 00
status: 0x0 (GOOD STATUS)
resid: 63488
cmd finished after 26.179s timeout 200s
write track pad data: error after 0 bytes
BFree: 422 K BSize: 1800 K
Starting new track at sector: 0
Track 01: 0 of 699 MB written.cdrecord: Input/output error. write_g1: scsi sendcmd: no error
CDB: 2A 00 00 00 00 00 00 00 1F 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 21 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x21 Qual 0x00 (logical block address out of range) Fru 0x0
Sense flags: Blk 0 (not valid)
resid: 63488
cmd finished after 0.006s timeout 200s

write track data: error after 0 bytes
Sense Bytes: 70 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00
Writing time: 31.203s
Fixating...
Fixating time: 0.001s
cdrecord: fifo had 64 puts and 1 gets.
cdrecord: fifo was 0 times empty and 0 times full, min fill was 100%.


e poi fa l'eject!!

ma perche'!!!

ilsensine
14-11-2003, 12:04
Forse era difettoso il cd in se. Nel dubbio abbassa la velocità di scrittura.