Announcement

Collapse
No announcement yet.

Killing a busy device

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Killing a busy device

    I plugged in a USB ram drive and it didn't work as advertised. I solved my problem by using a different drive, but the image from the first one is still stuck on my desktop. How do I remove it?

    The mount command shows the device as /dev/sdb1 on /media/NO NAME type vfat

    The below pretty much shows my situation:

    Code:
    ole@SCO:/media$ sudo rm -rf NO\ NAME/
    [sudo] password for ole:
    rm: cannot remove directory `NO NAME': Device or resource busy
    
    ole@SCO:/media$ umount /media/NO\ NAME/
    /sbin/umount.hal: /media/NO NAME is not recognized by hal

    #2
    Re: Killing a busy device

    "ole@SCO:/media$ umount /media/NO\ NAME/"

    You did this without sudo. mount and umount require sudo to perform.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Killing a busy device

      Thanks Snowhog, but I did that to show the output in case it would be useful. With sudo there is no output, and nothing changes.

      Comment


        #4
        Re: Killing a busy device

        1. Typically a successful mount or unmount produces no output, just a new prompt.

        2. Try "NO NAME" instead of NO\ NAME (just an idea)

        3. Try lsof | grep "NO NAME" and see if there are any files open on it.

        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

        Comment


          #5
          Re: Killing a busy device

          It could be umount itself that is stuck.

          Try the "-l" (lazy) option in your parameter list.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: Killing a busy device

            Thanks everyone!

            I tried lsof | grep "NO NAME" because that seemed like a brilliant idea. No output though. I didn't get to the "-l" option because I made a mistake. I did a Ctrl-Alt-Esc and placed the cursor on the dud device icon. That resulted in the desktop disappearing. Brilliant! All windows were still open though. Anyway, that meant I had to do the unthinkable - reboot. I did that and the dud icon went away, and so did the /media/noname directory. So that problem is fixed - albeit in the most inelegant way possible.

            Perhaps I should just have rebooted in the first place, but that is something that I avoid like the plague. It only takes 20 seconds to shut down, and 60 seconds to boot up to the login. However, after that, it takes the best part of 10 minutes for the browsers to reload their pages so my computer can get back to normal. In this case part of Firefox blew up and I lost all the windows. Opera played a similar joke on me. I am NOT a happy camper, which is generally the case when I have to reboot. /rant

            Anyway, the basic lesson for me here is that not all USB memory sticks are equal. I don't know if the bad one got that way or was created that way, but now I know to be careful with them.





            Comment

            Working...
            X