20

One answer here indicates that Ubuntu .iso s are not expected to boot if copied with dd to a USB thumb drive.

Why do some Linux distributions have the option to directly write their bootable .iso file to a thumb drive with dd, but others (Ubuntu?) do not?

In Ubuntu I think it has to be converted to .img first. Is this true?

Is it for some architectural difference in .isos? Or is it due to any limitation of dd itself?

I don't know if it is off-topic here. I can move it to a more proper place if the community thinks so or suggests one. Some explanation would be appreciable.

2
  • 1
    That used to be the case with Ubuntu ISOs, but as of 11.10, they are dd-compatible, so to speak. Commented Jun 13, 2012 at 4:41
  • @mikewhatever Thanks for the info. Unfortunately I was trying to do that with 11.04 iso.
    – Samik
    Commented Jun 13, 2012 at 8:35

3 Answers 3

32

With Ubuntu 12.04 it is possible to dd the .iso file to a disk to create a bootable disk. It only works with some isos (including Ubuntu 12.04, but not earlier Ubuntu versions) because booting from CD and booting from a disk are handled differently on BIOS based systems.

Among other things, for a hard drive to be bootable it must contain boot code in the first sector, for a CD to be bootable it must contain boot code "at sector 11 (17 decimal) in the last session on the CD" according to the El Torito specification. Since the boot code, at least the initial portion loaded by the BIOS, is stored in different places for CDs and hard drives, a disk image can have boot code in both places so that the bootloader is loaded if the image is booted as a hard drive or as a CD.

Most iso files are only designed to be bootable as CDs, and so they contain no boot code in the first sector of the image and thus a hard drive containing such an image won't have boot code in its first sector and won't be bootable.

3
  • That's the explanation I was looking for. Thanks for taking time to explain that. It'd be a little more nice to see some links, but the question is answered. So that's what UNetbootin does, copying the bootloader code from sector 17 to first sector of thumb drive, right?
    – Samik
    Commented Jun 13, 2012 at 8:33
  • 3
    No, it's not as simple as copying boot code around. Even if that were possible, it would require wiping the entire device (like using dd does), which would be unacceptable for most users of Unetbootin. Instead, Unetbootin "downloads and extracts an ISO file to your USB drive, generates an appropriate syslinux config file, and makes your USB drive bootable using syslinux." unetbootin.sourceforge.net/#faq Commented Jun 13, 2012 at 23:06
  • +1 for El Torito specification. And thanks for the explanation above. :)
    – Samik
    Commented Jun 14, 2012 at 9:15
0

Ubuntu's current ISOs are dd-able and have been for some time. They are "hybrid" ISOs: they have an MBR boot sector. Using dd properly will create fully bootable USB drive.

The cited article, btw, only has one answer claiming that Ubuntu ISOs are not dd-able, and this isn't true.

Please see my answer here: How to convert a iso9660 ISO to a USB ISO

This answer provides a way to determine if an iso is hybridized (you can verify this for Ubuntu ISOs), how to hybridize it if it's not (for other cases), and how to correctly use dd to create a bootable drive.

-3

Notes that have no changes on the above posted accepted solution.

The question was posed as reliable, bootable iso and using dd.

In most cases linux users use the phrase iso to mean a special image of an optical disc. Bootable in that case could be one of a few methods that bios or uefi understands and allows to run from optical disc.

dd is generally considered reliable however it could fail for many reasons on it's own and have nothing to do with the source or output. In most case it seems to fail only because it doesn't ask "Are you sure you want to wipe that out??"

Modern computers tend to view a usb as a real internal hard drive.

One could use a tool like 7z also to copy over some iso's to a fat32 flash drive.

This all assumes some modern hardware and a modern usb flash drive.

In the future we will have to be creating uefi bootable media in most cases.

You must log in to answer this question.

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