My main computer is an old MacBook Pro. I often download Linux ISOs to install on other computers. In recent Debian-esque releases this is actually really simple.
1. I find it quicker and easier to install from USB so first insert a USB pen / stick of some sort.
Note: This USB stick will be erased, so don’t use one with data that you need to keep!
2. Next we need to find out which number has been assigned to the USB stick. If you only have one disk in your Mac then the USB will usually be disk1, but always check first. (Note: Disks are numbered from zero, so your internal drive should be disk0) On your Mac open Disk Utility, which is located within Applications / Utilities. (See Image)
Select the USB stick from the lefthand window and then click the Info button which is on the toolbar. (See Image)
You will get a pop up window with loads of information about the device. We only need the Disk Identifier. Make a note of this for later.
3. To allow us to write data to the USB stick we need to unmount any volumes currently on there. (see image)
4. Now comes the actual writing. First locate the Terminal application, again within Applications / Utilities. (see image)
5. Remember to change the code to match your Disk Identifier from earlier. There are a few things to note about the following command.
- sudo – allows you to run dangerous commands, so will require an administrator password
- Instead of typing the location of the ISO file you can just drag the ISO onto the terminal when required.
- “if” means input file (in this case the ISO file), “of” means output file (the USB stick)
- When we found out the Disk Identifier, it was disk1. That will work in the command, but we use rdisk1 instead, which gives us raw access to the disk. This may not be necessary, but it works for me.
There is a lot of discussion about block sizes, but I find 4MB is reasonable for writing ISOs to USB. In Linux we often type bs=4M, however the Mac prefers it like bs=4096 instead. It’s the same thing, just expressed differently.
sudo dd if=[drag iso here] of=/dev/r[disk number] bs=4096; sync
sudo dd if=/Users/dan/Desktop/linux.iso of=/dev/rdisk1 bs=4096; sync
If you’ve got it right, you shouldn’t get any feedback until it finishes. Your USB stick may have a blinking LED whilst the data is being written. For reference the 200MB debian-netinst ISO took just over a minute to write.
Once complete you should get something like:
48896+0 records in
48896+0 records out
200278016 bytes transferred in 95.151719 secs (2104828 bytes/sec)
This means you’re finished. Now eject the USB and try to boot your PC with it. The Mac may complain that the disk is not readable but just ignore that and try it on a PC.