Agni lives!

So there’s this giant cloud hovering over Agni, and its name is Mysql.

Since I had the hard drive from mercury mounted instead of booting from it, I decided to just copy over the “live” database files instead of doing a dump and restore. I then went to bed. When I woke up, I saw increasing numbers of I/O errors followed by the end of the operation failing. Oops. I go to try again… and the drive can’t be read.

I reboot. The drive can’t be mounted.

I spent a few days messing with various linux tools to restore the drive, and nothing worked. So I grabbed the backup drive…and the blasted thing refuses to stay powered on. It’s a Maxtor OneTouch 4. Those things are friggan impossible to rip open. So that’s a project for a future date. I just hope there’s a semi-recent backup on it; I was terrible at remembering to take them.

But! There’s a silver lining! The wordpress installation went just fine, and it turns out my ISP doesn’t block port 80 (I thought they did, but it was my old router acting up, the new router lets the packets through just fine). So for now, Agni is up and running and ready to serve up my new sites! As soon as I recover my data…

Agni: Full brain transplant

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!

Agni: Up and Running

So I got food poisoning.

From marshmallows.

What is this I don’t even.

——-

Anyway, Agni! I’ve ordered an IDE/ATA-to-USB connector cable, but it’ll be next week before it’s here, so in the meantime, let’s see what we have with Agni. Mercury, my previous box, used PS/2 connections for keyboard and mouse, but unfortunately, I’m only finding USB inputs.

Never fear, it came with a keyboard and mouse! ….oh. They’re ps/2 as well. Well. That’s. Helpful.

2013-03-02 11.07.52
This is a PS/2 connector btw.

So let’s see. I have a wireless usb mouse I’m using right now, and we have a usb keyboard attached to another computer, but we’d previously bought a kvm (Keyboard, Video, Mouse) switch that used ps/2 connections, so we’ll probably want a usb one of those in the long run. But I am determined to get this working. Determined, I tell you!

So we cannibalized a wireless USB mouse from a laptop and a USB keyboard from our desktop machine, figuring we’ll get it up and running and then control it via SSH until we can get the new kvm switch.

To install linux, I’ll need to make a bootable media so I can do the install. Except. We have a ton of DVDs, but it doesn’t read DVDs. It has a floppy drive, but it’s the only machine that does. I can’t seem to find any blank CDs, and I don’t want to reformat a USB stick since we’re using all of ours for data. Hmm. Decisions decisions.

Aha! My roommate to the rescue! He’s found a stack of blank CD-Rs and given me one. Now to download the AMD64 version of the debian network install (because I’ve got an AMD-brand 64-bit processor, as evidenced in post one).

Mercury ran xubuntu, keeping updated to each LTS version, but I think for Agni I’m going to just use ordinary debian + xfce. Since it’s a server, it can technically be run headless, but I have Chaos do tasks on the machine sometimes and he’s infinitely more comfortable with a GUI environment than a command line, so I like to put a lightweight GUI on the machine. XFCE is nice and small 🙂

Debian should also help avoid some of the weird issues I had with mercury installing apache into some non-default spot. I’m still not sure why that happened, but it seemed I had to modify every tutorial thanks to being on ubuntu instead of debian proper. Also he’ll match my new Rasberry Pi, which runs Rasbmc, which is Rasbian + xbmc, where rasbian is a debian fork for the raspberry. So they’ll match!

Wow that’s a lot of acronyms in two paragraphs. If you’re lost, never fear, have a marmoset:

Alright, back to work! So we need a usb keyboard…

but I don’t seem to have one? Goddamn, my tech stash is so inadequate. I’ve borrowed one from my husband’s laptop. Yet another thing to add to my list of stuff to purchase.

Anyway, with a borrowed wireless usb keyboard (James: “Won’t you need special drivers?” Me: “Betcha the install disk has them anyway.” Sure enough, It Just Works.), and a borrowed wireless USB mouse, we’re up and running! Agni now knows its name and speaks American English. I formatted two partitions out of the disk so I can keep the site data separate from the linux install in case I need to change distros or upgrade or something later on. It should also make backups easier.

Alright, debian installed, time to pop open a console and…

why is it black text on white background?! BIZZARE.

Anyway. Time to set up a static IP address. I just save off a backup copy of /etc/network/interfaces and change my settings… and it won’t come back up. Why did it fail? What is a “network” and what do I set it to? How about I strip the settings to the bare minimum? After ages of reading stuff off to one of my friends (since I’m having trouble reading this week, my vision’s been blurred due to some meds), we discover he didn’t hear a space when I read things off to him. Whoops.

Next problem: /sbin isn’t in our path? what? So I can’t use ifup… Fuck it. Reboot.

Nope, still not working. Okay. Restore from backup. Add interface eth0 to config file, but this time, use dchp instead of static. Test if it works now. Success! Ping google. Also success! Okay. So. That works for now. Screw it. I’m going to use my router to assign the IP address. ifdown, ifup, and we’re running.

Debian Wheezy and up install ssh by default, so now I can get into the box remotely. Huzzah. Except… connection refused. Joy. Maybe it didn’t install? apt-get install ssh… no, it’s there. Oh, maybe it’s not started? /etc/init.d/ssh start… nope. Could not load host key. Okay, that sounds like I need to regenerate the key somehow… more googling…

aha! ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

So now SSH is up and running, time to install apache!