5

I am new to Linux. I'm not sure what I'm doing wrong, but when I use the dd command to try and make a bootable/installable USB drive it will not boot from any computer. If I take the same .iso file and use rufus, on windows, it will boot on any computer. All of the computers but one have BIOS and the other has UEFI. Also I am not doing a dual boot on any of them. I have tried the following 8 different ways to accomplish this with dd

  • dd if=~/Desktop/xubuntu16.04 of=/dev/sdb

  • dd if=~/Desktop/xubuntu16.04 of=/dev/sdb1

  • dd if=~/Desktop/xubuntu16.04 of=/dev/sdb bs=4M

  • dd if=~/Desktop/xubuntu16.04 of=/dev/sdb1 bs=4M

  • dd if=/dev/cdrom of=/dev/sdb

  • dd if=/dev/cdrom of=/dev/sdb1

  • dd if=/dev/cdrom of=/dev/sdb bs=4M

  • dd if=/dev/cdrom of=/dev/sdb1 bs=4m

karel
  • 122,292
  • 133
  • 301
  • 332
tulleydr
  • 157

2 Answers2

6

Cloning the iso file to a USB pendrive

Using dd like you describe is cloning, which is a simple an reliable method that works with all current Ubuntu family iso files in order to create USB boot drives, and 64-bit systems work in both BIOS and UEFI mode.

You need elevated permissions, which you do by running with sudo. I think the following command would do what you want

sudo dd if=~/Desktop/xubuntu16.04 of=/dev/sdx bs=4096

where x is the device letter of the target drive. It is extremely important the get the correct letter for the target drive, otherwise you might overwrite a drive, where you store the family pictures and some other very important files. dd is a very powerful but also very dangerous tool, because it does what you tell it to do without questions, and a minor typing error is enough to destroy your family pictures.

There should be no partition number, so /dev/sdx (not /dev/sdx1) because you want to clone from the iso file to the whole drive and point to the drive's head end, (not to a partition). In my experience it is fast in many computers to write with the block size 4096 bytes.

Safer cloning tools

I would recommend that you use a tool that helps you identify and select the target drive and with a final checkpoint where you can make sure, that you will write to the correct drive.

  • 'mkusb' is such a tool that works in all current Ubuntu versions. It wraps a safety belt around dd. See this link

    help.ubuntu.com/community/mkusb

  • The Ubuntu 'Startup Disk Creator' in Ubuntu 16.04 LTS and newer versions is also a reliable cloning tool to create USB boot drives with Ubuntu. (Earlier versions of the Ubuntu 'Startup Disk Creator' are buggy.)

  • Another alternative is 'Disks' alias gnome-disks.
sudodus
  • 47,684
2

So ISO images might work and some might not. An Optical disk and a USB drive have different booting characteristics. The don't boot the same and have the bootloaders in the same location.

Rufus and other ISO writers are aware of this and compensate. As you can see from your test cases, just writing the exact byte by byte to the media won't always work, because the low-level raw writing is not making the needed adjustments, which isn't the same on both an Optical drive and as in this case, a USB drive.

L. D. James
  • 25,444