this post was submitted on 25 Dec 2023
66 points (91.2% liked)
Linux
48328 readers
540 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Alright, I've used your code,
sudo mkfs.exfat -n LABEL /dev/sdb1
but the console returns this
what's the problem here? I've cleared out all storage on the drive, and made sure that it isn't opened in the file explorer, and it shouldn't be reading/writing anything because it's empty.
thanks for the help btw
You must unmount the drive before formatting. And also know that formatting wipes the drive, so if there is anything on there you want to keep, back it up beforehand
And triple check the device path, you don't want to unceremoniously unmount and obliterate one of your non-system drives (shouldn't be able to unmount your system drive)
This may or may not be advice from learned experience
It not only has to be not 'open' in the explorer, but properly unmounted. Tools like mkfs dont do that for you, its just not their job. (and might be unwanted or stop your from making mistakes like accidentally overwriting the wrong drive)
try
umount /dev/USBDRIVE
If that still complaints about Device or ressource busy, then something is still using it.
Either try to close things that might be the culprit, reboot and try again or, if installed and you are compfortable, you can check which processes using
lsof -D <path where drive is mounted to>
(you can get that location usingmount | grep <path to usb drive>
)