Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
Old 11-07-2009, 08:30 AM   #1
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
Exclamation Restoring a full partition from DMG image

I wanted to expand the size of my OSX partition so i decided to make an image of it using Disk Utility and saved it in another Mac OS Journaled partition i created. The image creation went all good so i deleted the OSX partition and made another, bigger one

With Installation Disk booted i used Disk Utility to restore the image to the new partition but, BOOM:

Could not validate source - error 254

First of all, does anyone know why this is happening?

Now, i have installed osx to a different partition and currently:

I created another partition and i have the other one from before that i stored the DMG file. Im executing sudo dd if=/Volumes/MACCLN/MACOSX.DMG of=/dev/disk0s2 <-- which is the partition i want to restore my image to.

The progress is going reeaaaally slow. Does anyone know why? Activity monitor displays disk activity of ~2MB/s write. Which is going to take about 12 hours for my full ~90GB image to be restored.. Is that normal?

Will the dd copy of the image to the partition work? Will it going to appear any problems because of the different size of the new partition?

Thanks in advance people
EuphangeL is offline   Reply With Quote
Old 11-07-2009, 11:03 AM   #2
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
I've just discoverd some things:

In Disk Utility the image information at the bottom of the window says: Partition Map Scheme: No partition map

Why is that? Here i have to notice that my drive is MBR partitioned

And since i cant mount the image (propably because it cant find any partitions in it) i did the following:

sudo hdiutil attach /Volumes/MACCLN/MACOSX.DMG -nomount

and

sudo dd if=/dev/disk1 of=/dev/disk0s2

with disk0s2 being the new MACOSX volume which i have unmounted or else the dd gave me resource busy

Will this work? I still cant understand why dd is taking soooo long. The disk activity is just 2MB/s

The image file is 60GB by the way.
EuphangeL is offline   Reply With Quote
Old 11-07-2009, 02:08 PM   #3
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
How did you create the dmg file? This would go a long way in diagnosing its problem.
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 11-07-2009, 02:18 PM   #4
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
The dmg was created from Disk Utility from Installation Disk. So it was live, the partition was unused. I selected the partition and pressed new image and choose a destination

I also found this: http://developer.apple.com/Mac/libra...hdiutil.1.html

Maybe the convert image -format format -o outfile command can save anything? There is also a verb -pmap which adds a partition map.

What type of format should i choose?

UDRW - UDIF read/write image
UDRO - UDIF read-only image
UDCO - UDIF ADC-compressed image
UDZO - UDIF zlib-compressed image
UDBZ - UDIF bzip2-compressed image (OS X 10.4+ only)
UFBI - UDIF entire image with MD5 checksum
UDRo - UDIF read-only (obsolete format)
UDCo - UDIF compressed (obsolete format)
UDTO - DVD/CD-R master for export
UDxx - UDIF stub image
UDSP - SPARSE (grows with content)
UDSB - SPARSEBUNDLE (grows with content; bundle-backed)
RdWr - NDIF read/write image (deprecated)
Rdxx - NDIF read-only image (Disk Copy 6.3.3 format)
ROCo - NDIF compressed image (deprecated)
Rken - NDIF compressed (obsolete format)
DC42 - Disk Copy 4.2 image
EuphangeL is offline   Reply With Quote
Old 11-07-2009, 02:19 PM   #5
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
I would like to mention (if i didnt) that the partition scheme of the drive is MBR and not GUID..
EuphangeL is offline   Reply With Quote
Old 11-07-2009, 02:48 PM   #6
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
The image would have no partitioning scheme since it's an image of the Volume, not the drive. You do need to setup the destination drive using GUID partition map though. Once that's done, while booted from the Install DVD and from Disk Utility, select the menu item Images -> Scan image for restore… and locate the backup image. Once this is complete, you can use Restore to put the image back to the hard drive. No. You cannot boot Mac OS from a drive partitioned for only MBR.
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 11-08-2009, 06:00 AM   #7
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
Quote:
Originally Posted by Las_Vegas
The image would have no partitioning scheme since it's an image of the Volume, not the drive. You do need to setup the destination drive using GUID partition map though. Once that's done, while booted from the Install DVD and from Disk Utility, select the menu item Images -> Scan image for restore… and locate the backup image. Once this is complete, you can use Restore to put the image back to the hard drive. No. You cannot boot Mac OS from a drive partitioned for only MBR.

