Sunday, December 16, 2012

Recover a dead hard drive with ddrescue

I use Ubuntu, so this is geared towards using that OS, but gddrescue (ddrescue) should be available on most Linux distributions.

I got most of this info from:

Install with:
sudo apt-get install gddrescue

Find the disk to rescue with:
sudo fdisk -l

Then run the command using a command like this:
sudo ddrescue -r 5 /dev/sdf /tank/Backup/image /tank/Backup/logfile

In this case 5 is the number of retries attempted to read the data before giving up, /dev/sdf is the path to the device that you found via fdisk -l /tank/Backup/image is the image file that will be written. /tank/Backup/logfile is a logfile that is kept of the recovery.

If the backup is interrupted or you want to run it for another pass with hopes of recovering more information use a command like this:
sudo ddrescue -r 5 -C /dev/sdf /tank/Backup/image /tank/Backup/logfile

Note the -C which tells ddrescue to pickup where it left off, or try to fill in the blocks that are missing

Monday, November 26, 2012

Obtaining Nexus 4

It sounds like some elusive artifact and in some ways it is. Google's new Google phone has been notoriously difficult to purchase since its release November 13th. In events that were surprising to me, but probably not to those who suffered through the Nexus 7 release of a few months ago, the launch was pretty painful.

Firstly I think Google severely underestimated the desirability of the phone since the order page was reporting sold out within 30 minutes of the phone being available, globally.

Second, the play store was unable to handle the load of everyone wanting Google stuff like right now. This is embarrassing for Google in my opinion, the company that can serve you search results to anyplace on the planet in under a second and has so much computing power at their disposal to allow such a service to crash is just bad form.

Third, there has been an extensive communication breakdown along the whole process. Starting from Google selling more of the Nexus 4 then they had current stock to cover, a problem probably related to the play store crashing. Continuing with people who now have the phone backordered and have no good ideas when they will be getting the phone. Culminating with people who were wanting a phone and didn't get a chance getting some idea when more stock will be made available. The backorder group have it the worst, being left completely in the lurch on a purchase they had rightfully made. Compensation for them is "free shipping" when the device becomes available again, not insignificant, but not much in the way of an apology from Google either.

The group eagerly awaiting the opportunity to throw their money at Google, of which I am one, are often obsessively visiting the play store to check availability, hoping that by lucky chance they will see that aqua "Add to Cart" button and be allowed to purchase. In my case the obsession occasionally borders on unhealthy, giving rise to the enrollment in various mechanisms that promise a prompt notification of availability, sometimes at the cost of real american dollars. My skepticism of the reliability and/or timeliness of these various services is evident in my continued search for more of their brothers. The latest and hopefully final incarnation being a paid ($1.02) app for my current Google phone that will check availability with frequencies as low as once per minute and upon discovery, notify me through some alert.

Why such a rush to buy another phone when I have a phone that is fairly new as it is you may ask? Simple, the sooner I switch from my current provider (Verizon) to T-Mobile the more money I will save over the next year. Each month that I have to wait is about $40 less in savings over the year, so I'm motivated.

Not to mention I'm very excited for the new tech. The biggest thing that kills me about my current phone (Samsung Galaxy Nexus) is that despite being branded as a Google phone the is upgraded processes are very much governed by Verizon's slow to push updates mentality. Not to mention the inclusion/exclusion of certain apps on the stock images make the phone a Google phone in name only, and not in reality. Its like I have the bastard brother of the Nexus line, last for updates and the one who the carriers have the most control over.

There are rumors that more stock will be coming into the store tomorrow, but there are still people with unfulfilled backorders so that would surprise me. *fingers crossed*

Monday, November 19, 2012

We went dark there for a while

Somewhere between altering a PHP script I found to migrate Drupal content to Blogger and writing my own Python script to do the same I lost focus on the site and was down for several days.

Apologies to anyone who was inconvenienced, but I feel pretty good that I'm how I want to be over at Blogger.

I ended up using conversion of this script: over to Python and SQLAlchemy. It worked fairly well, but I was never able to get comments to work for me at all, so I'll be migrating those by hand. Lucky for me the site never had many comments and I think I'm looking at migrating less then 10 comments. :) Very doable.

I'll try to clean this up a bit and make it available via a github repo in the near future.

Friday, November 9, 2012

Hike: Snow and Gem Lakes

Hike: Snow Lake and Gem Lake
Distance: 10 miles
Location: Snoqualmie Pass area
Snow and Gem Lakes
I found these hikes while cruising the WTA (Washington Trail Association) site trip reports. I found some week old reports that had great reviews of the fall colors so I thought I should give them a try before they got all snowed in. I was a bit late for the fall colors, but I was well rewarded for my timing. 

I got to the trail head a bit later then I had wanted. I forgot to check this hike for required passes and so had to make a stopover at the Snoqualmie ranger station to pick up the proper passes, not a big deal, it only set me back about 30 minutes.  Even with the delay I was on the trail around 8 AM with only 2 other cars in the parking lot. The air was chilly so I was glad I had brought some layers for the cold weather, but I was definitely not expecting temperatures around freezing starting out with some small accumulation of snow on the ground.

I decided t hike until I was in snow over my ankles or until it started snowing. I was not equiped to spend a night snowbound, so I wanted to be on the safe side. 

The hike starts out on a fairly flat trail working its way through some rock slide areas in and out of forests. At around 1.7 miles the trail cuts sharply and starts to climb immediately up to the ridge. At the top of the ridge you enter the Alpine Lakes wilderness (YAY!) and you get this great view of snow lake through the trees. The snow on the lake made it even more gorgeous, it was an amazing site. The trial drops down to the lake and you walk along the lake edge for a while before circling behind a ridge to the next trail junction. You mix back up with the shores of Snow Lake off and on then start to climb away from the lake towards Gem. 

I actually never made it to Gem lakes, the snow started to come down a bit heavier and I didn't want to get caught out there, so I turned around and high tailed back to the trail head. From what I figure looking at maps etc I was less then 1/4 of a mile from Gem. Oh well, I'll have to get it next time. :)

I was really surprised by the performance of the shoes. This was just my 2nd hike with the trail runners and they did great. I kind of expected my feet to be soaked and freezing when I got back to my car, but my feet never got cold and I'm not sure the slight dampness I had was not from my feet sweating as much as it was from the snow. I definitely had snow on and around my shoes and despite being not water proof, water and my feet were never really a problem.

All in all I'm really glad I did this hike, there was really a perfect amount of snow to make the hike enjoyable the whole way and not too treacherous without special gear.  The scenery was fantastic and the hiking was fairly good. 

Things I would do differently next time:
  • I need to put together a good 10 essentials kit, consider carrying a shelter too if I'm suspecting snow like 
  • Glasses + hiking = fogged glasses (contacts coming soon)
  • Double check your permits before you go
  • Take more pictures
  • I should start recording elevations for my hikes. I wonder if I should get a GPS that could do it automatically for me? Hmm.

Monday, November 5, 2012

Hike: Rattlesnake Mountain

Hike: Rattlesnake Mountain
Distance: 20.5 mi
Location: Snoqualmie area I-90

My goal for this hike was to see how my body fared on a long hike. I have decided to seriously look into through hiking the PCT in 2014. While that sounds like a long ways away I have a lot of unanswered questions and preparations to make before I can undertake the adventure feeling prepared.

For those that don't know the Pacific Crest Trail (PCT) is a National Scenic trail that starts at the US/Mexico border and continues north through California, Oregon, and Washington on its way to Canada. It is 2,600 miles give or take and it travels through some of the most highly regarded scenery in the US. Because of the threat of snow in the High Sierra mountains most people start the trek around the end of April and finish 4-6 months later.

One of the things that concerns me most is the rigorous pace that is required to finish the PCT before the weather makes traveling in the upper Cascade elevations very difficult. For me I would only really be able to attempt the trek if most of my time on the trail was covered by vacation time that I have from work. With that in mind I've been tentatively budgeting 16-18 weeks for the whole PCT. Operating under those assumptions I will need to be averaging 25-30 miles of hiking per day.

That is a lot of hiking, and I am just not sure my body is up to the task. I've had some issues with my feet in the past that could make the trip impossible for me right from the get go. In order to find out I wanted to try a nice long hike that somewhat simulates what I could expect on the trail.

I chose the Rattlesnake Mountain hike because it had a good amount of mileage and was pretty close to home. The higher hikes around Seattle are starting to get a bit dicey when it comes to snow and the threat of snow. Rattlesnake Mountain is a fairly low elevation so it should stay clear of significant snow for quite a while.

I decided that for this trip I would try out the suggestions of trail running shoes rather then proper hiking boots. I've tried several boot styles, weights, brands etc (as my girlfriend can attest a trip to REI usually means at least 40 minutes of me looking at shoes). I chose a pair of Salomon XA Pro 3D Ultra 2 trail running shoes 1 size larger then my typical shoe size. I hadn't tried them on even the morning I set out, which when you are talking about boots is a death sentence. They performed very well and I only got a tiny blister on my heel after the whole 8 hour ordeal.

I also loaded up a backpack I have with about 15 lbs of various stuff in order to get an idea what it might be like on the PCT.

Something I have never considered before is the use of an umbrella while hiking. I've been reading that quite a few people hike the PCT with umbrellas because the afford good protection from the sun and the rain. I was surprised how nice it was to pop open the umbrella when the rain started coming down, rather then getting my rain jacket out.

20+ miles is a long way to hike, by just about anyone's estimations. 20 is pushing and probably beyond the range of my longest walking adventures. I have to say however that I was very impressed with how I felt after the 8 hours of hiking. I was definitely tired, and had some serious muscle soreness the following day, but I feel like I could have maybe done another few miles if I had rested for a little bit.

This is a good sign for my PCT hike. 20 miles would be a low mileage day for me on the PCT but considering that I haven't hiked seriously in over a year, I haven't been working out for the passed 2-3 months, I've always had issues with shoes and hiking, I think I did pretty darn well.

The hike itself was quite nice. The day was mostly drizzly and overcast. The trail moved through overgrown logging roads, clear cuts, under some power lines, through dense forests thick with fog, across some streams, and stopped at a lake. I had lunch and hiked the trail in reverse. The first 2/3 of the hike to the lake I was practically alone, except for a few runners. Then I started running into those hiking from the Rattlesnake Ledge trail head.

Overall I'd say the trip was a success here are some takeaways:
  • I need to drop a few pounds. Each pound I don't have to carry from the start the finish will make the whole trip that much easier.
  • I need to start up a cardio program again. I wasn't panting TOO bad on the trail, but it wasn't a walk in the park for me either.
  • I should maybe get my ankle and knee checked out by a professional. They weren't too bad on the trail, but within a few hours of being off the trail they were definitely sore. Perhaps hiking poles would help, but I'd rather see if I could address the real problem.
  • I will never wear hiking boots again. Ok maybe never, but never for hiking when there isn't feet of snow.
  • Hiking with an umbrella is awesome!
  • I do really like hiking. Something about being in the woods, with no one around is really calming for me.

A change of direction around here

Whoa! That was sudden! Unless you don't come to this blog that often you may have noticed that it looks entirely different then it used to.

What's going on eh?

I've decided to re-kindle and re-purpose my use of this blog. I want to move away from just dumping to any potential readers the things I find amusing on the internet and towards a place people can come to find out what is happening in my life. I hadn't posted anything to in over a year for several reasons, but largely because I felt like there was no one listening. What is the point in broadcasting information if you aren't broadcasting to everyone. So my intent here has changed. Hopefully I can use this space to chronicle the things in my life I love and you can come here to read about it.

Additionally I'd like to use this blog to document my preperation for a Pacific Crest Trail through hike in 2014. It is a HUGE undertaking, and larger then anything else I've ever attempted. Stay tuned as I lay out my reasons for wanting to do the hike, and the things I'm doing and thinking about related to the hike.

Yea but where is all that great blog content that I used to come to your site for?

I knew that was your real question. For now you can find that content here: But over time I plan to migrate that information (by hand painstakingly) from the old platform (Drupal) to the new platform (Blogger). I just don't want to be responsible for keeping up with security updates on Drupal anymore.