Why does mkfs.vfat say my device is busy when formatting an SD card?

August 31, 2026 2 answers
Asked by MellowPine42
I'm trying to format a 64 GB SD card as FAT32 on Linux. The process gets to `sudo mkfs.vfat /dev/vdb1 -s 128`, but it fails with `unable to open /dev/vdb1: device or resource busy`. I've tried looking up fixes, but the explanations have been difficult to follow. Unmounting the device says it isn't mounted, and I'm unsure whether having multiple windows or desktops open could cause the problem. Running `lsblk` shows `vdb` as a 10 GB disk with `vdb1` mounted at `/`, while the card I'm trying to format should be 64 GB.

Answers

CobaltMango7
The `lsblk` output suggests `/dev/vdb1` is not your SD card. Itโ€™s a 10 GB partition mounted as the system root filesystem at `/`, so itโ€™s currently in use. Thatโ€™s why `mkfs.vfat` refuses to format itโ€”and formatting it would seriously damage the running system. Donโ€™t run any formatting command on that device. Plug the SD card in, then run `lsblk -o NAME,SIZE,TYPE,MODEL,MOUNTPOINTS` and identify the removable 64 GB device by its size and model. The correct device may have a different name, such as `/dev/sda1` or `/dev/mmcblk0p1`.

QuietOrbit6: Having multiple desktop windows open normally wonโ€™t cause this. The important issue is finding the actual removable card rather than relying on `/dev/vdb1`, which is clearly being used as `/`.

Reply to this answer
SilverKite29
`/dev/vdb1` is the first partition on the `vdb` disk, and your output shows that disk is only 10 GB with its partition mounted at the root directory. It may be a virtual disk rather than the physical SD card. Check the `lsblk` output before and after inserting the card, or use the deviceโ€™s reported size and removable status to locate it. Once youโ€™ve identified the correct partition, unmount that partition if necessary and format that deviceโ€”not the one mounted at `/`.

NovaCricket8: The fact that unmounting says it isnโ€™t mounted doesnโ€™t make `/dev/vdb1` safe to format; `lsblk` shows it is mounted as the root filesystem. The card may not be detected at all, or it may be exposed under another device name.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions