OSX Mavericks Possible Data Corruption Bug

Over the past two weeks there has been much upheaval in my life. Involved with this upheaval has been one of the most unwanted activities any IT professional has to do as part of their professional lives and that is bowing out gracefully. Sometimes IT professionals can actually achieve this state of grace, however most of the time fear overwhelms grace and trust. The morality I will leave to another blog post to come.

In rescuing data from a computing device a few days ago I discovered that the act of using a USB external hard drive with a Macintosh MacBook Pro with OSX Mavericks may have a nasty bug lying in tall grass. I had about 212GB of data that needed to be moved to another medium, and I elected to use a Western Digital external hard drive using USB 2. This drive had never before shown any signs of failure however after copying the data onto the drive using OSX Mavericks, the HFS filesystem on the drive suffered some mystery damage that I’ve never witnessed before. Thankfully the volume was mountable and I could rescue the data from the errant drive and copy it to another drive and effectively save my bacon. The error concerned a failure in the node structure when fsck was asked to diagnose the HFS Journaled filesystem present on the suspect drive. Now I can’t say for sure that OSX Mavericks caused this failure, but the proximity of it and an earlier email from Western Digital stating that there might be drive problems with OSX Mavericks also rang in my mind as a potential problem that points to this particular possible bug. Now the Western Digital warning was just for their drives that used the extended WD software to mount the drives to the Macintosh file system, I suspect that the bug is indeed deeper than even WD knows, or Apple perhaps.

If you are using WD, or perhaps any other external hard drive or memory-stick technology with OSX Mavericks the smart money is on frequent backup and sync to multiple locations. Really smart administrators will backup over the network to some other computing platform with it’s own independent drive technology. If you are using Macintosh OSX Mavericks, I would say it’s better to be safe than sorry and for the love of all that is cute and fuzzy, make your backups!

RSVP – A Saving Grace

There is a fantastic class of applications that are available for the iOS, Android, and Apple/IBM Computing platforms that really assist with speed reading. These applications are based on the same reading technique called RSVP, Rapid Serial Visual Presentation.

RSVP defeats subvocalization while reading. Many people subvocalize while they read and it becomes a habit. What most people don’t understand is that you do not need this subvocalization to actually comprehend what you read. The way to defeat this slow-reading habit is to fix the eyes in place and present the words too fast for you to vocalize them. Many of these applications start you off at around 300 words per minute, with sliders that let you adjust the speed up as you get used to the feeling of reading without subvocalization.

Recently I had a business need to consume a lot of written work, and I would have been hopelessly slow if I had continued my habit of subvocalization while I read. With RSVP I’ve been able to increase my reading speed to about 520 words per minute. Instead of taking half a year to polish off a 250 page paperback book I can now liesurely read it on-and-off over a weekend and be done with it. The nice part about RSVP is the faster you read the better your comprehension is, which seems to defy common sense. I’ve found that sometimes 520 words per minute is too annoyingly slow, and I’ve been known to push it to almost 600 words per minute, and it’s a pleasure to read at that speed.

Here are some applications that I’ve found that feature RSVP:

iOS –

  • Velocity – This free app on the Apple App Store can connect to Pocket, as well as act as an Open In… target for other applications that handle text. Velocity can also detect web addresses and present the text on the page as RSVP quite well. The interface to Velocity has a lot of polish and is quite a pleasure to use.
  • Fastr Pro – This is another free/low-cost application on the Apple App Store which features RSVP. This application has something special as far as I’m concerned and that is an open data locker where you can upload your ePub files and synchronize your library and last-read bookmarks across your iOS devices. I’ve run into some bugs with the software, but upon later analysis it was purely operator error, not the fault of the software. I was too impatient for Fastr Pro, and because I wasn’t willing to wait, I caused my own headaches. This app is written well and the developers have a fantastic sense of humor and are exceedingly friendly to work with.

