Unable to format a secondary drive

I'm trying to format a secondary drive to UFS. I moved the important files from it to another location. I tried using bsdinstall partedit and got an error "device busy".
I tried to umount the drive and it would not do it. The error is "One or More files on this device are open..."
I even restarted the system and tried it again. It won't do it.
Now sure what I need to be doing.
 
try lsof to figure out what's open.
I tried that.. all it said was /bin/sh: lsof: not found

OK.. I had to install the package.
I tried it again and it gives me a huge readout with all the applications currently running.
Not sure what I need to do here. Sorry... I'm quite new to this.
 
If you are "cd'd" to a directory on the drive you get that error.
If you have a graphical tool open showing a directory on the drive you get that error.
 
It would help if you identified the "drive", or file systems involved, with more details.

e.g. the output of the mount(8) command might help.

However, since it's still "mounted", try fuser -c <mountpoint> to identify any processes using it.
 
Thanks for all the input guys. I managed to do it.
I don't know if it was the "correct" way or whether there is an easier way to do it. I figured that my DE was probably the thing that was halting me and being on KDE and I didn't know how to get into the console without "starting X"
So I logged out and at SDDM login manager, I chose the Userland option instead of Plasma X11. And then logged in using my credentials.
It opened me up to an X Window session where I was able to use the "bsdinstall partedit" command to format the drive. After that a simple addition to the my "/etc/fstab" and then reboot it.
All done.
 
  • Like
Reactions: mer
Back
Top