Agni: Full brain transplant

2013-03-10 4 min read Longer Tales Server Home Projects

My cable got here! YAY!

pic1

So I unpack everything, skim the instruction manual, and go to plug it in. The first thing I notice is that it’s got external power — yay! That means I could re-purpose this old small drive for the raspi, since it won’t need to draw power from the machine itself.

pic2

(Fun fact: the majority of the space in the box it shipped in was taken up by adapters for various international power supplies, lol. I recognize british and european)

At first glance, it didn’t look like the connector would fit into the slot:

pic3

But it seemed to plug in just fine when I tried it:

pic4

(insert innuendo here)

So I figured all was well and continued plugging in. When I put the USB into my laptop, it came up with found new hardware, installing, and then ready to go. Yay! It recognized the device as a new USB mass storage device. Double yay! But then… there’s no extra drive mounted to my computer. What?

The device manager sees a USB mass storage device as well, I just can’t seem to FIND it. The light for the drive on the connector is amberish, and the light for USB is red. I can hear the drive whirring softly, but it did that from the moment I plugged in the power, so…

The hard drive is a WD400BB, considered a legacy product, but the stats are still availible if you know where to look. It connects using 40-pin EIDE (also known as ATA-2). The manual for the cord says it handles both 40-pin and 44-pin IDE. There are differences between plain IDE and EIDE, but not ones a cable should care about, as far as I can tell.

That leaves… jumper settings? A quick google search suggests I jumper it like a slave drive instead of a master. It’s currently jumpered Dual (Master), so I unplug the USB, then power, then move the jumper, then re plug back in.

(as a side note, the drive gets hot when not in an enclosure at all >.>)

Aha! The drive light turned blue! Oh wait. Then amber again. Plug in USB aaaand… nope. Nothing.

Okay, so, what’s on this disk?

filesondriverdisk_IDEconverter

Dafuq am I looking at? Nothing jumps out as being of use. Lol, Windows 98.

Then it hit me. This drive? Totally formatted ext. Google suggests that Windows hides unformatted drives; maybe it just can’t read it? So I go get a program called Ext2Fsd, and sure enough:

ext2fsdIt even found the swap partition! Unfortunately, it won’t let me make a mountpoint via MountMgr (it just…. does nothing when I click “add”). I finally got it to work using “DefineDosDevice”, but I wonder what happened to MountMgr?

A little sftp magic, and I should be good to go! Except… Filezilla says “E:\ does not exist or cannot be accessed”. What? Win-R, cmd, “E:” gives me “The system cannot find the drive specified”. Awesome. And My Computer still sees no such drive letter.

Well let me try to add a mountpoint at H: with MountMgr and…. and now the list of mountpoints is empty. What?! Okay, this tool fucking sucks.

Let’s try Ext2IFS! Oh wait, that only supports Vista. Wait…. the top link on google says it’s the ONLY thing that works on win7. WTF? Let’s try running it in compatibility mode. Walk through the install, assign it to drive letter H:, go back to My Computer. Success! There’s an H:! Double-click:

formatFor the love of god, no!

Okay. So. They suggest running mountdiag.exe on it:

sudo

Stupid Windows… I wonder if it’d be worth it to make a batch file that launches an elevated command prompt and runs the command passed in?

Anyway, the real reason it didn’t mount is this:

cleanshutdown

I give up. Windows, you have defeated me. I plugged the stupid thing into Agni. Why didn’t I do that first, you ask? Because I’ve had issues mounting things from the command line in linux just recently (rasslefrassin raspi) and figured I’d be more comfortable using Windows 7 + sftp.

Telnet into Agni, lsusb shows the bridge just fine. lshw….. isn’t installed. Wut. Install it, it seems to be logical drive /dev/sdb. dmesg shows me it did, in fact, clean up from the dirty dismount. After much poking about, I discover it automounted just fine: to /media/4812427d-c3d2-4f5b-92bd-68cb31c75d08. Because THAT’S a logical place for it.

Anyway, copy the files to the right spot and voila! Agni up and running. Just gotta tweak the settings so they match the old ones and the old sites ought to be running smooth. Then it’s on to setting up WordPress and my new sites will be live too!