D
D
del9937882018-07-28 00:07:20
linux
del993788, 2018-07-28 00:07:20

Why does DD write "dd: failed to open '/mnt/usb': Is a directory"?

Hello. I'm trying to write an image to a USB flash drive from Debian Slax using the DD command. And this is what I get:

[email protected]:~# mount /dev/sdc1 /mnt/usb
[email protected]:~# dd if=/media/sda6/windows7.iso of=/mnt/usb
dd: failed to open '/mnt/usb': Is a directory

What am I doing wrong?
I tried to mount to another location, I tried to change the flash drive, I tried to dd to a folder on my hard drive in general. He writes every time that he failed to open.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wexter, 2018-07-28
@del993788

Because dd writes either to a file or to a block device, if you need to upload an image using dd, then you don’t need to mount the flash drive anywhere, instead of the path to the mount folder, specify the path to the block device of the flash drive, you can look through df -h | grep '/mnt/usb' before unmounting, it will most likely be /dev/sdX1 or something similar, in this case you need to write to /dev/sdX, where X is the device letter

dd if=/media/sda6/windows7.iso of=/dev/sdX

V
vlarkanov, 2018-07-30
@vlarkanov

dd says can't open '/mnt/usb' because it's a folder. Because dd works with block devices (disks, images). You need to unmount /dev/sdc1 and run
(exactly sdc, not sdc1 - we are writing to the device, not to its partition. It will also not be superfluous to specify the block size (bs) and enable viewing progress (status) during the command execution.
But most likely, Windows will not be loaded - there, EMNIP, a hybrid image format - I suffered at one time with Windows 10.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question