Author Topic: All media refusing to eject from iMac  (Read 3867 times)

Offline HamptonCaught

  • Super Poster
  • ***
  • Posts: 215
    • View Profile
    • http://
All media refusing to eject from iMac
« on: July 09, 2013, 07:40:42 AM »
Hi all

I posted this yesterday, but it doesn't seem to have appeared - as I'm a very infrequent visitor, I thought the post might be being checked by a moderator, but now I'm wondering if it just went into a black hole.

Anyway, as an infrequent visitor, I hope you don't mind me posting an issue I'm currently having.

I've been loading my iTunes music library onto an SDHC card to put into my car's system so that my music is always available when I'm on the road.

The music loaded fine, but there were some hidden files on the card that showed up on the car's audio screen ('.DS_Store' - things like that). I found an online tutorial to get rid of these and so played around in Terminal.

The next time I put a CD into the drive, it refused to eject. I tried all the usual things - tried to eject from iTunes, Disk Utility, restarted with the option key down and then tried the keyboard eject button, restarted with the mouse button down and even tried Terminal ('drutil tray eject'). No luck. Two hours later, it ejected by holding down the mouse button on start up. Thinking there was a problem with the CD, I put another one in - exactly the same problem. It seems to think that the CD is in use by an application even though there's nothing else open.

When I put the SDHC card back in, I get the same problem with that. The system thinks the card is being used by another application. When I put a memory stick into the USB port last night - exactly the same, I can't eject it. I'm offered a 'Force eject' for both the card and the stick, but when I try that, the device still doesn't unmount. I get loss of data warnings whenever I pull the card or stick out of the machine.

I'm at a bit of a loss to know what to do next. I've run Disk Utility and repaired permissions (more than once).

I'd be really grateful for any suggestions. Is there a Terminal command that resets things back to the default?

No lectures on not messing with Terminal unless you really know what you're doing though - I don't think I could stand that.  toothgrin.gif

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13797
    • View Profile
    • https://www.paddyduncan.com
All media refusing to eject from iMac
« Reply #1 on: July 09, 2013, 01:02:00 PM »
No worries about being an infrequent visitor - any and all questions are welcome! wink.gif

When you say you fooled around in Terminal, did you actually remove files on your iMac? If so, that's likely the problem.

If you could provide the link to the site where you found the tips, that might help as well.

You can also run the Terminal command show in this link to find out what your Mac thinks is using the disk in question. Be careful to copy the command EXACTLY, with the name of your drive/media, of course.

http://serverfault.com/questions/159422/os...enting-ejection

I don't think there is some magic command to put things back that you've removed - depending on how bad it is, it may require a system reinstall. Or...better yet, do you have a recent (working) cloned backup? Or, Time Machine backup that could be used?
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13

Offline HamptonCaught

  • Super Poster
  • ***
  • Posts: 215
    • View Profile
    • http://
All media refusing to eject from iMac
« Reply #2 on: July 09, 2013, 03:30:42 PM »
Hi Paddy

Many thanks for your reply. I followed your links and tried the Terminal commands given, but to no avail. There are programs shown as being 'open', but far too many to go through and nothing very obvious. I also downloaded the 'What's Keeping Me?' app from your link, but that's showing the same - hundreds of open files, but no major software applications.

This is where I first found the information on removing the .files from the SDHC card;

http://www.haydnwilliams.com/blog/vw-golf-...s-and-album-art

I'm not aware that I've removed any files from the Mac, but I've clearly done something. I'm starting to think that a system reinstall may be the only way forward. No cloned back up or Time Machine here, I'm afraid.

Thanks again,

Paul

rgray

  • Guest
All media refusing to eject from iMac
« Reply #3 on: July 09, 2013, 03:30:46 PM »
QUOTE(Paddy @ Jul 9 2013, 02:02 PM) <{POST_SNAPBACK}>
When you say you fooled around in Terminal, did you actually remove files on your iMac? If so, that's likely the problem.

If you could provide the link to the site where you found the tips, that might help as well.


What would be most helpful would be if you could quote the EXACT COMMAND(S) you used so we see axactly what was done....

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13797
    • View Profile
    • https://www.paddyduncan.com
All media refusing to eject from iMac
« Reply #4 on: July 09, 2013, 06:51:12 PM »
Well, given the lack of specificity on the tip site, I suspect that something got deleted from the iMac!!

