5

I do

$ df -h
...
/dev/sdc1       1,5G  1,5G     0 100% /media/username/Ubuntu 17.04 amd64

$ umount /dev/sdc1

$ df -h
...
#sdc1 now not listed

$ sudo dd if=./memtest86-usb.img of=sdc
307200+0 records in
307200+0 records out
157286400 bytes (157 MB, 150 MiB) copied, 2,78627 s, 56,5 MB/s

but flashdrive remain unchanged.

what is wrong?

CodeBy
  • 252

2 Answers2

31

Your command creates a file named sdc in the current directory. You want of=/dev/sdc.

So the complete correct command is:

sudo dd if=./memtest86-usb.img of=/dev/sdc

Run sync afterwards to synchronize cached writes to disk or use the conv=fsync option with dd.

pLumo
  • 27,991
6

I support @RoVo's answer - it is a correct and good answer to the question.


I would like to add that dd is risky, and has caused problems for many users, because it will do what you tell it to do without any question. A minor typing error can make it overwrite an internal drive or a backup drive with important files.

You can play safer by using a [cloning] tool with a final checkpoint, that will give you a second chance to double-check and also display information about the available target devices.

  • Disks alias gnome-disks

  • mkusb

Link with more details: Cloning tools with a final checkpoint

sudodus
  • 47,684