question for dfedick
Hi dfedick,
I tried your approach just from the command line with:
#!/bin/bash
#########
# Variables #
#########
diskName=$(drutil status | grep "Name:" | awk '{print $4}')
userName=jjohnson
imageName=myimage
######
# Body #
######
diskutil unmount ${diskName}
dd if=${diskName} of=/Users/${userName}/Desktop/${imageName}.iso
diskutil mount ${diskName}
I get back:
dd: /dev/disk2: Input/output error
41849+0 records in
41849+0 records out
21426688 bytes transferred in 21.626039 secs (990782 bytes/sec)
Macintosh
esktop jjohnson$ diskutil mount ${diskName}
Volume failed to mount
FYI, when I do drutil status I get:
Macintosh
esktop jjohnson$ drutil status
Vendor Product Rev
MATSHITA DVD-R UJ-85J FCQA
Type: CD-R Name: /dev/disk2
Sessions: 1 Tracks: 1
Write Speeds: 8x, 24x
Overwritable: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Free: 75:24:34 blocks: 339334 / 694.96MB / 662.76MiB
Space Used: 02:01:35 blocks: 9110 / 18.66MB / 17.79MiB
Writability: appendable
Any ideas what is occurring here? Thanks a ton. I'd love to see being able to create an automator script for this!
I just run this from the command line. You can run it out of Automater as previously stated. (Copy everything between dashes.. and change $userName and $imageName...
---------------------------------------
#!/bin/bash
#########
# Variables #
#########
diskName=$(drutil status | grep "Name:" | awk '{print $4}')
userName=enterUsernameHere
imageName=enterImageNameHere
######
# Body #
######
diskutil unmount ${diskName}
dd if=${diskName} of=/Users/${userName}/Desktop/${imageName}.iso
diskutil mount ${diskName}
---------------------------------------