How to “Burn” a Linux ISO onto a bootable USB Flash Drive in Linux
I wrote some larger ideas/thoughts/discoveries at the bottom of this answer but have come up with a far simpler solution that requires three simple things:
- A blank USB flash drive for the ISO data “burning.”
- A bootable Linux CD ISO.
- One basic
dd command to copy the data.
This works great for me when setting up a bootable Ubuntu 12.04.5 Server USB flash drive using the
ubuntu-12.04.5-server-amd64.iso ISO. Was able to boot right into the final USB flash drive from my MacMini so I assume it should work for Linux Mint—and possibly other ISOs—as well.
Boot into Linux, and have the USB flash drive inserted.
First, boot into your Linux OS system and make sure the USB flash drive is installed. Now make sure you have
lsblk (list block devices) installed. If it isn’t you can install it like this:
So to install it on CentOS/RedHat it can be installed via this command:
sudo yum install util-linux-ng
And if you want to install it on Ubuntu/Debian/Linux Mint it can be installed via this command:
sudo apt-get install util-linux
Check the output of
lsblk to find the device ID for the USB flash drive.
With that done run
lsblk and determine the device ID for the USB flash drive you installed. For this example, we’ll assume it is available on
/dev/sdb but make sure that ID matches the USB flash drive device on your setup.
dd command to “burn” the ISO to the USB flash drive.
Now knowing that we will be acting on
/dev/sdb, make sure you have your Linux ISO readily available. For my testing, I used the Ubuntu 12.04.5 Server ISO named,
ubuntu-12.04.5-server-amd64.iso. So now with those two piece of the puzzle, let’s run the
dd command to copy the contents of
sudo dd if=~/ubuntu-12.04.5-server-amd64.iso of=/dev/sdb bs=1M
Check the post-copy status of the USB flash drive.
Now just wait for it to finish copying the data. When it’s done you can confirm the procedure went as expected by running this
file command to get info on what
/dev/sdb exactly is right now:
sudo file -s /dev/sdb
The output should be something like this:
/dev/sdb: # ISO 9660 CD-ROM filesystem data 'Ubuntu-Server 12.04.5 LTS amd64 ' (bootable)
The USB flash drive is ready for use.
With that done, eject the USB flash drive with the
ubuntu-12.04.5-server-amd64.iso “burned” onto it and stick it in a USB port on your 2008 MacBook. Start it up holding down the option key and be sure to select the correct disk to boot from. Then hit return and wait. You should now be booted into the ISO “burned” to the USB and be 100% ready to install that OS on that 2008 MacBook.
NOTE: All items below were initial brainstorming ideas/research and are here for reference only. Now that I have experimented on my own I realize I might have overthought the ideas here, but they might be useful for someone else pursuing creating a Mac bootable Linux USB in Linux itself at some point.
The key is to get the Linux Mint ISO converted into UDF format.
The key to this issue is creating an image that is in Universal Disk Format (UDF) volume format and then copying that converted image to the USB disk. Trying to find a Linux specific utility that would convert an ISO to UDF format seems to be quite tricky at best.
In fact if you look at the basic Mac OS X instructions for installing Ubuntu—basically the same procedure as Linux Mint—you can see that while there are many steps, the ISO conversion part is the key. Once you get past that Mac OS X specific step, the rest of the tutorial can basically be adapted for an Linux setup.
Please note I have not actively tested any of this so proceed at your own pace and use caution. Also note that if I am showing commands from other sites and that is being done mainly for reference. Please be sure to alter/customize that command for your specific setup and usage.
isohybrid to convert the Linux Mint ISO to a hybrid USB format.
I found this neat utility called
isohybrid. This is their explanation of how it works follows; more details on
isohybrid can be found on the official
Starting in version 3.72, ISOLINUX supports a "hybrid mode" which can
be booted from either CD-ROM or from a device which BIOS considers a
hard disk or ZIP disk, e.g. a USB key or similar. These isohybrid
images contain in addition to the normal CD-based ISO9660 filesystem,
a valid-looking DOS-style partition table. So if you simply "raw" copy
an isohybrid processed image to a USB flash drive, the BIOS will boot
the image directly.
They also have a neat sounding
iso2usb.py helper script that can simplify using
dd command has always scared me. One wrong keystroke and you can
overwrite the wrong hard disk. To make things a little less scary and
safer, I wrote
So my best advice is if you are in Linux Mint—or any other modern Linux variant—and wish to create a USB from an ISO, you could do worse than
isohybrid. But keep in mind it does seem—at least based on this “Ask Different” answer—that Mac OS X could have issues with “hybrid” volumes.
Format the USB in UDF format and mount the ISO as UDF and then use
dd to copy the ISO to the USB.
Now that said, it’s unclear to me if the MacBook will choke on this because it is still not in UDF format. So maybe another tact is to mount the ISO in Linux but format the USB as UDF and copy the data via
dd, right? This tutorial titled, “Format USB flash stick in UDF under Linux” seems like a decent guide to formatting your USB as a UDF disk. Lots of details there but the core command with the UDF magic is this one that uses
mkudffs which is a part of
mkudffs --media-type=hd --blocksize=512 /dev/sdc1
Additionally this page explains a lot on how to mount an ISO in Linux including a section on mounting an ISO in UDF format:
sudo mount filename.iso /media/iso -t udf -o loop
This “Ask Ubuntu” site answer provides another variant on the UDF mounting command:
sudo mount -t udf /dev/sr0 /cdrom
Like I said, I have not tested these commands out—and the paths are from where I sourced them so you should change them to match your setup—but if you follow my logic, perhaps you can do the following:
- USB in UDF Format: Format your USB in UDF format using
mkudffs which is a part of
- Mount the ISO as UDF: After formatting the USB in UDF, now mount the Linux Mint ISO as a UDF volume.
- Copy the Data from the ISO mounted as UDF to the USB formatted as UDF: Self explanatory. If the ISO is in UDF format and the USB is in UDF format one would assume a clean copy with
dd will create a UDF formatted—and Mac bootable—Linux Mint USB disk.
When all is said and done, I think this UDF focused effort would work best. But like I said at the beginning, I have not tested any of this myself—consider it all educated notes based on what I am reading and understanding—so your milage might vary.