Error wiping newly created partition /dev/sdb1

5,659

Solution 1

This is how i solved my problem:

  1. Format my pendrive
  2. Restart the system (I really don't know what is the basic fundamental behind restarting the system but it helped me.)
  3. It shows Mounted pendrive. so format it again and create a new partition with FAT filesystem - but with this i am not able to create folder.
  4. So format it again and create partition with NTFS filesystem and it worked.

Solution 2

The most likely reason for the error message is that there is a directory called /dev/sdb1 preventing the creation of the device node for accessing that partition.

I'm guessing that in the past you accidently created this directory as a mount point under /dev. You can check if you have with:

ls -ld /dev/sdb1

If the first character is d, you did, and you need to delete or move this directory elsewhere.

sudo mv /dev/sdb1 /tmp

If you get the error message:

mv: cannot move ‘/dev/sdb1’ to ‘/tmp/sdb1’: Device or resource busy

then something is still mounted there. In which case mount | grep sdb1 to find out what it is, then try again with:

sudo umount /dev/sdb1
sudo mv /dev/sdb1 /tmp

It will now be able to create the device file when you next reconnect your flash drive, and should be able to create and format the first partition on that drive.

Share:
5,659

Related videos on Youtube

d a i s y
Author by

d a i s y

Updated on September 18, 2022

Comments

  • d a i s y
    d a i s y almost 2 years

    I know this may possibly a duplicate but i tried a lot of things to solve this error. There are already two partition and i am trying to create third one enter image description here

    but it shows the following error. enter image description here

    Even i formatted pendrive completely still it shows this error. it happens on ubuntu 14.10 . How to solve it?

    • Martin Thornton
      Martin Thornton almost 9 years
      Actually, the 'Is a directory' bit of the error is more unusual. Could you provide the output of ls -ld /dev/sdb*. I'm wondering if any device nodes have been overwritten.
  • Martin Thornton
    Martin Thornton almost 9 years
    Yes, rebooting the system also works, as the contents of /dev don't survive across reboots, being managed by udev.
  • Nicolas Raoul
    Nicolas Raoul over 8 years
    I have the exact same problem as the asker, and ls -ld /dev/sdb1 outputs brw-rw---- 1 root disk 8, 33 11月 30 12:03 /dev/sdc1.