burning CD-Roms over the network

I found this very useful, to pull a backup from a host out of physical reach.
One way to remotely burn CDs is by using rscsi[1] from within cdrecord[2]
cdrecord dev=REMOTE:user@host:0,0,0 speed=0 .... theimage.iso
somehow i couldn't get this working through an ssh tunnel. The ssh-only method proved to be more successful

we're behind a NAT, so first init. a tunnel

ssh -l user -R 4001:localhost:22 remotehost

on the remotehost we can now do
ssh -l localuser -p 4001 localhost "cdrecord dev=0,0,0 speed=0 -v -eject -"
< theimage.iso

if cdrecord says something like ...
Track 01: 0 of 168 MB written.
/usr/bin/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 03 00 00 00 00 0A 00 00 00 00 73 03 00 00
Sense Key: 0x3 Medium Error, Segment 0
Sense Code: 0x73 Qual 0x03 (power calibration area error) Fru 0x0
Sense flags: Blk 0 (not valid)

... chances are, that DMA is not enabled on the cdrom device
hdparm -d1 -c1 /dev/hdX
(where X is the device)

another variant is to pipe mkisofs output directly to cdrecord

getting data-track size first
mkisofs -r -J -q -print-size /dir/with/data

then:
mkisofs -r -J [moreoptions] /dir/with/data |
ssh -l localuser -p 4001 localhost "cdrecord dev=0,0,0 speed=0 -tszie=XXXs -v -eject -"
where XXX is the output of the formerly issued mkisofs command

In order to make cdrecord suid root and executable for other users:
chmod 4755 `which cdrecord`

obviously this works without the portforwarding as well ...
Permalink
Posted in:

Comments

No new comments allowed (anymore) on this post.

LiveSearch

Blogroll

Relayed

Archive

Buttons

  • RSS 2.0 Feed
  • Latest comments
  • XHTML 1.0 compliant
  • Powered by Flux CMS
  • Powered by Popoon

Login


BXCMSNG Errors:
Notice[8] Undefined index: 0 in [BX_PROJECT_DIR]/inc/bx/plugins/blog/categories.php at line 59.