Notatypewriter's Blog

Umm… what?

Hard drive died… no problem!

leave a comment »

I came back from Winter Break to a bunch of updates for squeeze, one of which was my kernel. So I update, and then I hear a bunch of clicks. Cue the “Oh shit no. Fuck no. Fuck fuck fuck.” moment. Pop over to /var/log/messages and yes, a shitton of errors from the SATA controller for /dev/sda, which is my 3 year old Velociraptor drive.

Thankfully, /dev/sda contains only my Windows partition and my /boot partition. Since I only use Windows for gaming and watching TV (Windows Media Center blows away everything in terms of ease of use), this isn’t that big of an issue. As long as I don’t reboot, I don’t need /boot. My computer can continue running with the broken drive and did while I was away for four weeks. Here’s how I transferred to a new boot drive.

  1. Plug a new drive in via USB. I have a SATA to USB dongle.
  2. Unmount /boot.
  3. Partition the new drive and mount it in /boot
  4. Reinstall the linux-image packages.
  5. Reinstall grub to the new drive.
  6. Reboot and replace the dead drive.

There should be a way to do this without rebooting, but I didn’t know how to do SATA hotplugging in Linux (I forgot the term so I couldn’t google for it :\) and how my computer would react if I just unplugged a drive from the power supply. (Note to self: read this)

Written by notatypewriter

2011 January 8 at 7:59 pm

Posted in Nerding out

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: