Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

As the answers here indicate Ubuntu .iso s are not expected to boot if copied with dd to a USB thumb drive.

Now my question is why is so that some Linux distributions have the option to directly write their bootable .iso file to a thumb drive with dd but some (read Ubuntu) have not(for Ubuntu I think it has to be converted to .img first). 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.

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

1 Answer 1

up vote 17 down vote accepted

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 ( http://en.wikipedia.org/wiki/Master_boot_record#System_bootstrapping), for a CD to be bootable it must contain boot code "at sector 11 (17 decimal) in the last session on the CD" (From the El Torito specification http://download.intel.com/support/motherboards/desktop/sb/specscdrom.pdf). 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.

share|improve this answer
    
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 Jun 13 '12 at 8:33
1  
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 –  Jordan Uggla Jun 13 '12 at 23:06
    
+1 for El Torito specification. And thanks for the explanation above. :) –  Samik Jun 14 '12 at 9:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.