Android –

  • Speed Reader – I’ve only been using this app for a little while. It’s free and the software is quite good. I ran into a little bug where the end of my ePub files were being missed in the conversion, as the app converts ePub files to TXT files before processing them in it’s RSVP engine. Something causes the last chunk of data on the ePub to not appear in the TXT file, as far as I can tell.

Windows/Mac Computers –

  • Spreeder – This is a website that works well on browsers on these two platforms. The site, www.spreeder.com has links to the Java applet as well as a Bookmarklet that enables one-click access to their RSVP engine. The nice thing with Spreeder which I appreciate is there are more adjustable settings with its RSVP engine. You can elect to chunk words, so it speeds up around small words and slows down around large words, keeping your average reading speed set to your preferred speed as well as a host of other thoughtful adjustments. I encourage everyone to visit the site and investigate for a full view of this product.

Generally these programs can help you increase your reading speed, allowing you to chew through written works much faster, and with much less eye-strain than with other speed-reading techniques that I have tried. I find it works better than skimming, which sometimes leads you to miss small salient details, and after a while using my fingers to release eye-strain just pushes the strain into my hands. I encourage everyone to look into this technique. RSVP revolutionized my professional career and quickly enabled me to consume a lot of written text much faster than I ever thought possible. I’m sure if I really invested serious concentration I could increase my rate to ever higher numbers as RSVP becomes easier as you get used to it, almost like exercising a muscle.

If you liked this column, please comment. Now that I am an independent IT specialist I thrive on feedback!

Many Thanks!

iOS 7 and Logitech Ultra-Thin Keyboard Cover

I’ve run into a very curious issue with my Logitech Ultra-thin keyboard cover for my iPad 3 running iOS 7.0.2. Here’s the problem:

1) If you are in any application when you start all of this with the application ready to accept text, the iOS virtual keyboard appears. So for example, I start Drafts and start to type on my iPad.

2) Turning on my Logitech keyboard makes the virtual keyboard drop down off the screen, as usual, and I can type using the keyboard. Everything is all regular up to this point.

3) If you turn off the keyboard, the expected behavior is for the virtual keyboard to reappear. It does not, at least not on my iPad 3. I can open any other application that features text insertion, like Notes or Email (with an open new email) and the virtual keyboard will not appear.

4) So far I’ve found two ways to fix this. The first is the inglorious kung-fu grip of holding down power and the home button at the same time to reboot the device and the other solution, which is more acceptable but still annoying is to start the Logitech keyboard, open an app that uses text insertion functions and press FN-F3, which should make the virtual keyboard appear. Then turn off the Logitech keyboard and you should be good to go from that point forward.

If anyone has noticed this problem and knows of a fix, please leave a comment!

Thanks!

EDIT: As it appears, the keyboard is not reliable so it seems that I’ll be resetting my iPad after all. Blah!

OwnCloud

At work I’ve been thinking about cloud sync services, something like Dropbox without actually using Dropbox, because it’s non-kosher around these parts. I thought about OwnCloud so I went investigating.

OwnCloud is neat, it’s a PHP script that will set itself up on a web host, and then provide you with a web interface like Dropbox and access to clients like Dropbox which mirror the function of Dropbox completely. This was a possible route to satisfy our legal people and maybe leverage cloud sync at work. As it turns out, it didn’t work. OwnCloud is a lost cause. I installed it on my iPage host and got it to work all up until I tried to connect the Mac desktop client to it. It got files perfectly well, but when I put a file in the owncloud folder to be synced back up to my host it all fell apart. The error was “errno 22” and ended up being shown to me as “Bad Request” – so that was a no-go. Then I thought maybe I could install OwnCloud on my Mac Pro server at work, keep it in house maybe. That also was a failure, the web side was fine, but the client just couldn’t connect no matter what I tried.

So I’m going to abandon the pursuit of OwnCloud. I’ve tried it and found that it just won’t work on what I’ve got. It was something that could have possibly worked and been great, but it’s got too many moving parts and it was a total failure when you tried to get all the parts to spin up and run. Oh well, at least now I know I can abandon OwnCloud and move forward.

