Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

unable to scan invalid argument

I booted off my 10.6 install DVD and created an image of my old hard drive. I then installed a new hard drive, booted of the install DVD, ran Disk Util, and then tried to restore the image from an external usb drive (.dmg). I get this error message "unable to scan invalid aurgument" .... man this should be easier than this!

Macbook, Mac OS X (10.5.6)

Posted on Jan 29, 2010 4:50 AM

Reply
Question marked as Best reply

Posted on Feb 5, 2010 8:46 AM

I'm having nearly the same problem. I need to restore my wife's Bootcamp contents. Fortunately I had TimeMachine to restore her Mac partition. Have tried 3 Disk Image formats i.e. "Read Only, compressed & Read/Write. Have had the Disk Images on external USB and on desktop. Each time I get "Unable to scan image "Invalid Argument"". I have seen another message once or twice. Any ideas on how to restore the contents to the BootCamp partition?
7 replies
Question marked as Best reply

Feb 5, 2010 8:46 AM in response to midnight1111

I'm having nearly the same problem. I need to restore my wife's Bootcamp contents. Fortunately I had TimeMachine to restore her Mac partition. Have tried 3 Disk Image formats i.e. "Read Only, compressed & Read/Write. Have had the Disk Images on external USB and on desktop. Each time I get "Unable to scan image "Invalid Argument"". I have seen another message once or twice. Any ideas on how to restore the contents to the BootCamp partition?

Mar 20, 2010 9:33 PM in response to Merged Content 1

I have the exact same problem. I am booting from the Snow Leopard install DVD in order to run Disk Utility. I already imaged my old 80 GB internal hard drive to an external 500 GB USB drive and now have a new 320 GB internal drive installed and it won't let me restore the .dmg file from that external drive. Same errors as WHYDAVEWHY.

Mounting the image doesn't let you scan it. It gives you the error: Unable to scan "imagename.dmg." (Resource temporarily unavailable)

If you unmount the image it still gives you the standard error: Unable to scan "imagename.dmg." (Invalid argument)

If I try to run the "sudo asr -noverify -source /Volumes/externaldrive/imagename.dmg -target /Volumes/internaldrive" command I get "command not found" since sudo isn't on the Snow Leopard install DVD or the limited boot OS doesn't understand what sudo means.

I'm about to give up and buy some software to do this but this is not how it should be. It shouldn't be this difficult and problematic to simply swap a hard drive in a Macbook.

Right now I just found "asr" in the /usr/sbin folder so I am now running the following command which appears to be doing something. I'll post if it worked or not:
asr -noverify -source /Volumes/externaldrivename -target /Volumes/internaldrivename

FYI, I had to quit Disk Utility, then open Terminal from the Utilities menu on the Snow Leopard install screen, then in Terminal I did a: cd / <ENTER> and then: cd Volumes <ENTER> and then: ls <ENTER> or: ls -l <ENTER> to find the hard drive names that are available.

What a hassle. Not very cool, Apple.

Mar 21, 2010 12:02 AM in response to Beastron

Took over 2 hours to do the "asr" command I mentioned above and then ended with a strange message: "asr: did not copy blessed information to target, which may have missing or out-of-date blessed folder information."

That scared me a little until I google'd it and found the answer which I hope will work. You literally type in:
bless -folder /Volumes/InternalHardDriveVolumeName/System/Library/CoreServices
(where InternalHardDriveVolumeName is the target path from the asr command above)

This apparently should work. I'll post if it does or doesn't. I'm about to reboot to try booting to the internal hard drive now.

Mar 21, 2010 3:00 AM in response to Beastron

No luck. I tried the bless command 2 different ways (once with --setBoot) and all that happens is the Macbook reboots and shows the Apple logo and then after some spinning of the progress wheel, the logo disappears and is replaced with a circle with a line through it. Researching that doesn't help much so I'm going to erase my internal hard drive and try it once more - manually using the asr command from Terminal off the Snow Leopard boot disk to try to restore my 80 GB old hard drive .dmg file which is stored on my external USB drive.

This has been a huge waste of time. I'm about to give up.

Mar 21, 2010 1:08 PM in response to Beastron

I GOT IT WORKING!!!

It took hours of trying but I figured out the right steps.

You HAVE to partition your new internal hard drive properly as a GUID partition using Disk Utility BEFORE you try to restore the image. Originally I restored the .dmg file to my internal drive thinking it would create the partition as needed but that was not the case. It would never boot, just give the circle with a line through it, like a prohibited sign. This method works so I'm done!

