19

I am trying to format a drive using the Ubuntu Disks utility. When I select and try to format the drive I get

Error wiping device.  Command-line wipefs -a "/dev/sdb" exited with non-zero exit status 1: wipefs: error: /dev/sdb: probing initialization failed: Device or resource busy (udisks-error-quary,0)

Nothing I know of us using it and I am doing this from a Live CD boot. What to do?

Steve
  • 323

5 Answers5

29

Use the -f (force) option:

wipefs -af /dev/sdb
fosslinux
  • 3,881
13

Unmount the disk and all the partitions on it:

sudo umount /dev/sdb*

Then retry the wipe.

fosslinux
  • 3,881
2

Just wanted to add, in my case I had attached 4 drives that were previously in a RAID on that machine. I had never stopped the existing RAID after disconnecting the drives, so I had to:

mdadm --stop /dev/mdX, replacing X with whatever your previous RAID was.

NessDan
  • 181
0

Use a GParted live CD (or some other distribution containing GParted) to wipe the partition.

fosslinux
  • 3,881
0

You have to unmount the drive. You can run lsblk to see where the drive is mounted, and then you can umount it, for example, when trying to wipefs on sdc:

lsblk output:

sda           8:0    0 476.9G  0 disk 
├─sda1        8:1    0 476.4G  0 part 
└─sda2        8:2    0   523M  0 part 
sdb           8:16   0 698.6G  0 disk 
└─sdb1        8:17   0 698.6G  0 part 
sdc           8:32   1  28.9G  0 disk 
├─sdc1        8:33   1   748M  0 part /run/media/user/ARCH_202109
└─sdc2        8:34   1    84M  0 part 

then I had to run: sudo umount /run/media/user/ARCH_202109

and then, I could wipefs --all /dev/sdc

aurelia
  • 101