Why does formatting my SD card fail with “device or resource busy”?

0
12
Asked By MellowPine42 On

I'm trying to reformat a 64 GB SD card as FAT32 on Linux. The process fails when I run `sudo mkfs.vfat /dev/vdb1 -s 128`, which returns: `mkfs.vfat: unable to open /dev/vdb1: device or resource busy`. I've tried looking up solutions, but the explanations have been difficult to follow. Unmounting the device says it isn't mounted, so I'm also wondering whether open windows or multiple desktops could cause the device to remain busy.

2 Answers

Answered By QuietHarbor7 On

Before running `mkfs`, make sure nothing has the partition open. You can check with commands such as `lsblk`, `findmnt`, and `sudo fuser -vm /dev/vdb1`. If it is mounted, unmount it with `sudo umount /dev/vdb1`. Open file-manager windows can keep a filesystem in use, but simply having multiple desktops open usually won’t. Close any file-manager windows showing the card and check again.

MellowPine42 -

I tried unmounting it, but the system says it isn’t mounted. I wasn’t sure how to tell whether another process still had it open.

Answered By BlueCedar_18 On

The bigger issue is that `/dev/vdb1` does not appear to be your 64 GB SD card. Your `lsblk` output shows `vdb` as a 10 GB disk and identifies it as the device containing `/`, which is your running system disk. Formatting `/dev/vdb1` could destroy the operating system or other important data, so do not run `mkfs` on it. Disconnect and reconnect the SD card, then run `lsblk -o NAME,SIZE,TYPE,RM,MOUNTPOINTS,MODEL` and find the removable device whose size is about 64 GB. Use that device’s partition only after verifying it carefully. If it has no partition, create one first; then unmount that partition before formatting it.

CrispLantern5 -

The `lsblk` output shows only a 10 GB `vdb`, not a 64 GB card, so the card may not be detected at all. I’d check the output immediately after inserting it and compare which new device appears.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.