I want to create a bootable usb drive. Just to be sure I formated the complete stick with the command dd if=/dev/zero of=/dev/sdb, where sdb is the flash drive.

After that I created a new partition table with parted and the command mklabel gpt.

Where those two steps unnecessary? When I copy the iso with dd on the usb drive and reboot my computer, it does not show an option to boot from a usb stick in the BIOS.

It already worked when I installed arch linux this way.


Cloning needs no preparation

If you clone from a hybrid iso file to a USB drive, everything relevant will be overwritten, so wiping and formatting will make no difference (except maybe making the final cloning faster, but the total time and effort will increase).

dd deserves the nicknames 'disk destroyer' and 'data destroyer'

Cloning with dd produces a reliable result, if you do it correctly,

sudo dd if=/path/file.iso of=/dev/sdx bs=4096

where x is the drive letter. But dd does what you tell it to do without questions. If you tell it to wipe the family pictures ... and it is a minor typing error away.

Tools with a final checkpoint

So I would recommend that you use a tool with a final checkpoint, that gives you a chance to double-check that you will install the live system to the correct drive.

Two such tools come with Ubuntu,

  • The Startup Disk Creator (in Ubuntu 16.04 LTS and newer versions; older versions come with an old and buggy version, that you should avoid),
  • Disks alias gnome-disks.

You can install mkusb from its PPA.

  • The standard function is to clone from an iso file or [compressed] image file,
  • but it can also wipe a drive,
  • restore a drive from an 'install device' to a 'standard storage device' (with an MSDOS partition table and partition with a FAT32 file system),
  • create Windows install drives and
  • create persistent live drives with Ubuntu and Debian.

If cloning does not work

Most modern linux distros provide iso files treated with isohybrid, which make them hybrid iso files. Such iso files can be used to

  • burn CD/DVD disks that are bootable
  • clone USB drives and memory cards that are bootable

But some iso files are not hybrid iso files, for example Windows iso files and Knoppix iso files. These iso files must be extracted and special care must be taken to make the target drive bootable. (You can treat a Knoppix iso file with isohybrid, but it does not work with Windows iso files.)

There are several extracting tools, for example Rufus, which is the officially recommended tool to install Ubuntu from Windows.

| improve this answer | |
  • 1
    Just to be sure, in the dd command, should I substitute sdX with the drive letter only e.g.sdb or with the letter and digit e.g.sdb1? – XavierStuvw Dec 22 '17 at 8:08
  • 1
    @XavierStuvw, When you clone from an iso file to a USB pendrive, you should write to the 'whole drive' alias the 'drive head', in other words to /dev/sdb or /dev/sdc ... and there should be no digit. The digit (as in /dev/sdb1) makes the process write to a partition, and this is not what you want in this case. Please remember to double-check that you will write to the correct device. – sudodus Dec 22 '17 at 11:05
  • 1
    Thx. Then, I made a dd if=image.iso of=/dev/sdb bs=4096 onto a USB stick as due. While the content of the iso image is indeed shown in the file list for the drive, the result according to gparted is an unallocated memory space. I imagine this is non-allocation is consistent with the nature of the iso copy. Nonetheless, this should be a boot drive and the 'bootability' flag cannot be added to an unallocated memory space via gparted. So what makes (will make) this USB stick bootable? – XavierStuvw Dec 22 '17 at 16:07
  • 2
    @XavierStuvw, The problem is that your version of gparted does not understand the partition table and file system of a hybrid iso file. (The version in Ubuntu 17.10 is updated and recognizes it.) The iso 9660 file system is read-only 'by its nature' and such that it makes a bootable drive in a DVD disk, a USB pendrive and a memory card. You need not (and cannot) add anything to make it bootable. Use it as it is after the cloning operation :-) – sudodus Dec 22 '17 at 21:20
  • Brilliant answer, and the comments especially were enlightening, I was confused as to whether I should be dding an image file to the entire USB or to a partition of it. Thanks! – Prometheus Oct 12 '18 at 4:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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