QUOTE
If you use a Mac, you'll find that it scatters files beginning with a dot in their name across the folders, e.g. .DS_Store The Golf doesn't like this, and so you'll need to get rid of them, otherwise it will just skip over any directory with them in. If you use a Mac then you can use the Terminal to do so – open a new Terminal window or tab, and 'cd' to your SD card. It will be be at /Volumes/[name of card]. Then run a 'find' command to look for all the files:
cd /Volumes/CarMusic
find -type f -iname ".*"
If that looks like a sensible list and you want to delete them, run the find command again but include the '-delete' flag at the end.


Good grief! "Sensible"??? What kind of a suggestion is that? Sensible in whose estimation? Yikes.

And it would be easy to delete files from your Mac if you got the directory wrong...
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
All media refusing to eject from iMac
« Reply #5 on: July 09, 2013, 08:04:56 PM »
.DS_Store files are impossible to keep removed. The OS creates them (if they've been removed by force) as soon as the machine is restarted, actually, I think they are created simply by opening the directory that once had them. The file is simply a list of the positions of the icons for anything in the folder. It tells the OS how to display the contents of that folder the next time it is opened. It records where things are positioned whenever the folder is closed (normally or on Shut Down). I think suggesting that they should be removed is not only silly but downright dangerous since the person suggesting it obviously doesn't know what he is talking about! Who knows what else he might suggest?! Close his site immediately, delete any bookmark to it and then erase the browser cache.

Any file name starting with a period "." is, by default, not displayed by Finder (or any other app, normally). They are 'hidden' for the exact purpose of preventing people from deleting them accidentally. They are a major part of any unix system for required System files. They should absolutely never be deleted unless you know exactly what you are doing and have already triple-checked to be sure that they are not needed. Terminal is an extremely powerful tool with almost no protection from being abused. It does exactly what you tell it to do without question, normally. If you tell it to erase the boot drive, it will kill itself while performing the act. OK, maybe Terminal won't try to kill it's own System, but I'm not sure and I'm not going to test my theory to find out! laughhard.gif

<Wikipedia info on .DS_Store files with links to Apple Support>

If you absolutely insist on deleting a .DS_Store file (maybe because you think it is corrupted), there is absolutely no need to open Terminal. Simply open Finder->Preferences->Advanced and check the "Show all file name extensions" checkbox. You can now see all those other 'hidden' files and even delete the .DS_Store file in any folder. Simple, Safe, Easy. salute.gif Close the window, open it again, there's a new .DS_Store file, hopefully un-corrupted.
« Last Edit: July 09, 2013, 08:15:13 PM by Xairbusdriver »
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13797
    • View Profile
    • https://www.paddyduncan.com
All media refusing to eject from iMac
« Reply #6 on: July 09, 2013, 09:09:33 PM »
Further to Jim's remarks, I'm not sure what you did originally, but the easiest way to get music onto the card would be to make a playlist in iTunes (making sure they're all MP3s or converting those tracks that are in other formats first) and then selecting all the tracks in the playlist and dragging that playlist to the card. Done. No funny extraneous files, invisible or otherwise. How did you copy these files to the card to begin with?

Anyway, do you have the 10.6.x install disk handy? If so, I'd reinstall the OS and update from there. A good set of instructions here: https://discussions.apple.com/thread/447866...=0&tstart=0

BUT...PLEASE...before you do ANYTHING, go and get yourself an external backup drive, and make a bootable backup. Or, since you have a Mac Pro, just get yourself another SATA drive, and pop that in and make a bootable backup, using SuperDuper. If you get the paid version, you can schedule automatic backups, so you don't even have to think about it.

Once you've reinstalled the OS, and done all the updates and made sure that everything is working ok, THEN run SuperDuper again and update your backup, so you will now have a backup of a fully working system. Then continue with automated backups. I backup every night, and once a week to a different drive. Redundancy is good. smile.gif

I can't stress this enough. Drives fail. Files get corrupted. Things get erased by mistake... Backups are essential, unless you really don't care about your data/your time/your sanity. wink.gif
« Last Edit: July 09, 2013, 09:13:27 PM by Paddy »
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13

Offline HamptonCaught

  • Super Poster
  • ***
  • Posts: 215
    • View Profile
    • http://
All media refusing to eject from iMac
« Reply #7 on: July 10, 2013, 05:28:29 AM »
Many thanks for all of your replies.

Paddy - I spent some time initially sorting out my iTunes library - many of the CDs I'd ripped were in Mp4 format, so I converted everything to Mp3. Most of the music is fine, but some folders seem to contain duplicates of songs that are clearly hidden files. They don't show on the Mac but once the SDHC card is plugged into the car, they show up on the screen. They have the same name as the correct song file, but are proceeded with a ._. There is also a .Trashes file on the card that I'd like to get rid of.

I dragged the music folders onto the card (outside of iTunes) to load, but if you think I'm better off creating a playlist and then dragging that to the card, I'll try that. I can easily wipe the card and reload all of the music (although I'll get the problem with the card not ejecting and warnings about data loss when I pull it out). I'll try that.

Yes, I have the original discs so can reinstall the OS and I've got the message on the back-ups. It's my home computer, so it's not full of work or anything (my work machines are backed up daily), but there are photographs and music that I'd hate to lose.

Thanks again for all of your help. If I've learnt one thing from this, it's 'Don't mess around with Terminal unless you're absolutely sure what you're doing'! It's now one of my mantras for life.

rgray

  • Guest
All media refusing to eject from iMac
« Reply #8 on: July 10, 2013, 05:53:00 AM »
QUOTE(Xairbusdriver @ Jul 9 2013, 09:04 PM) <{POST_SNAPBACK}>
If you absolutely insist on deleting a .DS_Store file (maybe because you think it is corrupted), there is absolutely no need to open Terminal. Simply open Finder->Preferences->Advanced and check theç checkbox. You can now see all those other 'hidden' files and even delete the .DS_Store file in any folder.


This does not work on my 10.8.4 set up!!!  

I have that option checked in order to keep track if .doc files and their .pages conversions.

This option does not reveal .DS_Store files.

EDIT:  The reason  method does not work is because the name "DS_Store" is not an extension.

The method described in the post below this one by HamptonCaught works in my own testing and is written up in an OSXDaily post here with nice illustrations of just what to expect.
« Last Edit: July 10, 2013, 07:26:51 AM by rgray »

Offline HamptonCaught

  • Super Poster
  • ***
  • Posts: 215
    • View Profile
    • http://
All media refusing to eject from iMac
« Reply #9 on: July 10, 2013, 06:11:24 AM »
Once I reinstall the OS, I've found a simple, safe (relatively) method of viewing all hidden files.

In Terminal, type:

defaults write.com.apple.Finder AppleShowAllFiles TRUE; killall Finder

I should then be able to drag any unwanted files to the trash. I haven't tried this on the SDHC card yet, but it seems to work on the system.

Once finished, I enter;

defaults write.com.apple.Finder AppleShowAllFiles FALSE; killall Finder

To get back to having hidden files hidden again.

rgray

  • Guest
All media refusing to eject from iMac
« Reply #10 on: July 10, 2013, 07:28:13 AM »
QUOTE(HamptonCaught @ Jul 10 2013, 07:11 AM) <{POST_SNAPBACK}>
Once I reinstall the OS, I've found a simple, safe (relatively) method of viewing all hidden files.

In Terminal, type:

defaults write.com.apple.Finder AppleShowAllFiles TRUE; killall Finder

I should then be able to drag any unwanted files to the trash. I haven't tried this on the SDHC card yet, but it seems to work on the system.

Once finished, I enter;

defaults write.com.apple.Finder AppleShowAllFiles FALSE; killall Finder

To get back to having hidden files hidden again.



I have tested this method.  It works and is written up in an OSXDaily post here with nice illustrations of just what to expect.
« Last Edit: July 10, 2013, 07:30:24 AM by rgray »

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
All media refusing to eject from iMac
« Reply #11 on: July 10, 2013, 07:37:12 AM »
That short script works fine. And it is built-in by Apple. It simply writes to the .plist file (that's a type of file that stores the preferences you might change/edit. The contents of that file is what you see when you open any app's Preferences. However, there are often other things in it that you may not normally see. the "defaults write." method is the second safest way to make preference changes, the first is using the command-comma, normal method. wink.gif

When you used the ShowAllFiles, did you insert the SDHC card? If you did you would have seen all those file names that your car's display is showing you. On removable volumes/drives, there will be a couple of "._" files and at least one "." file: ._DS_Store, ._Trashes and the infamous .DS_Store. There will also be several other folders/directories starting with ".": of course but also .fseventsd, .Spotlight-V100 (used by, surprise, Spotlight! assuming you haven't told Spotlight to ignore that volume) and .Trashes (guess what's in there! doh.gif ).

The reason you see these files on the car's display is because it is not using the Mac OS file system. It simply displays whatever it 'sees' on the card. I don't have such a modern system on my car, I have to burn a CD for this kind of thing. But that is done by creating a Playlist in iTunes (as Paddy explains) and then burning the CD. When that method is used, the CD is recognized as an audio CD and the car's system 'knows' what needs to be displayed. I assume that the same method will work on the SDHC drive. Sounds like Paddy may have a 'smarter' car! I know she has a smarter brain! ;-)

When you simply drag and drop songs/files to the card (or even a CD) you are actually just moving the 'data' to that drive/card. Your car's system seems 'smart' enough to still be able to play the music files.

BTW, when you 'burn' the Playlist to the SDHC, notice that iTunes has a "Include CD text" (or similar text) on the first dialog you will see. If your car is as new ('smart') as I think it is, it will also write some other info on the card that may include the artist, genre, etc. My car is so old it can't even display the name of the song!! blush-anim-cl.gif tongue.gif
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline HamptonCaught

  • Super Poster
  • ***
  • Posts: 215
    • View Profile
    • http://
All media refusing to eject from iMac
« Reply #12 on: July 10, 2013, 08:37:36 AM »
Thanks, Jim - all useful stuff.

I haven't tried the Terminal command with the card inserted yet, but will do so tonight. And yes, I'm getting all of the hidden files that you mention when I use the card in the car.

I guess if I make a single playlist in iTunes (which is what I think Paddy is suggesting), I will then have an extra folder layer on the card. If I call the playlist 'Music' then that will be the first folder, followed by artists' folders, then albums and then album tracks. At the moment, the screen in the car goes straight to artists. Not really a problem either way. I'm much more interested in keeping all of the tags intact (including the album cover artwork, which displays on the car's screen), then in how it all breaks down. I also have to remove some duplicate hidden tracks, but I'm hoping that the Terminal command will do this as well as removing ._Trashes, .fseventsd, etc. etc.

Thanks again - I'll let you know how I get on, though I'm out of the country for the next 10 days so won't be back for a while.

Paul

rgray

  • Guest
All media refusing to eject from iMac
« Reply #13 on: July 10, 2013, 10:00:25 AM »
QUOTE(HamptonCaught @ Jul 10 2013, 09:37 AM) <{POST_SNAPBACK}>
Thanks, Jim - all useful stuff.

I haven't tried the Terminal command with the card inserted yet, but will do so tonight. And yes, I'm getting all of the hidden files that you mention when I use the card in the car.

I guess if I make a single playlist in iTunes (which is what I think Paddy is suggesting), I will then have an extra folder layer on the card. If I call the playlist 'Music' then that will be the first folder, followed by artists' folders, then albums and then album tracks. At the moment, the screen in the car goes straight to artists. Not really a problem either way. I'm much more interested in keeping all of the tags intact (including the album cover artwork, which displays on the car's screen), then in how it all breaks down. I also have to remove some duplicate hidden tracks, but I'm hoping that the Terminal command will do this as well as removing ._Trashes, .fseventsd, etc. etc.

Thanks again - I'll let you know how I get on, though I'm out of the country for the next 10 days so won't be back for a while.

Paul



1.     Be careful that you are only trashing 'dot' files from the card.
2.     Be sure to empty the Trash before you eject the card or you will leave a Trash file on it.
3.     Good luck with this.

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13797
    • View Profile
    • https://www.paddyduncan.com
All media refusing to eject from iMac
« Reply #14 on: July 10, 2013, 10:43:56 AM »
Well, my car (a 2004 Toyota Sienna) isn't exactly smart - it's actually rather old and stupid and so I can't test any of my own suggestions on it, since it plays CDs, and DVDs for those in the back, but doesn't do anything more sophisticated than that. It doesn't even have a USB plugin for an iPod - we have to use the cassette adapter, since there are too many radio stations in the GTA to ever get one of those FM transmitters to work.

But let us know how things go, Paul. And enjoy your travels. smile.gif
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13