Using dd I'm getting a Resource Busy error

JoshFink

macrumors regular
Original poster
Aug 3, 2007
114
1
Atlanta, GA
Hello, I'm trying to restore an old Hard Drive image OS.dmg to a usb hard drive that I have.

I'm using the command:

dd if=/Users/Shared/OS.dmg of=/dev/disk5 bs=1m

And I'm getting

dd: /dev/disk5: Resource busy

What would cause this error? I'm not sure why it's "busy"

Thanks

Josh

PS.. I get the exact same thing when i try to do it in DiskUtility
 
  • Like
Reactions: rvicente

mikehardy

macrumors newbie
Nov 10, 2007
1
6
I just did this - what I did may work for you

In order to overwrite all the information on the disk, you have to make sure the mac OS isn't using it first

Open the DiskUtility.app, and on your USB hard drive, unmount any of it's partitions. Do not eject the USB hard drive.

Right click on the hard drive in the DiskUtility and get it's Identifier from the Information tab.

Now take your image, and the identifier, and put it all together with something like this, on the command line in terminal:
dd if=<your image file> of=/dev/<disk identifier>

That worked for me putting the diskboot.img bootable Linux image file onto a USB hard drive that had the identifier disk1 by doing dd if=/Users/mike/diskboot.img of=/dev/disk1

good luck
 

Sarthak Varshney

macrumors newbie
Sep 27, 2015
1
0
I just did this - what I did may work for you

In order to overwrite all the information on the disk, you have to make sure the mac OS isn't using it first

Open the DiskUtility.app, and on your USB hard drive, unmount any of it's partitions. Do not eject the USB hard drive.

Right click on the hard drive in the DiskUtility and get it's Identifier from the Information tab.

Now take your image, and the identifier, and put it all together with something like this, on the command line in terminal:
dd if=<your image file> of=/dev/<disk identifier>

That worked for me putting the diskboot.img bootable Linux image file onto a USB hard drive that had the identifier disk1 by doing dd if=/Users/mike/diskboot.img of=/dev/disk1

good luck
thank you so much!
it helped!!
 

No_GT31

macrumors newbie
Apr 6, 2016
1
0
I just did this - what I did may work for you

In order to overwrite all the information on the disk, you have to make sure the mac OS isn't using it first

Open the DiskUtility.app, and on your USB hard drive, unmount any of it's partitions. Do not eject the USB hard drive.

Right click on the hard drive in the DiskUtility and get it's Identifier from the Information tab.

Now take your image, and the identifier, and put it all together with something like this, on the command line in terminal:
dd if=<your image file> of=/dev/<disk identifier>

That worked for me putting the diskboot.img bootable Linux image file onto a USB hard drive that had the identifier disk1 by doing dd if=/Users/mike/diskboot.img of=/dev/disk1

good luck

Thank you!! it works for me!!

i had to use "sudo diskutil unmount /dev/diskXsX" and then my dd worked!
 

e.d.d.i.e.

macrumors newbie
Feb 5, 2017
1
0
Worked great for me! Thank you very much. Been having trouble getting a live bootable USB created on a Mac. All good now though.
 

nomcebo_manzini

macrumors newbie
Nov 18, 2019
1
0
Make that 12 Years…. I'm a longtime PC user, very sporadic linux user … and maybe I made a dopey decision when I bought an old Mac Mini to keep my "risk" down. Money risk is/was limited to < $100, which I'm glad to say is almost small change for me…. But BOY, the risks of assuming that Apple is at least as good as Microsoft or any decent flavor of Linux in terms of NOT WILLFULLY making you wish your own memory and the internet's could/would be scrubbed when you buy a modern device … AND the heck with you if you're using an old one … ARE HIGH INDEED. Using a Terminal should be almost foolproof IF you type right. This proves otherwise. I know Apple had to fiddle with the firmware at least twice because they didn't really test the software (OS mostly) sufficiently before doing what (the only thing ?) they do well - sell the suckers (ambiguity VERY intentional) . . . Well, the good news is that I've been forced to this conclusion in less than a month and at low cost. My USB is blinking away getting "prepped" with Lubuntu. Sure hope I can now boot using it - I'm expecting trouble! - and I'm left scratching my head how they got to be (by several measures) the biggest company in the world.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.