Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Essentially what I want to do is create an image of a filesystem then write that filesystem to a flash drive. Currently I am trying to create an hfs filesystem in the form of a file on an ext3 filesystem. I am then using dd if=image of=/dev/sdb1. I then plug the drive into my mac and it tells me that it cannot repair the partition.

How can I accomplish this? I believe it has something to do with partition information not being on the drive but I am not sure?

share|improve this question
add comment

2 Answers 2

Currently I am trying to create an hfs filesystem in the form of a file on an ext3 filesystem

Usually this takes the form of a DMG file originating on a mac. It sounds like you're making a disk image in Linux and then:

I then plug the drive into my mac

So you're plugging an ext3 volume into your mac? That would explain why:

it tells me that it cannot repair the partition.

Your mac can't read ext3 volumes. Maybe you should format the drive for FAT, and then try this again.

share|improve this answer
add comment

You can do this using Apple's Disk Utility (/Applications/Utilities/Disk Utility) or using hdiutil. This will create a .dmg disk image, which you can then restore onto another disk/storage device with Disk Utility or hdiutil. You can restore it on to a partition that is a different size than the original (as long as it is big enough to hold the contents). The image can also be stored as a file in any other filesystem that can be accessed by your Mac, and the file can be mounted simply by opening it in the Mac Finder.

If you want to use dd and copy the raw filesystem data directly, the destination partition should be exactly the same size as the source partition. Also you will probably want to copy from/to the device containing the partition (e.g. /dev/disk0s2) and not the whole disk (e.g. /dev/disk0). I'm not sure whether this will work going to a flash drive.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.