Archive for April, 2009

MDADM RAID Failed After Upgrade from Ubuntu 8.10 to 9.04

Friday, April 24th, 2009

With no surprise the update from Interpid Ibex to Jaunty Jackalope was not as easy as I hoped. After booting the fresh 2.6.28 kernel I was welcomed with “Press enter for maintenance (or type Control-D to continue)” and errors when trying to mount my RAID0. After some investigations found that the devices are now named md_d* and there are some devices in /dev/md/.  Because of this change I had to do the following things to get my raid up and running:

  1. Reassemble the raid (check if it is inactive with less /proc/mdstat) – in my case the command looked like this: mdadm --assemble /dev/md_d1 /dev/sdb2 /dev/sda5
  2. mdadm --detail --scan >> /etc/mdadm/mdadm.conf and comment your previous ARRAY definition in the config file
  3. Modify /etc/fstab if needed

Also if DKMS fails to build the new NVIDIA driver be sure to check that you have installed the headers files (the upgrade process did not install them for me).

Again : I’m NOT responsible for any damage or data loss you might experience. Backup often, backup soon!

Seagate 7200.11 BSY State Data Recovery

Friday, April 10th, 2009

One not-so-beautiful morning I woke up just to find out that my Seagate 7200.11 500GB hard drive is not detected from my BIOS. Unfortunately it was a well know problem which have three solutions:

  1. Replace the hard drive with new one from where you got it and lose your data
  2. Send it to Seagate for data recovery and wait a month or more
  3. Fix (or totally screw) it yourself

Of course as some-kind of geek I chose the last option and successfully repaired my drive following the MSFN forums guide. Check the photos for more details of the process.

Summary:

  1. If you have Seagate 7200.11 be sure to  check if it is affected and if is still running flash it with the latest firmware
  2. If you are planning to repair it yourself be sure to know how to solder
  3. You will need quite a few parts and tools. It took me two days to prepare
  4. Most of the cellphone cables have what you need inside. I used a Nokia datacable.

PS: I’m NOT responsible for any damage or data loss you might experience

PS2 (in Bulgarian): Ако ви трябва помощ при възстановяване на данни от 500/750/1000GB хард диск Seagate 7200.11, който не се появява в БИОС-а или е с размер 0, драснете ми едно писъмце и ще се опитам да помогна.

WordPress Video Galleries with NextGen and jQuery

Thursday, April 9th, 2009

For one of my recent WordPress projects I needed an easy way for the client to organize and display videos. Unfortunately my hope that NextGen Gallery plugin, which I already used for the images, will do the trick vanished after couple of clicks and I started googling for a solution. Since neither google nor Worpdress Plugins page gave me anything reasonable I started rethinking the situation:

  1. I was already using Shadowbox which allows displaying videos
  2. I already had jQuery enabled in my WordPress Theme
  3. I can use the alt field in the NextGen options for the url of the video

So what I needed was to modify the generated from NextGen anchor (the href attribute) and somehow to distinguish if the  thumbnail is for image or video.

Here is the script I wrote which does both things:

jQuery(document).ready(function($){
  $(".ngg-gallery-thumbnail a").each(function (arr){
    if ($(this).attr("title").substr(0,5)=="Video"){
      $(this).attr("rel","shadowbox;width=405;height=340");
      $(this).attr("href",$(this).children("img").attr("title"));
    }
  })
});

All you have to do to make it work is:

  1. Include this Javascript somewhere on your page
  2. Put the url for your video in the alt textfield
  3. Start your descriptions with “Video”

If you found this script useful consider donating. Hosting isn’t free you know. Thanks!