9

I was creating a bootable usb with dd using this command, which I've used many times before on my system without issue. This time, however, I forgot to plug in the usb so it tried to write to a device that wasn't there. It exited with this message:

3821010944 bytes (3.8 GB, 3.6 GiB) copied, 48 s, 79.5 MB/s
dd: error writing '/dev/sdb': No space left on device
920+0 records in
919+0 records out
3857190912 bytes (3.9 GB, 3.6 GiB) copied, 48.4669 s, 79.6 MB/s

Now for any device I plug in to any port, as long as it's assigned sdb, my partition manager recognizes it as 'Unknown Device' with 3.59 GB of storage and no partition table, and dd returns the same error as before. The file system on the other hand can access, read, and write to the usb just fine.

Any advice on how to fix this?

  • 2
    I think you have created a file with the name /dev/sdb. If that is the case, there is a regular file, where you expect there should be a block device. It should be possible to remove that file and after that (maybe after a reboot) your system should be able to create a block device /dev/sdb. – sudodus Jul 13 '19 at 7:28
  • 1
    @sudodus deleting the file and rebooting should fix it, so this is an answer, not a comment! Post one and ping me and I'll come back and upvote! – Fabby Jul 13 '19 at 7:33
11

I think you have created a file with the name /dev/sdb. If that is the case, there is a regular file, where you expect there should be a block device.

It should be possible to remove that file and after that (maybe after a reboot) your system should be able to create a block device /dev/sdb

| improve this answer | |
  • 1
    As promised! ;-) – Fabby Jul 13 '19 at 7:46
  • 1
    if you remove the regular file but don't want to / can't reboot, is there a solution? restart udev? – cat Jul 13 '19 at 22:33
  • 3
    @cat I didn't even need to reboot. I just removed the file with sudo rm and plugged in a usb. The correct file was created automatically. – Kyle Jul 13 '19 at 23:04

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.