-2

I get messed up on step #3, how do I turn it into a .img file? Also would like help with rest of instructions pls

2
  • 5
    Can you please provide us with a link to the instructions you are following? We have no way of knowing what "step #3" is. Feb 15, 2013 at 5:23
  • 1
    @GeorgeEdison It's almost certainly this procedure. So while an an edit clarifying this would be helpful, we don't need to close this. Feb 15, 2013 at 6:11

1 Answer 1

2

I presume you're having trouble with step 3 of How to create a bootable USB stick on OS X, which says you should run

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso

with appropriate substitutions for filenames. It also notes:

OS X tends to put the .dmg ending on the output file automatically.

You opened the Terminal (sometimes called Terminal.app, and located in the Utilities subfolder of the Applications folder), so you can enter commands. Suppose you downloaded the ISO image to your Downloads folder. Suppose further (for this example) that it is the 64-bit Mac image of Ubuntu 12.10. That file is called ubuntu-12.10-desktop-amd64+mac.iso. (If it's not that, just get its name by looking at it in the Finder.)

You want to create ubuntu-12.10-desktop-amd64+mac.dmg from it, also in the Downloads folder.

~ represents your home folder (which on OS X is /Users/your-username). The / character is the directory delimiter--that means that an expression of the form X/Y means the folder called Y, which is a subfolder of the folder called X.

So, you will run:

hdiutil convert -format UDRW -o ~/Downloads/ubuntu-12.10-desktop-amd64+mac ~/Downloads/ubuntu-12.10-desktop-amd64+mac.iso

Alternatively, you could use the cd command to go into the Downloads folder, and then the hdiutil command you'd run would be shorter:

cd ~/Downloads
hdiutil convert -format UDRW -o ubuntu-12.10-desktop-amd64+mac ubuntu-12.10-desktop-amd64+mac.iso

But being able to specify the full paths is especially helpful if you want to create the DMG image somewhere other than where you downloaded the ISO image. For example, if you downloaded the ISO image to your Downloads folder but you want to make the ISO image on your desktop:

hdiutil convert -format UDRW -o ~/Desktop/ubuntu-12.10-desktop-amd64+mac ~/Downloads/ubuntu-12.10-desktop-amd64+mac.iso

The newly created file will probably have a .dmg suffix--if it does not, you can give it one. (You can just rename it in the Finder.) You can also move it wherever you like, so it doesn't much matter where you create it, so long as you know where you're creating it.

Subsequent Steps

In case you have any trouble with the later steps too, here's a bit of explanation.

The diskutil list command lists disks that are attached, but the output is pretty technical. You won't necessarily know what names, like disk1, disk2, ..., correspond to what disks. So you run diskutil list, then plug in your USB flash drive, then run diskutil list again. Whatever item is new in the list is your USB flash drive.

To write the newly created .dmg image to it properly, it's necessary that it be attached but unmounted. To achieve this, unmount it:

diskutil unmountDisk /dev/disk2

Unless the USB flash drive's name in the list really was disk2, make sure to replace the 2 with whatever other number is correct!

To write the .dmg file to the USB flash drive, assuming the file is called ubuntu-12.10-desktop-amd64+mac.dmg and located in your Downloads folder, I recommend running:

cd ~/Downloads
sudo dd if=ubuntu-12.10-desktop-amd64+mac.dmg of=/dev/rdisk2 bs=1m

Just make sure to replace the 2 with the correct number! If you put in the wrong number, you can write the image to the wrong drive, and it would overwrite whatever files are already there, destroying them!

Writing the image to the flash drive with dd is step 8 in the procedure. If problems occur, please refer to the procedure itself, which explains them. (If you get this far, you may well be able to follow along; but if you do have any more difficulty, please feel free to ask!)

The procedure explains how to properly eject the USB flash drive (it's not mounted, so there's no icon on the desktop to drag to the trash/eject icon in the dock), and how to boot your computer from it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .