SpinRite on a Mac using QEMU

Software

More out of interest sake than being under any illusion of practicality, I decided this evening to try running SpinRite in QEMU on my Mac Pro. The verdict: it works, if you have lots of spare time!

Notes before proceeding

I tested this on a Mac Pro, running SpinRite in QEMU on a non-system drive. I would assume if you booted Mac OS X off an external drive you could try this on your machine's system drive as well, but your mileage may vary.

QEMU is easy enough to build yourself, or its available on Homebrew, MacPorts, Fink and pkgsrc.

Finally, this action is allowing software raw access to your drive, so be extremely careful about getting the labels and identifiers right. Backup your stuff. Do at your own risk!

The procedure

  1. Go into Disk Utility, click the drive you want to run SpinRite on, then go to File → Get Info. Under the "disk identifier" heading you should see a string called disk[number]. Make a note of it.

  2. Use Disk Utility to unmount the drive. If it says the drive is busy but you're sure you're not doing anything with it, you can force eject it with its shell sibling:

    % sudo hdiutil eject -force /Volumes/[label]

  3. Temporarily assign yourself ownership of that volume:

    % sudo chown [your username] /dev/disk[number]

  4. Fire up a QEMU session:

    % qemu -hda /dev/disk[X] -cdrom spinrite.iso -boot d

From here on in, its just like SpinRite on a regular machine… although an order of magnitude slower!

Don't forget when you're done to return permissions to root on the drive:

% sudo chown root /dev/disk[number]

Why go to all the trouble?

SpinRite is a preventative hard drive maintenance utility that is run off a bootable FreeDOS image burned either to a CD or run off a floppy disk. Unfortunately, while it boots on Intel Macs, the software requires BIOS level access to drives which EFI obviously fails to provide. As a consequence, the keyboard doesn't work and even if it did, the drives wouldn't be accessible.

One potential workaround is to physically remove internal drives from Macs, install them in a regular PC with a BIOS and perform SpinRite on it. While this works, its terribly clumsy and doesn't lend itself well to performing regular maintenance as Steve Gibson suggests we use it.

This got me thinking whether or not it can be virtualised. Provided the software had raw access to the drive, theoretically one could create a virtual machine, boot off the SpinRite ISO image and have it do its thing. I'd tried it using raw access in VirtualBox before, but it was complicated to configure and ran as slow as molasses.

Turns out, using QEMU to do this on a non-system drive is fairly simple, though just as slow. Oh well, you live and learn!


Earlwood sunset

Media

I make it a habit of going outside to watch sunsets from our suburban bunker here when I can. This evening the whole sky was obscured by cloud, but the light dyed them a really vivid, pretty colour.

I know nothing about professional photography, but it was as if the clouds were acting as a light diffuser. I felt like I was wearing tinted glasses walking around outside, everything was bathed in a pinkish-orange glow. Didn't last for long, but it was fun :)


Trains Ruben Taketh: M22, once more!

Annexe

This post originally appeared on the Annexe, in a post series pointlessly documenting every train I took.

Photo of the forementioned train.

M22 from Central to Wynyard

Cleanliness: Very good!


My white iPhone 4 and Zune predictions

Hardware

Phil Schiller on Twitter is claiming the magical and revolutionary white iPhone 4 will be available in the American spring. Few will believe him.

Bloomberg is reporting Microsoft will be axing the vertically integrated Zune media player and software Steve Ballmer said they could "beat" Apple with. Few will care.


Super creepy train ride of doom

Travel

Good evening, how are you? I'm scared!

Chapter One: THE STATION :O

Picture this if you will, for I'm about to tell you a story. No, this isn't part of the story, in fact I'm not even sure now why I started this sentence in the first place, or even this paragraph. It literally adds nothing of value, interest or usefulness. I once fell down a flight of stairs and thought the same thing of the trip.

So I had just finished a university meet-up in the city with some like-minded security and privacy nutjobs. Craving a nightcap, I made my way to a local Starbucks and ordered a Chai Latte. Don't worry I'm not a hipster, I just don't really like drinking alcohol much, particularly in the centre of town late at night! But I digress.

Hot beverage in hand I proceeded to the Museum train station under Hyde Park. Despite it being a fairly warm day, the evening air was cold and blustery, and the overcast sky reflected the lights of the tall buildings which scraped them. Those kinds of buildings have a specific name, but it escapes me.

I could describe how deserted the station was, along with the old fashioned architectural style, dim lighting and so forth, but why reinvent the wheel:

[Opened in 1926], Museum is a railway station on the City Circle line in Sydney, Australia, Named for its proximity to the Australian Museum, the station is located entirely underground at the southern end of Hyde Park. The station features photos depicting its past in the pedestrian tunnels and is regarded as the least used of the City Circle stations.

Chapter Two: THE TRAIN :O

After waiting on the platform for twenty minutes or so (surprisingly good by Australian public transport standards), the train heading for the East Hills and Airport line pulled up with a squeaking and loud hissing of its ageing brakes.

With several generations of rolling stock on the network, you never know what the age of the train you'll be riding on is until it arrives. The most recent models on my line are the Millennium trains which were built around the time of the Sydney 2000 Olympics and come fitted with squishy seats, air conditioning, chopper control (for smoother acceleration) and huge windows. The train that pulled up for us this evening was an S series, amongst the oldest in the fleet having been first introduced in the early 1970s. Very retro in styling, no air conditioning and dark blue springy vinyl seats.

CityRail.info has graphics illustrating the difference. You get the idea.

So I jumped on board and soon realised I had the entire upper deck of the carriage to myself. Given its age the train creaked as it rocked from side to side between stations, and the windows were open to let some fresh air in… air which was extremely cold I might add! Which was weird because it was so warm before. Wait, I already said that.

Having departed from Museum then Central, the train made its usual way down into the Airport Line tunnel which travels underneath Green Square, Mascot and each of the domestic and international airports (surprising though it may seem!). Unlike most other subway systems that I'm used to, the Airport Line tunnel has trains running in both directions in it, so occasionally you'll see a train come out of the darkness and pass you. If you're in an older generation carriage with the windows open it can be quite noisy!

Chapter Three: THE TUNNEL :O

Oh yeah, this was supposed to be about a scary train ride. Sheesh, talk about a needlessly long introduction!

So I was in this old train rattling down this tunnel with the windows open and with the whole carriage to myself. It couldn't have been more than a few minutes into the ride, but suddenly and without warning some of the fluorescent lights in the roof started flickering. I'd be able to see the inside of the carriage, then not, then see it, then not.

Finally, all the lights went off completely, and there I was cruising through this pitch black tunnel with only the light from my phone. Did I mention this train was old and creaky and made lots of noise through a combination of the windows being open in a tunnel and the old brakes and wheels and whatnot? It was dark, and loud, and I was alone!

Perhaps it was for safety reasons owing to the fact there were no lights, but around this time the train driver began blasting the horn at regular intervals. If you think train horns are loud normally, try hearing them in a tunnel, with the windows open, and at short regular intervals! The first couple of times the sound was so loud I jumped a little in my chair, which was one of these old fashioned vinyl seats with springs which made me even more jumpy. Wait, I already said that.

Eventually three of the six florescent tubes lit back up again in the carriage and I was able to see enough again to know that I wasn't in some nightmarish ghost train or something of the sort. Of course we'd already been in the tunnel for a while, so it was only a few minutes more before we were back on the surface. The driver stopped sounding the evil sounding horn, and I was able to hear the sound of Neal O'Carroll on my iPhone again.

Chapter Four: THE BARDWELL :O

Disembarking said train at my designated stop of Bardwell Park, I noticed that I was the only one to leave the carriage I had been in, and only one other person got off at the same time as me. The station was lit up but the train was still eerily dark and for some reason just sat there for a few minutes; normally the train starts to leave as I start walking towards the street, but I was already on the overpass before it started moving again.

As fate would have it, I also decided this evening to try my new shortcut I found to avoid having to go up the extremely steep hill between the station and Earlwood. I'd never ventured through it at night, but the path was overgrown with evil looking trees which cast weird shadows in the moonlight, and one of the buildings I passed had the eeriest blue lights which let me take that pointless photo below. It was too dark to be those anti-loitering tubes the current affair shows here love to talk about, maybe they were just for show or to look alien and evil. I'm inclining to think the latter.

Overall a fitting end to a super creepy train ride which this post has no doubt not done justice!


Trains Ruben Taketh: S70, again!

Annexe

This post originally appeared on the Annexe, in a post series pointlessly documenting every train I took.

Photo of the forementioned train.

S70 from Museum to Bardwell Park

Cleanliness: Good


Trains Ruben Taketh: S70

Annexe

This post originally appeared on the Annexe, in a post series pointlessly documenting every train I took.

Photo of the forementioned train.

S70 from Museum to Bardwell Park

Cleanliness: Good


Museum station accessibility

Annexe

This post originally appeared on the Annexe.

Sign at Museum station saying no wheelchair accessibility

Why not?


Trains Ruben Taketh: M22, yet again!

Annexe

This post originally appeared on the Annexe, in a post series pointlessly documenting every train I took.

Photo of the forementioned train.

M22 from Bardwell Park to Museum


Trains Ruben Taketh: M4, again!

Annexe

This post originally appeared on the Annexe, in a post series pointlessly documenting every train I took.

Photo of the forementioned train.

M4 from Museum to Bardwell Park.

Cleanliness: Excellent!