dd-gui icon indicating copy to clipboard operation
dd-gui copied to clipboard

Mac OS 10.9 Mavericks - not compatible

Open gingerbeardman opened this issue 11 years ago • 18 comments

app fails on 10.9.0 (mavericks)

from: /Users/me/Downloads/MinePeon-0.2.4.1.img
size: 1977614336 bytes

  to: /dev/disk1

touch: /dev/disk1: Inappropriate file type or format
/Users/me/Downloads/dd-gui.app/Contents/MacOS/dd.command: line 16: /dev/disk1: Permission denied

Done! You may close this window.

logout

gingerbeardman avatar Nov 11 '13 23:11 gingerbeardman

Actually works fine.

gingerbeardman avatar Nov 12 '13 00:11 gingerbeardman

Ran into a similar issue while trying to dupe a Linux image onto a microsd using my MacBook Pro's built-in card reader (OS X 10.8.5):

Last login: Wed Dec  4 08:38:02 on ttys001
kgreenwell-1894:~ kgreenwell$ /Volumes/Data/Downloads/dd-gui.app/Contents/MacOS/dd.command ; exit;

from: /Volumes/10.7/MPIC-HC-32G-1.0.22.0.img
size: 31914983424 bytes

  to: /dev/disk1

touch: /dev/disk1: Inappropriate file type or format
/Volumes/Data/Downloads/dd-gui.app/Contents/MacOS/dd.command: line 16: /dev/disk1: Permission denied

Done! You may close this window.

logout

Ended up getting the job done with "Win32 Disk Imager" via VMware Fusion/Win 7 Pro and the Mac's built-in card reader but I'd really rather not :)

asterizk avatar Dec 04 '13 13:12 asterizk

The solution is to add sudo to line 121 of the ddgui file. I will push a change with this very soon

gingerbeardman avatar Dec 04 '13 14:12 gingerbeardman

Fixed. Please download latest version which now includes the sudo fix.

gingerbeardman avatar Dec 04 '13 14:12 gingerbeardman

Wow, thanks for the quick response. Will give it a shot in a little bit (card is still imaging in the Windows VM) :)

asterizk avatar Dec 04 '13 14:12 asterizk

It was on my todo list and you gave me a kick up the rear. :)

gingerbeardman avatar Dec 04 '13 15:12 gingerbeardman

Hmm, different, but no dice.

from: /Volumes/10.7/MPIC-HC-32G-1.0.22.0.img
size: 31914983424 bytes

  to: /dev/disk1

Password:
/Volumes/Data/Downloads/dd-gui-master/dd-gui.app/Contents/MacOS/dd.command: line 16: /dev/disk1: Permission denied

Done! You may close this window.

asterizk avatar Dec 04 '13 16:12 asterizk

Hmm. Perhaps more sudo is required.

Can you try editing the ddgui file to add sudo on the lines that unmount/mount the target device?

gingerbeardman avatar Dec 04 '13 17:12 gingerbeardman

Ok, think I've got it. See dd.command, line 16, which reads (in my case):

sudo dd if=/Volumes/10.7/MPIC-HC-32G-1.0.22.0.img | /Volumes/Data/Downloads/dd-gui-master/dd-gui.app/Contents/MacOS/bar -s 31914983424 > /dev/disk1

The problem is that the redirection to /dev/disk1, is performed by a shell which does not have root access. As written, 'sudo' above only applies to the 'dd' command.

One solution that seems to work is to do the redirection inside a just-in-time shell in which every command is run as root, as thus:

sudo dd if=/Volumes/10.7/MPIC-HC-32G-1.0.22.0.img | sudo sh -c '/Volumes/Data/Downloads/dd-gui-master/dd-gui.app/Contents/MacOS/bar -s 31914983424 > /dev/disk1'

I've tested this line on its own and it seems to eliminate the problem. Haven't investigated exactly what in the codebase would need to change in order make this happen (presumably dd.command is dynamically generated/edited).

Reference: http://stackoverflow.com/questions/82256/how-do-i-use-sudo-to-redirect-output-to-a-location-i-dont-have-permission-to-wr

asterizk avatar Dec 04 '13 18:12 asterizk

Ack... just realized that ends up producing a weird double-password prompt:

kgreenwell$ sudo dd if=/Volumes/10.7/MPIC-HC-32G-1.0.22.0.img | sudo sh -c '/Volumes/Data/Downloads/dd-gui-master/dd-gui.app/Contents/MacOS/bar -s 31914983424 > /dev/disk1'
Password:Password:

Solution is to get rid of the first "sudo", which shouldn't be necessary to read the source image:

kgreenwell$ dd if=/Volumes/10.7/MPIC-HC-32G-1.0.22.0.img | sudo sh -c '/Volumes/Data/Downloads/dd-gui-master/dd-gui.app/Contents/MacOS/bar -s 31914983424 > /dev/disk1'
Password:

asterizk avatar Dec 04 '13 18:12 asterizk

Thanks @asterizk for investigating. If you want to do send a pull request I will happily merge.

Also, do you think the two sudo I put in the ddgui file are required?

gingerbeardman avatar Dec 05 '13 12:12 gingerbeardman

Hi gingerbeardman, I've modified line 121 to works with OS X 10.9 Mavericks. Thanks

morganfw avatar Jul 16 '14 18:07 morganfw

Cheers. I'll pull it soon

On Wednesday, 16 July 2014, Morgan [email protected] wrote:

Hi gingerbeardman, I've modified line 121 to works with OS X 10.9 Mavericks. Thanks

Reply to this email directly or view it on GitHub https://github.com/gingerbeardman/dd-gui/issues/1#issuecomment-49206335.

gingerbeardman avatar Jul 16 '14 19:07 gingerbeardman

Closed thanks to @morganfw and pull request #2

gingerbeardman avatar Aug 04 '14 18:08 gingerbeardman

Reopened

gingerbeardman avatar Aug 04 '14 23:08 gingerbeardman

Sorry for the mistake, I've corrected and resubmitted pull request

morganfw avatar Aug 07 '14 17:08 morganfw

Did not work on Yosemite either. A terminal window appeared then immediately disappeared. Worked fine with dd on the commandline. No error messages, but a 0 byte disk image was produced.

xyproto avatar Dec 22 '14 22:12 xyproto

There's a pull request by @morganfw I've not got round to checking that fixes this problem. Try grabbing that version for now @xyproto

gingerbeardman avatar Dec 22 '14 22:12 gingerbeardman