iOS 7 and iMessage

After I upgraded to iOS 7 on my iPhone 5 I ran into a really annoying problem. Whenever I would send iMessage messages to friends and family the message would look like it’s sending and then the progress bar along the top would stop about 1/4 inch from the end and just stay there for hours. Never sending the message. I tried the Kung-Fu Grip to only partial avail. The solution is to reset the network settings on the iPhone:

Tap Settings
Tap General
Tap Reset
Tap Reset Network Settings

Once the phone resets, and you reset your Wifi and turn on all the cellular bits, like voice and data roaming (at least for me) then after that, everything works as it should.

If this helps you, please let me know. 🙂

WIL WHEATON dot TUMBLR, So any journalist passing through London’s Heathrow has now been warned: do not take any documents with you. Britain is now a police state when it comes to journalists, just like Russia is.

WIL WHEATON dot TUMBLR, So any journalist passing through London’s Heathrow has now been warned: do not take any documents with you. Britain is now a police state when it comes to journalists, just like Russia is..

This post by Wil Wheaton is a really great reminder that when you are traveling, and I wouldn’t necessarily just put this as international to Britain but even when visiting the next town or crossing state lines even. Rights are being trampled everywhere you go, wether it be from a out-of-control cop, a bloodthirsty Sheriffs deputy or even a sticky-fingered TSA agent there is no lack of potential thugs, enemies, and thieves in your midst.

There are ways to secure your data and keep it handy as well. Store everything in an encrypted disk image or TrueCrypt archive on a cloud service like Dropbox or Google Drive and duplicate the same things in your memory sticks. If the thugs take your devices then you can rest assured that all you lost was the material itself, but no content.

I’m surprised that journalists and people who know journalists don’t all use GPG to secure their communications. I would think that if you were a whistleblower or had contact with a whistleblower that these little checkboxes would be foremost on your mind and already checked off.

You can’t trust any government, any cop, or any Vampire to keep their word. This goes for everyone as well, including your carrier and service providers. What should Verizon know? Shit. How about Dropbox? The same. Trust nobody and you’ll be safer than someone who trusted someone else. Trust is earned and right now, very very few people have it.

Encrypt Everything

Lavabit and Silent Circle have given up when it comes to providing encrypted email communications. Mega plans on providing something to cover the gap and in general the only real way to deal with privacy-in-email is end-to-end encryption. There was talk that at some point email might give way to writing letters and using the US Postal Service but there as well you’ve got Postmasters writing commands taped to mail about how everything has to be photocopied and stored – so even the US Postal Service is full of spies, the only thing the US Postal Service can be trusted to carry is junk mail.

What is the answer? Pretty Good Privacy. PGP, or rather, the non-Symantec version of it which is the GNU one, the GPG. If you really want to keep what you write private when you send it to someone else, the only way to do that is for everyone to have GPG installed on their email system so you can write email using their public key, which converts your email to cyphertext, secure from even the NSA’s prying eyes, and requires your recipient to unlock the message using their secret key, which they have.

I’ve been playing with PGP and GPG now for a very long time and I decided I would at least make a route available if anyone wanted to contact me with privacy intact – my public keys are on my blog, they are also on all the keyservers including the one hosted and run by MIT and the GPG Keyserver as well. To send me a private message via email all you need to do is get GPG, set it up, create your secret and public key, get my public key, use it to write me an email and only I’ll be able to read it. The NSA will just flag the encrypted contents for later analysis and thanks to AES–256, they’ll be hard pressed to get to the plaintext in your message.

That’s the way around all of this. GPG for everything. GPG public keys for email, for chat, for VPN, for files, and HTTP-in-GPG. Everything pumped through GPG. Since the government won’t stop spying on us, it’s our duty as citizens to secure our own effects against illegal search and siezure, and technology exists to do so.

Encrypt everything.

Grayed Folders in Macintosh OSX

