Proper Use of The DD Command

If you have ever tried to make a live-usb from a linux iso, you may have come across something like this on the internet

root# dd if=/home/user/Downloads/somefile.iso of=/dev/sdx

This is what I have seen in most places or forums, but what they fail to mention is the above command will only work with “hybrid” iso’s or “.img” files like

root# dd if=/home/user/Downloads/hybrid.iso of=/dev/sdx

or

root# dd if=/home/user/Downloads/linux.img of=/dev/sdx

A hybrid iso is able to be burned to cd/dvd or usb flash drive, you can use fdisk on a unknown iso to determine if it is a hybrid iso.

hybrid

The dd command in linux is a very useful command, it can do many things. But some people think that you can write any iso with dd, and I can say with absolute certainty that you can’t. Because I have spent the last three days trying several different iso’s and only “hybrid” iso’s or “img” files would work.

Why all the fracas, you might ask? well I have been trying to find a way to write iso files, to usb flash drives from the command line.

There’s no easy command or “one-liner” to do this, but you can write a non-hybrid iso to usb flash with Syslinux. (link below) I wrote the Gentoo minimal install iso, to a 4gb usb flash drive, from a wiki I found on the internet.

And yes it boots fine, I’m sure with a little “tinkering” I can use the same wiki, to boot other non-hybrid iso’s (or maybe not) so time will tell

Leave a comment

Filed under Gentoo Linux

Leave a comment