Hmm are you sure its about the drive being MBR and not GUID? The scan image for restore is not working anyway, it says "Unable to scan MACOSX.DMG. (Invalid argument)" And i think it will display the same error if i run the disk utility from the disk..
EuphangeL is offline   Reply With Quote
Old 11-08-2009, 04:35 PM   #8
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
Did you boot from the DVD before scanning the image. I just recently had problems trying to scan an image while booted normally, but it scanned okay from the DVD.

I did some tests with my own system and found I could boot an image restored to either GUID or APM, but got the "Don't" (circle-slash) when trying to boot the same image on MBR. This may be due to the fact that the image I'm experimenting with is a Bootable DVD Image and uses a couple of RAM disks in the process.

Can you mount that image while booted from DVD? If so, you could try a file-file copy by using Restore in Disk Utility with the mounted image as the Source and not checking the "Erase" checkbox.
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 11-08-2009, 05:03 PM   #9
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
I didnt but i would try. Im sure though that its 99% likely to fail because the image has no filesystem information and thats what the scan image seeks for i think (besides checksum).

Im pretty sure that the image is a block image of the Volume. I dont know how or if its supposed for disk utility to create a boot image if you choose to make a backup of an entire volume. Maybe i had the volume unmounted when i created the image and thats why it went that way

Anyway currently im doing:

sudo dd if=/dev/disk1 of=/dev/disk0s2 bs=4096

With block size being 4096 as the default block size of HFS+ is 4096. Also i have both the image and the volume attached but unmounted.

I dont know if there is gonna be an issue because of the different (bigger) size of the destination volume than from the volume the image is made from. I dont know exactly where volume size, file system information is stored.. Into MBR (in my example) or into the volume itself?

Im gonna post results
EuphangeL is offline   Reply With Quote
Old 11-08-2009, 05:12 PM   #10
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
All images are block images. If the image has no filesystem then it's an empty file or currupted filesystem. It doesn't matter if the drive is mounted at the time of creation or not. The same data is copied. I've had some luck repairing images with DiskWarrior and in one case actually booting a Tiger utility disk.

'dd' does a block transfer of data and as a side effect, will copy any filesystem errors along with it. It's exactly the same results as doing a Restore from Disk Utility with the Erase function checked.
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 11-08-2009, 05:26 PM   #11
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
Normaly, can you mount an image created by a Volume? Because yes, since i cant mount it because of (unmountable file system) maybe the image is whole corrupted or the file system is corrupted

Im gonna try DiskWarrior too. Too sad there is no demo version

Last edited by EuphangeL; 11-08-2009 at 05:34 PM.
EuphangeL is offline   Reply With Quote
Old 11-08-2009, 08:17 PM   #12
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
Yes. Normally a volume image will mount without issue.

Trust me. DiskWarrior is well worth the cost and will come to your rescue more often than you think.
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 11-09-2009, 05:59 AM   #13
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
Nope, dd restore didnt work either. All i got was an unmountable disk with Invalid B-Tree size error when i was trying to verify and/or repair it using Disk Utility.

Disk warrior couldn't fix it too. In fact, it would fix it, but the output volume it creates have 0 files and 0 folders. Dont know what to think. Is the image whole corrupted? If not, and my data is in fact in there, is there any way i can possibly recover my data? Im currently archiving the image into an external drive since i will have to clean install everything
EuphangeL is offline   Reply With Quote
Old 11-09-2009, 06:59 PM   #14
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
You could try scanning the image with DataRescue3 for free. If it finds your files, then pay for it to get them all. The fact that DiskWarrior was unable to find directory information, your only alternative is to do a full block scan (hours!).
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 11-10-2009, 05:28 AM   #15
EuphangeL
Prospect
 
Join Date: Nov 2009
Posts: 9
Quote:
Originally Posted by Las_Vegas
You could try scanning the image with DataRescue3 for free. If it finds your files, then pay for it to get them all. The fact that DiskWarrior was unable to find directory information, your only alternative is to do a full block scan (hours!).

DataRescue 3 does a full block scan?
EuphangeL is offline   Reply With Quote
Old 11-10-2009, 01:28 PM   #16
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
This is why I recommended DataRescue 3.
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.