3

It's a while that I'm trying to create a bootable USB drive with a Windows on it. I first tried with Unebootin unsuccessfully, I reckon the reason is the fact that the last version doesn't support any more the "show all drivers" option, which was necessary for the application to recognize USB drives formatted to ntfs using Gparted. And apparently to create Windows bootable USB drives the ntfs format is required, otherwise it won't boot...

Then I've tried, carefully following the instructions that I've picked up on the internet, to do it on the terminal using the dd command. But then again, so far no luck.

Here's the details:

dd if=/home/GIGI/Windows/Windows.iso of=/dev/sdb1 ibs=4b obs=1b conv=notrunc,noerror

But here what the terminal then prompts:

dd: failed to open ‘/dev/sdb1’: Permission denied

What permission? Anyone can help telling me what I'm missing?

David Foerster
  • 35,754
  • 55
  • 92
  • 145
Pella
  • 201
  • 2
  • 4
  • 12
  • 3
    Prepend the command by `sudo`. Also, you might want to use `/dev/sdb` instead I guess. – Run CMD Aug 05 '14 at 10:48
  • OK, I will keep in mind that for the future. Actually I've found the way using the WinUSB application, wich, as someone else said, is the most straightforward way I've come across. – Pella Aug 05 '14 at 12:36
  • I can't think of anything more straight-forward than `dd`, but of course, YMMV. – Run CMD Aug 05 '14 at 13:39
  • Well, dd is the most straightforward of course... ;) what I meant was easy to use for a newbie like me! – Pella Aug 05 '14 at 22:20

3 Answers3

6

Using dd on devices requires root permissions. Prepend your command with sudo, like so:

sudo dd if=/home/GIGI/Windows/Windows.iso of=/dev/sdb1 ibs=4b obs=1b conv=notrunc,noerror
kraxor
  • 5,459
  • 3
  • 26
  • 35
user312642
  • 71
  • 3
3

OK, after pretty much 2 nights of trying I finally got round it.

Following the instructions given by Avinash Raj in the following post, I've downloaded WinUSB and I created the bootable USB with no fuss.

How can I create a Windows bootable USB stick using Ubuntu?

The only note: while you run the application, make sure to select the "show all drive" option in "File" or it might not be able to find the USB drive you want to put the ISO in.

Many thanks to Avinash Raj!

Pella
  • 201
  • 2
  • 4
  • 12
1

sudo with dd can cause errors.

Use sudo -i you are now at root directory you should see

root@yourname-devicename:~#

Now you can type dd [your command line].

David Foerster
  • 35,754
  • 55
  • 92
  • 145
evilmint
  • 29
  • 1
  • 4
    That's pure [FUD](//en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt). `dd` doesn't depend on any environment variables or services, so `sudo dd [...]` is perfectly fine and equivalent to `sudo -i` followed by `dd`. On the other hand, root shells (as created by `sudo -i`) should be avoided in most cases for security reasons. – David Foerster Jul 28 '15 at 18:41
  • i also had problem of this type and find this answer usefull in form of #sudo su – user1406647 Sep 03 '15 at 19:27
  • This solution works perfectly in helping me install an image on an SD card. What exactly does `sudo -i` do? – IgorGanapolsky Dec 01 '16 at 17:06
  • 1
    @DavidFoerster There is one practical difference here: the current directory is changed to root's home directory for the root shell started by `sudo -i`. Yet that difference is also irrelevant to the idea that `sudo dd ...` "can cause errors," which as you say is not true at all. Although it's basically fine to use `sudo -i` and then run `dd`, the vague, unsupported warning here makes this answer wrong and harmful. The risk of forgetting to type `exit` and remaining in the root shell is a much smaller problem than the confusion about what `sudo` and `sudo -i` do and their relevance to `dd`. – Eliah Kagan Sep 26 '17 at 01:40
  • `sudo -i` worked for me on MacOS. Despite prepending my command with sudo, my system kept denying me permission. evilmint's answer is useful. – Xavier L. Feb 01 '23 at 20:52