3

Updated TL;DR question:

I have 2 machines A and B; both are bootable from usb. When I create a stick with dd on machine A, the stick is neither booting machine A nor machine B nor any other bootable machine. When I create a stick from the very same iso with the very same usb stick on machine B with the very same dd-command, the stick is booting machine A and machine B and any other bootable machine. What's the secret ingredient that makes a "dd-stick" actually bootable?

(TL;DR ends here.)


First off: I'm totally aware of that question and its answer: Why does 'dd' not work for creating bootable USB? - however the problem pointed out in the accepted answer (and also in the other answers) is not the one I have.

Additional Disclaimer: that answer: https://superuser.com/a/1141527/180563 is not answering this question. It assumes that different ISOs with different configurations are used on different systems. As I pointed out in the comments, this is not the case. The only thing thats differnt in my tests is the machine where the Boot-Stick was made; the rest, i.e. the ISO and the machine that should be booted is the same. Please don't upvote that answer as it is not addressing the question that has been asked and is therefore a wrong answer.

I know that its a common issue to confuse the correct device to dd to and its often that the user confuses the first partition with the whole device.

But that is not my problem! I'm using the command in a right way, i.e. I'm not copying to the first partition but to the device, like:

dd if=linux.iso of=/dev/disk3 bs=1m

(1m is correct as I'm using bsd-dd which uses lower m rather than capital M, so please no comments on that. 1M would be not even a valid parameter for my version of dd)

/dev/disk3 is the device file of the stick and not of one of its partitions.

Now although, I'm doing everything according to the documentation and even in the same way as others I know are doing it (with success), my sticks aren't bootable. So my question goes like in the other one: What is the secret ingredient that makes a dd-copied stick bootable?

Update: The same iso-File I'm using will work on anothers person's pc. Update2: This is the iso-File i'm talking about: http://cdimage.ubuntu.com/kubuntu/releases/16.10/release/kubuntu-16.10-desktop-amd64.iso A friend was able to create a bootable stick with dd from it while I am not.

  • notice that you mistagged it.. ddwrt is a router firmware, not to be confused with the dd command that you are asking about – barlop Nov 2 '16 at 11:15
  • Maybe your friend used unetbootin (or rufus if he used Windows). Is there a reason why you want to use dd? – AFH Nov 2 '16 at 12:06
  • My friend is of course doing the exact same thing as me. I don't want to use dd, I want to know what's keeping it from working, when I do it. – ohcibi Nov 2 '16 at 12:09
  • Maybe there's something weird with block sizes. Try omitting the bs=1m from the command. Also maybe there's something weird with BSD securelevel or similar that prevents writing to sector 0 of a device. Make sure you are running the command as root. – LawrenceC Nov 2 '16 at 12:55
  • 1
    @ohcibi Thanks, that makes it perfectly clear now. So... machine A must be faulty in some way. Either the USB hardware or the USB drivers. Do you happen to have a USB port card that you could put into machine A, just to test? Or perhaps use dd to copy the USB stick contents back to a file so that you can compare it to "linux.iso" with diff. – Andrew Morton Jun 13 '17 at 13:34
2

Usually the secret ingredient is isohybrid. .iso files are really CD images – they contain an ISO 9660 filesystem (hence the name), usually with El Torito extensions to make it bootable. That's however a bit different from how regular disks boot (be they internal or USB).

(For BIOS systems, regular disks are expected to have bootcode in their 0th sector – part of the MBR. While the CD boot process tries to emulate that in some ways, its initial bootcode is still stored elsewhere.)

So many Linux distributions use isohybrid to combine various different boot images and even different filesystems (BIOS, El Torito, and UEFI; ISO 9660 and FAT) into a single image that somehow still happens to work.

But if your image hasn't been built that way, then it will have only CD bootcode, not "disk" one.

Or the image might be a hybrid one, but it might only support BIOS while your system requires UEFI, or vice versa. Or you might be trying to boot it on something that's not x86.

  • I'm talking about the very same iso-file that works as bootable when a friend does it vs. when I'm doing it. – ohcibi Nov 2 '16 at 11:02
  • Have you tried booting your friend's PC from your own USB drive then? – grawity Nov 2 '16 at 11:04
  • I don't understand the question. By "works", I mean that his stick will boot the very same pc that my stick doesn't. – ohcibi Nov 2 '16 at 11:08

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.