Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: How OS X killed my TV  (Read 9130 times)

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
How OS X killed my TV
« on: September 22, 2013, 02:12:03 PM »

Yes, really  >:(

My TV viewing these days is all mythtv based, with diskless front ends, that boot from USB sticks.  The other day I was doing some maintenance, and plugged one of the boot sticks into my MAC to do some config edits.  Then I quickly changed my mind and unplugged it again.  Yes, I know I should have gone through the 'eject' sequence, and I forgot.  But I hadn't actually done anything to it, so what harm could it do?

Plenty.  Whenever you plug a USB stick into a bog standard OS X, it seems to write dozens of files to hidden folders, named .Spotlight-V100, .Trashes, and a few others.  I have no idea what they do, and no inclination to find out.  But  next time I rebooted the frontend, 'boot error', no TV, boot sector stuffed I guess.  I can think of no other explanation than that the damage was done by OS X writing these files, and me pulling the stick without proper eject. :(

Thankfully, I had a binary image backup and so was able to restore, but what a pain.  Why on earth would the authors of an OS assume I wanted it to write to a USB stick, just because I plugged it in  ???

Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43930
  • Penguins CAN fly
    • DSLstats
Re: How OS X killed my TV
« Reply #1 on: September 22, 2013, 03:24:13 PM »

I suppose you might just have been unlucky, pulling the stick out just as the OS was writing something critical to it. But I agree with you that it seems a bit odd that it should write to the stick at all. I guess this is part of the automation built into OS X, but I know nothing about how the system works.
Logged
  Eric

neilius

  • Reg Member
  • ***
  • Posts: 105
Re: How OS X killed my TV
« Reply #2 on: September 22, 2013, 03:59:22 PM »

The .Spotlight folder holds metadata for OS X's indexing service, Spotlight. It runs when a new drive is mounted and scans all the files on that device, building an index that is searchable through the spotlight button in the menu. As for .Trashes, that's created for when you delete files on the device in Finder. They actually get moved there and are only deleted when you empty the Trash in Finder. The . in front of each folder name is the normal Unix way of making a file or folder hidden and since OS X is basically Unix underneath...
« Last Edit: September 22, 2013, 04:02:42 PM by neilius »
Logged

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: How OS X killed my TV
« Reply #3 on: September 22, 2013, 04:20:42 PM »

The .Spotlight folder holds metadata for OS X's indexing service, Spotlight. It runs when a new drive is mounted and scans all the files on that device, building an index that is searchable through the spotlight button in the menu. As for .Trashes, that's created for when you delete files on the device in Finder. They actually get moved there and are only deleted when you empty the Trash in Finder. The . in front of each folder name is the normal Unix way of making a file or folder hidden and since OS X is basically Unix underneath...

Thanks, yes - I realise that OS X is Unix underneath.  But having a spent  most of my career working on Unix systems, I'm not at all sure that 'behind the scenes' shenanigans such as writing data to a USB drive without being asked, is really in the spirit of Unix.  And it is asking for trouble - yes I should have 'ejected' the volume before removing it, but people make mistakes and it's too high a price to pay for such a simple mistake.

In my view simply plugging a USB stick into a PC, then immediately removing it without even browsing its contents, really should not corrupt the stick.

I also see no value in services like 'spotlight'.  If I put the files on the system then I know where they are, so  why would I want an index?  And for the rare occasions I may forget, there's always good old Unix 'find'.
Logged

GigabitEthernet

  • Kitizen
  • ****
  • Posts: 2243
Re: How OS X killed my TV
« Reply #4 on: September 22, 2013, 04:35:31 PM »

You do know that you can change what Spotlight indexes right?
Logged

broadstairs

  • Kitizen
  • ****
  • Posts: 3714
Re: How OS X killed my TV
« Reply #5 on: September 22, 2013, 04:44:30 PM »

Just goes to show that Apple are almost as bad as Microsoft. I agree no OS should write anything to any usb device when initially plugged in, I dont care what it is for and OSX should by default not do this UNLESS the users turns such an option on.

Stuart
Logged
ISP:Vodafone Router:Vodafone Wi-Fi hub FTTP

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: How OS X killed my TV
« Reply #6 on: September 22, 2013, 05:02:59 PM »


Just goes to show that Apple are almost as bad as Microsoft. I agree no OS should write anything to any usb device when initially plugged in, I dont care what it is for and OSX should by default not do this UNLESS the users turns such an option on.

Stuart

Yep, that's my whole point.

You do know that you can change what Spotlight indexes right?

I do now since you have told me so, for which I am grateful (even if I sound grumpy  :D) and I will investigate, but the point is I never asked it to do anything at all in the first place, so I'm a bit a bit miffed given the outcome.
Logged

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: How OS X killed my TV
« Reply #7 on: September 23, 2013, 10:22:46 PM »

You do know that you can change what Spotlight indexes right?

Hi again Alec,

I've had a look at the spotlight options under system preferences and can't find anything that would stop it writing to an unrecognised  stick the minute I plug it in.  :(

It's clearly a well recognised bug that goes back a long way, and there are people on forums suggesting command line hacks, but my OS X system is quite precious for building apps.   Even if thes hacks work (which I doubt) I'd not want to resort to any undocumented tactics. ...

Any suggestions would be appreciated.
« Last Edit: September 23, 2013, 10:43:57 PM by sevenlayermuddle »
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 34034
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: How OS X killed my TV
« Reply #8 on: September 24, 2013, 12:03:02 AM »

Im just glad that you had a backup to be able to restore from.
The thought crosses my mind on if something similar could affect other systems that run from USB.


btw.. if the OS writes to the USB everytime.. even if it doesnt need to/shouldnt... wont this drastically effect the lifespan of the USB stick?
« Last Edit: September 24, 2013, 12:07:29 AM by kitz »
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: How OS X killed my TV
« Reply #9 on: September 24, 2013, 07:43:28 AM »

Im just glad that you had a backup to be able to restore from.
The thought crosses my mind on if something similar could affect other systems that run from USB.


btw.. if the OS writes to the USB everytime.. even if it doesnt need to/shouldnt... wont this drastically effect the lifespan of the USB stick?

Hmm, interesting points.

Another thought that crossed my mind...  on a recent holiday, I allowed a friend I was staying with to borrow the SD card from my camera so he could plug it into his laptop and copy some photos.  It was a MacBook,   so I wonder... will that have made an uninvited contribution to my camera's card?    :o   Must have a look and see.
Logged

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: How OS X killed my TV
« Reply #10 on: September 24, 2013, 08:38:38 AM »

btw.. if the OS writes to the USB everytime.. even if it doesnt need to/shouldnt... wont this drastically effect the lifespan of the USB stick?

I was pondering that thought during my morning cuppa', but thought it would probably not be an issue, as long as nothing had changed, it wouldn't need to modify existing index data.  Or would it?

So I've just tried again using that same USB stick (very very carefully!). I installed it, noted the timestamp on the Spotlight files, then I ejected, removed it and installed it again, and lo' the timestamps were all updated.  Therefor I'd say yes, I guess there will be a theoretical impact on USB lifetime.

It is now back in my myth front end, happily booting up (phew!).  Reason I had a backup was of course I built it myself, but it was ages ago and probably took me a good two or three days to get everything working.  I really didn't want to go through that again, so good old Linux 'dd' to the rescue...  with which the boot sticks' binary images can very easily be archived and recreated.
Logged
 

anything