To summarize:
1. With your old/existing hard drive in your Macbook that you want to replace boot it up as normal, then connect an external drive with more free space than your internal hard drive has (I used a 500 GB external Western Digital USB hard drive to backup my 80 GB internal drive) and ensure it detects properly, then insert Snow Leopard upgrade/install DVD.
2. In Finder, go to Applications, Utilities, Disk Utility.
3. Find your external hard drive on the left hand side. Click the Erase tab. Select Mac OSX Extended (Journaled) then click the Erase button. This will create a GUID partition of the full size of your external drive. (Yes it will erase everything on your external drive so plan for that!)
4. When it is done you can restart and hold down the "C" key until the Snow Leopard install begins which can take a few minutes.
5. When you finally see the OSX Snow Leopard install screen. Click on the right arrow button to proceed only to the next screen and then wait for the Utilities menu to appear up top and then click on it and then click on Disk Utilities.
6. Create a disk image (.dmg file) of your internal hard drive by clicking New Image. Source is your hard drive volume (not the hard drive model, but the indented mounted named hard drive, usually "Macintosh HD". Destination is your external drive's named volume. For the image type I chose read/write instead of Compressed which was the default. I thought read/write might create the image faster. It may have caused more grief because I wasn't able to later use the nice GUI interface to restore my disk image! (see below or above postings)
7. When it is done imaging, quit Disk Utility then quit the OSX Snow Leopard install. It will tell you it would like to restart. That's what you want, but as it restarts, hold your power button down so it actually turns off.
8. Swap out your hard drive (eject battery, loosen 3 screws, take out that L bracket, put the plastic tab straight out to pull the hard drive out, use a small Torx to remove the 4 screws housing the drive, swap drives and reverse the order to get it ready to roll).
9. Start up your computer holding in the "C" letter again until it boots to the Snow Leopard install.
10. Go into Utilities, Disk Utility again and this time you want to erase your newly installed internal hard drive. Again, make it the full size and make it the same type: Mac OSX Extended (Journaled) and then hit the erase button.
11. When that is done erasing, you want to Restore the disk image from your external drive onto your internal drive.
12. If the Restore method doesn't work (I got a warning that my disk image (.dmg file) had to be imagescanned and so when I hit the Images menu and clicked on scan image it gave me an invalid argument and wouldn't scan the image. I researched this problem extensively and found out that one website tells you to hit the Utilities menu and call up Terminal and type the following command: sudo asr -restore -noverify -source /Volumes/ExternalDriveName/imagename.dmg -target /Volumes/InternalDriveName
but sudo was not found, so I researched sudo and found that it might not be needed so I tried it without (-noverify skips the imagescan requirement):
asr -restore -noverify -source /Volumes/ExternalDriveName/imagename.dmg -target /Volumes/InternalDriveName

---
Side note:
If you don't know the names of your external or internal drives, type in terminal:
cd /Volumes <ENTER>
ls -l <ENTER>

That will show all your mounted/attached volumes.

and this took a long time for 80 GB and at the end it gave me a

I later found that without the -noverify option, I got a message saying that a read/write DMG cannot be verified and it gave the "invalid argument" error which explains a little better than the Disk Utility interface did as to WHY the restore function wouldn't work.
---
13. At the end of the restore, you get an ominous message saying:
asr: did not copy blessed information to target, which may have missing or out-of-date blessed folder information.

That is okay actually. Just type:
bless -folder /Volumes/InternalDriveName/System/Library/CoreServices

14. then type: reboot <ENTER>
15. That is it.

It should boot to your new, upgraded hard drive. You can hold the OPTION key down while booting to get a choice as to which boot device you want to use (Hard drive or DVD in this case).

If you can't get it to work, that's really unfortunate because this has taken me over 7 hours to figure out. Next time I'll be paying somebody to do this.

Good luck all!

Mar 23, 2010 6:12 PM in response to Beastron

Thanks for the detailed info! I talked to a "Mac Genius" at an Apple Store the other day, and he helped me straighten out the confusion over using Snow Leopard with .dmg files; according to him, Apple Support Article #HT1553 "Mac OS X v10.5, v10.6: How to back up and restore your files" is incorrect in its description of using Snow Leopard's Disk Utility to backup and then restore a hard drive via a .dmg file. He said that the steps listed only applied to OS 10.5, not 10.6, and that the information needs to be corrected in the article.

Like many people who have posted on the Apple Forum, I too followed the steps using Snow Leopard, to backup my data as a .dmg file, only to find that it would not restore to Snow Leopard. In my case, I needed to install a larger hard drive in my MacBook Pro laptop, so I backed up my current system to an external drive via Disk Utility, installed the new hard drive, then tried to restore my data from the external hard drive with no luck.

What I had to end up doing was to buy an external hard drive case for my old internal drive (which still had all the original data on it), install Snow Leopard onto the new internal MacBook Pro drive, create a temporary user account, and then use Migration Assistant to restore all the data from the original drive to the new one. (The reason I had to reinstall Snow Leopard instead of just booting up from the install DVD, was that the install DVD does not give you access to Migration Assistant; only Disk Utility.) In Migration Assistant, I selected 'From another Mac' since the hard drive was my original one, and would be seen as another Mac by the new one. Everything restored fine. I did need to run software update a couple of times and reinstall QuickTime Player 7 from the Snow Leopard Install DVD though (I still prefer QuickTime 7 since QuickTime X still lacks many features.)

If you want to back up your entire system, and then restore it later, use the 'Time Machine' application. First click the <Options> button in Time Machine and make sure you do not have any folders or files being excluded from backups, then make a backup. Now you will have a backup that can restore to Snow Leopard. (Keep in mind that you will still need to have Snow Leopard installed on the Mac that you are restoring to though; this is not a "bootable" backup like my old MacBook Pro drive was.)

NOTE: If you have a lot of heavy-duty apps like Final Cut Pro, etc., an Apple tech told me that you would still need to reinstall them after doing a Time Machine restore. If that is the case, and you are restoring from an old hard drive to new larger hard drive, here are the steps I used to do that (without using Time Machine):

1) Remove the old hard drive and install the new one. Use Disk Utility to format the new hard drive:
a. Open Disk Utility (under Applications/Utilities).
b. Highlight the new drive on the left.
c. Click the 'Erase' tab.
d. Format: Mac OS Extended (Journaled)
e. Name the volume under the hard drive 'Macintosh HD'.
f. Click <Erase>.
g. To make sure the drive was formatted correctly, click the 'First Aid' tab, then click <Verify
Disk>. When the process has finished, proceed to the next step...
2) Put the old hard drive in an external case (preferably with a FireWire 400 or 800 connection).
3) Install Snow Leopard on the new internal drive.
4) Make sure that Time Machine is turned off.
5) You will be using Migration Assistant to restore the data to the new drive, but you cannot migrate an account with the same user account name as your current one, so you will need to first create a temporary account, log out, then log in as the temporary account:
a. Click on the 'System Preferences' icon.
b. Select 'Accounts'.
c. Click on the lock icon in the lower left corner to unlock it.
d. Enter your password and click <OK>.
e. Click the <+> button.
f. Select the following (example):
- New Account: Administrator
- Full Name: Boo Boo
- Account name: booboo
- Password: temporary
- Verify password: temporary
- Password hint: temporary
g. Click <Create Account>.
h. Click <Turn Off Automatic Login>.
i. Click the Apple icon in the upper left corner of your display and select 'Log Out (name).
j. Click the <Log Out> button.
k. Select 'Boo Boo'
l. Password: temporary
m. Click the <Log In> button.
6) A prompt will appear. Click <Decide Later>.
7) Now, go to Applications/Utilities, and open 'Migration Assistant'.
8) Click <Continue>.
9) Password: temporary.
10) Click <OK>.
11) Select 'From another Mac'.
12) Click <Continue>.
13) Click <Use FireWire> if this is what you are using. (If using something else, click that.)
14) Wait for your Mac to calculate the size of the files to be loaded.
15) Once this has finished, click <Continue>.
16) Select 'Replace the existing user account with the one you're transferring'.
17) Click <Next>.
18) Allow about an hour (more or less) for the transfer if using FireWire400.
19) Log out of the Boo Boo account by clicking on the Apple icon (upper left corner) and logging out.
20) Log back in by selecting your normal account name.
21) Delete the temporary account:
a. Click on the 'System Preferences' icon.
b. Select 'Accounts'.
c. Click on the lock icon in the lower left corner to unlock it.
d. Enter your password and click <OK>.
e. Select the 'Boo Boo' account.
f. Click the <-> button to delete it.
g. Select 'Delete the home folder'.
h. Click the lock icon to lock it.
22) If you still use QuickTime 7, you may need to reinstall it from the original Snow Leopard Install DVD:
a. Insert the DVD.
b. Open the 'Optional Installs' folder.
c. Double-click 'Optional Installs.mpkg'.
d. Select 'QuickTime 7'
e. Click <Continue> (QuickTime 7 will be installed into the 'Utilities' folder.)
23) Click the Apple icon and select 'Software Update. (You may need to do this twice to make sure you get all the latest Snow Leopard updates.)
24) Once everything has been updated, go to Finder/Macintosh HD/Users and delete the 'Deleted Users' folder.

unable to scan invalid argument

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.