17

Many distributions of linux/bsd have separate usb and dvd images and writing the dvd image doesn't seem to work. What is fundamentally different between these two mechanisms?

4 Answers 4

19

First of all, USB means Universal Serial Bus. It is a standard for a control and data bus, just like PCIe, PCI, EISA and ISA are all buses. USB is not a device, like a CD or DVD drive. (Optical drives typically use SATA or IDE buses with the ATA protocol.) When you use or refer to USB, there is probably an attached device (aka USB gadget) that you are actually referring to.

In this case you are probably referring to USB flash drives, which essentially emulate a typical hard disk drive. If the PC's BIOS supports booting from a USB device, then that means that the BIOS has embedded firmware that includes a USB protocol stack, and can control a target device like a flash drive over the Universal Serial Bus. After the USB handshake protocol is established between the USB host (the PC that needs to boot) and the USB gadget (the flash drive), the control and data mechanism provided by USB can be abstracted away, and upper layers of the BIOS boot code can treat the flash drive just like a HDD. That is, the first sector of the "disk drive" has to be read in order to obtain its Master Boot Record (MBR).

Optical discs do not conform to the PC hard disk layout (there is no MBR at sector zero). In fact there are several formats for optical disks, but the data layout in common use with PCs is the ISO 9660 format for CDs. The requirements for booting from CD/DVD are spelled out in the ISO 9660 standard.

The data transfer rate and physical capacity difference between different boot devices essentially become irrelevant if the BIOS supports the device. The I/O characteristics of each supported boot device has to be accounted for, and are handled in the low-level device driver code of the BIOS. Note that most PCs can also boot from the Ethernet network interface card (NIC), and that interface is far more different than CD/DVD versus HDD. Yet the layered approach to software implementation delegates all that low-level I/O and protocol handling to lower layers, and the BIOS can proceed to load & execute the next stage of boot loader. Note that some device differences are parameterized. That is, the device's number of cylinders, heads, sectors/track and sector size are not hard coded in the device drivers, but rather are read from the device, e.g. the BPB in the MBR.

... writing the dvd image (to the USB flash drive) doesn't seem to work.

The difference between these two media layouts can be dissolved by combining the two into a merged image file that can be copied to either a CD/DVD or a HDD/flash drive. An ISO image (for burning to a CD or DVD to make a bootable disc) can be modified for straight copying to a HDD or USB flash drive to produce a Hybrid ISO/IMG image:

The Hybrid ISO/IMG format is a modification of the standard ISO format to make the image compatible with the expectations of hard drive booting

A standard ISO image typically includes the ISOLINUX boot loader which is loaded by the BIOS using the El Torito booting standard. The Hybrid image replaces the first 512 bytes of the ISO format (which is all binary zeros) with a PC hard drive Master Boot Record (MBR) containing: The stage 1 loader image from GRUB version 0.97, and a partition table with 1 partition that ends at the end of the hybrid image. The remainder of the ISO image is not modified.

Additional sectors are added at the end of the ISO image.

2
  • Great answer. And there is a linux tool to make an iso image a hybrid image: isohybrid.
    – Jarekczek
    Commented Aug 16, 2015 at 16:59
  • That means a hybrid will still use a UDF filesystem?
    – jiggunjer
    Commented Jan 2, 2016 at 17:24
2

DVD has it's own mechanical properties and 2K block size. Older joliet boot mechanism involved adding extra 2.88MB bootloader floppy to install CD (like NT4 did) In theory you can have same image bootable using the new CD/DVD boot protocol (without floppy image) and USB stick (and CF card, IDE disk etc etc). Most vendor images work like that BUT some BIOSes are programmed to prefer one or other boot mechanism.

-1

Actually, theorically there is no difference, a DVD or a flash will have the same boot mechanism, the difference will be the transfer rate from DVD to a flash device(USB 2.0 have higher transfer rate than a DVD). What maybe is being your problem on booting from flash or DVD is that your flash haven't a bootable partition active on it. On a DVD image you don't need to set it as bootable if the iso/img that your written on it was already set to be bootable(on a flash you will need to set it manually). Take a look here to know how to make a flash bootable device.

-1

The boot mechanism is not different because the same way USB boots as the DVD does, but there is a lots of difference between the read/write speed of the DVD v/s USB.

USB 2.0 spec has a max speed of 480 Megabits per second. So you're talking 60 Megabytes per second.
DVD - Lets go with a 16X DVD reader = 21 Megabytes per second.

But the CD/DVD speeds are all MAX speeds, which means they wont be transferring data at this speed until the very outer of the disc is reached in a lot of cases. You might have a CD Reader that starts off at 24x at the start of the disc, and only reaches 40x when it gets near the end. Same kinda deal with DVD readers. Might start at 8x, then go through to 16.

You have make USB disk bootable with some tricks because normally they are not bootable by default while when you burn an iso/nrg image on DVD which has the Windows or Ubuntu installation files it will automatically become bootable.
WintoFlash is a tool which make USB stick to bootable. There are some other software too and also you can make bootable stick through cmd on Windows.

You must log in to answer this question.

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