While copying files to an external hard drive with a bum cable using my Mac’s Finder to move the files I ended up with an accidentally half-copied folder that was grayed out and I couldn’t open it at all. I could go into Terminal and access it that way, but Finder was a dead duck. Even after I properly unmounted and remounted the drive it didn’t work. I putzed about for a while searching for a solution and the general answer most people have is to use the ‘cat’ command to copy the files elsewhere and just be done with it. This didn’t sit well with me, there should be a way to correct the situation without having to duplicate the folder or copy the files or do anything laborious like that – and it turns out there is just that.

The folder had a creation time of some date in 1984. Probably the first possible date for OSX knowing Apple. They initiated the folder but since the move was interrupted the later adjustment never got made. This is a bug, Apple. Anyways, how to correct it? Some people seemed to think that the ‘touch’ command could possibly do the trick, but touch can’t really get to all the dates that come with files in the HFS file system. This folder, for examples sake I’ll just call it “folder” had displayed this 1984 date as it’s creation date. The touch command was successful in mangling all the other dates, except for the specific one I was after. I used the ‘stat’ command on the folder and discovered that the st_birthtime of the folder was 1984. How in the hell do you change that date?

I found out that you need another utility to do it properly. You need to download the Command Line Tools for XCode, which is the development platform for the OSX Operating System. It’s free and easy to install. Once you do that, you will get a new command to use in the terminal called SetFile. So here’s how to fix this problem if you run into it: SetFile -d [todays date][file or folder] and press enter. So for my file, it would be SetFile -d 08/17/2013 folder/ and press Enter. Voila! Folder is real and not-grayed and Finder thinks it’s just peachy keen.

So for anyone with grayed out folders, check your dates. Use the stat command, download the XCode CLI tools and use SetFile to rescue your folder or file from inaccessible hell.

Private Dancer

Several days ago, while pondering an issue we’ve had at work an epiphany struck me. The problem we ran into was that our local network is a box of question marks. We don’t really know how it’s assembled or really what the rules are for using it, we just plug cables into wall jacks and if things work, they work. Until they don’t.

Enter NetInstall and NetRestore. These are the two imaging technologies for Macintosh and I’ve assigned my coworker to explore and develop images. Frankly he self-started it and I encouraged his exploration. We tried it first and both actions use a lot of bandwidth on the network and we eventually ran into a lot of problems. Not only did the machine we were working on take forever but it bogged down the server and caused huge headaches for everyone. We came to the conclusion that our local network just isn’t designed to carry any payload of appreciable size. It’s not really a complaint, but more of a characterization. It’s kind of fragile and wimpy.

So, was there a way we could still use ethernet technology without having to depend on our “provided” fragile and weak network? I sat in my chair pondering all of it, knocking some options out of the park instantly because of the machines we have. We can’t really depend on IP-over-Firewire as we have plain-jane MacBooks in the mix, they don’t have FireWire ports, just ethernet ones. As I looked across the way at all the server technology I had in the rack it struck me, each one, including the lowly Drobo had two Ethernet ports. Huh. Two. Only one was really being used to connect each machine to the network so each one had an available secondary port available. I then started to root around in my junk bin and found an old unused Netgear ethernet switch, five ports model, no fuss, no muss. I then grabbed a gaggle of short ethernet cables and started hooking all my servers and such to this little spare switch. Everything worked out magnificently well. In each server I configured these ports to conform to 192.168.0.* and assigned manual IP addresses for each of them. Then I found a unused Apple Express Wifi Access Point, plugged it in, set it for bridge mode and now I can extend this custom network into Wifi using 802.11N which is nice and fast. Just like that, cake and eat it too! What’s great about this setup is that my coworker and I can move large batches of data all over between these machines without having to worry about clogging up the network for all the other users who are trying to use these servers for their real work. Their files are small and their use sporadic, our use is large and nearly (sometimes) constant. The parts are just a few more blinking lights in the rack and just a little bit more spaghetti wiring hither and yon, but I don’t care, it works and it was free with the parts I already had on hand. The only part of all of this that upsets me is that I didn’t think to do it sooner. I suppose I should take some solace that it’s better late than never. Having this private access to all the systems makes both of our lives much better. We don’t have to complain to central networking anymore because we’ve abandoned their fragile wimpy thing for a far better solution in-house, and because it’s unroutable, we didn’t break one single rule, mind we don’t know what the rules are, but still. 🙂

