2

The last time I booted from a USB flash drive was back in 2006. Ever since, I keep failing at making live USB bootables.

I tried getting Fedora 17 and 18, Ubuntu, and tons of other distros to boot from USB and never succeeded. I also tried different USB keys. Every single time, I get either kernel panic, or a bunch of meaningless errors when trying to boot.

I am sick of buying CDs and DVDs to be able to boot stuff; I want to be able to use my USB drive.

I've been using this basic command:

sudo dd if=Downloads/myiso.iso of=/dev/myusb bs=1M && sync

EDIT: The reason for my failed attempts seemed to be corrupt hardware. I bought a new memory stick and the issue is gone.

8
  • If you want a linux distro, drop by pendrive linux and make your life a whole lot easier, as for other os's, as long as the hardware doesn't change, install the OS to a hard drive, or the flash drive if you want (depends on OS) if windows, hard drive, dd if=/dev/sda of=/dev/sdb (or whatever the drive is listed as) bs=1M
    – user88311
    Commented Jan 28, 2013 at 4:06
  • I don't want to install, I just want live usb of fedora. Commented Jan 28, 2013 at 4:44
  • look, my problem is that DD fails to make anything useful every single time. And yet, any tutorial on how to make bootable usb live medium is using dd. Commented Jan 28, 2013 at 4:50
  • If that's the case, just google pendrivelinux, they have the best tools for making bootable USB.
    – user88311
    Commented Jan 28, 2013 at 12:46
  • I went to pendriveLINUX and they offer me some windows program? Am I retarded or what is this? Commented Jan 28, 2013 at 20:18

3 Answers 3

2

This is an older question and you already discovered that in your case, the issue was a defective flash drive. For other readers with a similar problem, let me add a few other potential causes and solutions.

  1. Use of a standard ISO

    The ISO format is a container for a disk image of an optical disk. Systems can boot from an optical drive without the need for MBR or EFI, so the ISO doesn't contain this. Using dd to write the ISO to a flash drive results in media that lacks a boot provision.

    Some distros provide an ISO-Hybrid. This contains a boot provision, so the dd result can be booted. There are a couple of limitations, though.

    • You may not be able to boot a UEFI system. It is possible to configure this (see below), but not every distro with an ISO-Hybrid may be configured this way.
    • Writing the ISO-Hybrid with dd also writes the filesystem, which is read-only. So this method of installation will work like a live DVD session, but you won't be able to use it as your working OS.
  2. Use of non-matching boot provision

    Your computer will be set to boot in either UEFI or legacy mode, so the flash drive needs to either match or be provisioned for both. If you use just dd, it will work only if it is an ISO-Hybrid and it matches the computer's boot basis or has been designed for dual mode. If you make the drive bootable with a third-party tool, that needs to prepare it to match the computer or be dual mode. A dual mode setup can be done manually if you are an experienced Linux user.

    Not every third party tool can prepare a flash drive for UEFI or dual mode booting. These abilities are likely to change over time. I'm aware that Rufus can do this at the current time and there are likely some others. Shreyas P V has an answer on Ask Ubuntu that shows how to use Rufus to set up dual mode booting: How to create a dual boot mode pen-drive which can support both UEFI Mode and Legacy BIOS mode?.

    If you are experienced enough to do this manually, you probably won't be searching for an answer to this question. However, even if just for educational purposes, this answer by grawity provides a good explanation: Is a hybrid Linux USB-Stick for UEFI & legacy BIOS possible?

0
sudo dd bs=1M if=/path/to/XXX.iso of=/dev/sdX 
2
  • 1
    Welcome to Super User. A common mistake new users make is to answer without details of how to actually resolves the issue. Answers should be detailed and include references, as needed. Please take a few minutes to edit your answer to include details of why your answer is valid. If you need some help, read How do I write a good answer?.
    – CharlieRB
    Commented Mar 11, 2016 at 21:34
  • 1
    Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
    – DavidPostill
    Commented Mar 11, 2016 at 22:37
0

I use dd a lot of times to just get some live system up and running from USB. Not sure but never used it to the user mount. Since dd is writing to a block device you should write to that directly instead of the mount point.

I always use:

dd if=Downloads/tmp/yourDistro.iso bs=4M oflag=sync |dd of=/dev/sdb

Change yourDistro path and check if your USB is located at sdb before doing anything! Note that if sdb is not your USB you overwrite that drive completely!

Why do I pipe both (if and of)? It allows the system to cache the streams and therefore it gets a bit faster.

You must log in to answer this question.

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