Archive for the ‘Tech’ Category

Thumb drive data recovery

I haven’t done any data recovery or data rescue work in sometime (the last time was on Linux, with a combination of dd, ddrescue, and some throwaway code to parse JPGs – it was a Compact Flash card that needed saving). This time, all I had was macOS, a 16GB thumb drive, and the files were someone’s life’s work, which were more than just JPGs but also AI (adobe illustrator), DOC, XLS, PDF, TTF, etc. files.

So via Homebrew, I installed ddrescue again. A command like ddrescue -v -n -c 4096 /dev/disk2 helena.dmg helena.log seemed to work. On macOS, fdisk totally couldn’t get me anything useful and if I ran diskutil list the output would be as follows:

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *15.5 GB    disk2

For good measure I wanted to also make an image via dd, dd if=/dev/disk2 conv=sync,noerror bs=4096 of=helena.img. It was clearly throwing many errors, an example of which:

13399375872 bytes transferred in 1263.864380 secs (10601910 bytes/sec)
dd: /dev/disk2: Input/output error
dd: /dev/disk2: Input/output error

The real problem was mounting either the DMG or the IMG. On Linux you have this option to loopback mount a file; on macOS this isn’t quite there. There is hdiutil but frankly, this doesn’t work if there is no partition record. I tried to mount it using hdiutil attach -noverify -nomount helena.img but that didn’t work to then do a diskutil mountDisk.

Then… I found a tool: PhotoRec. I wouldn’t have to write something to parse the magic numbers and extract files. PhotoRec just works. It parsed the IMG file, and spat out plenty of files to look at. Recovery was generally full.

For reference, on Linux, there are some good resources: Mounting a raw partition file made with dd or dd_rescue in Linux, and Guide to Using DDRescue to Recover Data. From a forensic standpoint, Disk-Arbitrator looks like a good tool as well.

December 2017 Crypto Tab Sweep

Cryptocurrencies? Blockchains? I’m sure you’ve heard of them before by now, unless you’re living under a rock. I’m an open source & database guy, so for me, I look at all this with a fine toothed comb. Probably doesn’t help that I enjoy reading the FT on a daily basis. Anyway, a selection of links… You may not be able to read all the links (subscriber only), but maybe I’ll think about something new come 2018.

Not all cloud instances are created equal

You know how anecdotally we say, “in the cloud, bad nodes exist” so you should always get a baseline?

Today I ran a query (repeatedly) on sqlite3, and on two instances, I got time measured as:

Run Time: real 13.405 user 13.243332 sys 0.046667
Run Time: real 10.989 user 10.963332 sys 0.010000

This naturally skewed results I initially got for something related to MySQL/MariaDB benchmarking. It really was such that while I had 2 instances, in the same region/AZ, I had one “good” node and one “bad” node.

Vertu no more

Vertu has wound up.

Was this a case of a string of management failures? This company started at Nokia [sic] in 1998, then sold to a private equity firm EQT in 2012 for more than €200m, then to an obscure Chinese company called Godin Holdings in 2015, then in March 2017 to Murat Hakan Uzan, a Turkish exile based in Paris.

I have only ever seen one Vertu phone in the wild (on a Cathay Pacific flight in business class; she had a 12.9″ iPad Pro as well). I did see a couple of their stores still open and very much trying to flog their wares (Oriental Plaza Beijing, amongst a few others; though I suspect they were not owned by Vertu directly or it takes some time for international foreclosure to work).

FT’s Jonathan Margolis (“UK’s original consumer tech journalist”) sings praises for Vertu. In 2012 he wrote an official company history that was never published as the CEO who commissioned it, departed (warning bells should have already gone off then). Vertu apparently did well under Nokia’s stewardship, and even a year into their new owners; in total they sold 500,000 of their phones.

What struck me as well is how many “luxury” companies bet on China. What China giveth, it can also taketh: “Restrictions on business gift-giving in China from 2014 onwards affected Vertu. The phones were a popular status symbol there. One small city, Wenzhou in Zhejiang province, had two Vertu stores.”

I will respect this one brand aspect: Vertu in its pre-2013 heyday never gave away phones to celebrities. Why don’t more brands realise this? Consumers are getting smarter about product placements.

They apparently also had a niche userbase: Vertu phones from 2002 are said to still work. Updated versions of early voice-and-text-only models were its best-sellers until the end. Many Vertu owners used phones only for calls.

All in, its sad to see a brand I’ve known for so long, reach its demise. It seems like if you owned a Vertu, you were really part of an exclusive club, which is why I never saw many in the wild.

Evernote + Instapaper search tip

I use Evernote a lot. And I also love the read-it-later service Instapaper. When I power through my Instapaper queue, I occasionally like articles (though I mostly archive articles). When I like articles, they get saved to Evernote automatically, in full-text, parsed via Instapaper (so its pretty text and images, no junk ads, etc.).

What do you do with all the notes that accumulate in your Evernote inbox? Run the search: author:no-reply@instapaper.com. You'll find everything relevant, and you can move it to another notebook.

If for some reason it doesn't work, try running and saving this search on the web interface, and then sync, to execute locally on the Mac client.

When your Mac’s display out stops working

I landed in San Francisco at around 10pm, hit the hotel in Santa Clara by 11.30pm, crashed, and woke up to give my tutorial at 9am. By 8.45am, I couldn’t get my 12″ MacBook to display out via HDMI or VGA to the projector, so I ran back to the room to get my 15″ rMBP instead.

Later on, I ran the Apple Hardware Test. Or what it’s called now, Apple Diagnostics. Everything came back just fine, which seemed odd.

The best fix seemed to then be resetting the NVRAM. That didn’t improve things, so I had to reset the System Management Controller (SMC), and voila! everything seemed to work thereafter.

In the years of using Apple hardware, I have to think this is the first time I’ve had to do this. I guess the presentation pro-tip here is always carry a backup presentation device (I might going forward get the relevant dongles for the iPad to run a presentation too).


i