It’s a good Friday.

Automatic Tag Generator for DayOne Journals synced with Dropbox

Here’s how I created a system to automatically sync up keywords to tags in DayOne Journal. The journal is stored on my Dropbox, so if you have it in iCloud, I don’t know what you’re going to do.

First Step: Get text list of tags in a text file: (do this in the entries folder of your DayOne Journal, cd to it, if you can’t, google-fu.)

find . -type f |xargs sed -n “/<array>/,/<\/array>/p”|grep “<string>”|sed ‘s/<[^>]*>//g’|sed “s/^[ \t]*//”|tr -d ‘\011’|sort -f|uniq > tags.txt

Then copy this tags.txt folder to your home directory. Edit the file, be careful of phrases in XML that would confuse the system, Weather, Apple, DTD, String – that sort of thing, also be very careful around TLA’s as they can have unintended side effects. The later scripts that do the keyword searches don’t give a damn about cases, so your keywords or your KeYwOrDs will be equivalent.

You’ll need two more scripts. This one adds tags based on keywords passed to it as parameters: (be VERY careful, little L and capital I look very much the same, read man pages, yo)

tag.sh:

#!/bin/bash

cd /Users/username/Dropbox/Apps/Day\ One/Journal.dayone/entries

find . -type f -print0 |xargs -0 grep -L “<string>”$1″</string>”| xargs grep -li “”$1″” |xargs grep -l “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags:Key string “$1″” file

find . -type f -print0 |xargs -0 grep -L “<string>”$1″</string>”| xargs grep -li “”$1″” |xargs grep -L “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags array” file

find . -type f -print0 |xargs -0 grep -L “<string>”$1″</string>”| xargs grep -li “”$1″” |xargs grep -l “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags:Key string “$1″” file

Next, you’ll need another script called updatetags.sh, looks like this:

#!/bin/bash
cat /Users/andy/Dropbox/Apps/Day\ One/tags.txt|xargs -n 1 /Users/andy/tag.sh

The last bit will be a new LaunchAgent, so go to ~/Library/LaunchAgents and mock up a plist file by copying one from there, if you need an example, try this:

more ~/Library/LaunchAgents/com.andymchugh.tag.plist
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN”
“http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>Label</key>
<string>org.andymchugh.tag</string>
<key>ProgramArguments</key>
<array>
<string>/Users/andy/updatetags.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>06</integer>
</dict>
</dict>
</plist>

The name of the LaunchAgent has to be unique and the inside name (<string>org.andymchugh.tag</string>) should match the file name like you see here. Swap out the com bit for org, and forget the plist bit. This script will run every day at 6am. You can flavor it to your liking.

Then the final command to tie it all together:

launchctl load -w com.andymchugh.tag.plist

So now, when you write DayOne Journal entries you can mark up the tags.txt file that lives in your Dropbox. Value added, if you change this file anywhere, Dropbox will make sure it syncs up with all your other systems, so you can edit it and forget it pretty nicely as long as it’s not open-for-editing when your script fires off at 6am. That would be messy.

The first time you do it, you’ll notice your Dropbox churn for a long while and then all your other connected Dropboxes will churn as they sync up. Your iPhone and iPad will have huge downloads to do, but they’ll catch up well enough. As you create new DayOne Journal entries you can rest assured that your script will be doing keyword searching for you on your behalf and hooking up your tags to your DayOne Journal entries for you.

Just one more thing automated and out of the way. Hooray!

P.S. Backup your Journal, DIY. Be safe, be smart, learn how to use tar. man tar. Read it. Live it. tar is your delight and your savior. 🙂

EDIT: tags.sh needed a cd command first, otherwise it would just wander aimlessly. Sorry about that.