Moving a users directory, or anything else you want off an SSD to save space

Dan Bowman sent me the following link and asked me to comment on it: http://lifehacker.com/5467758/move-the-users-directory-in-windows-7

It needs little comment. It’s a brilliant solution to the problem.

Read more

Oracle’s bombshell: We might buy HP

And if the HP situation couldn’t get any weirder, Forbes speculates that Larry Ellison and Mark Hurd might attempt a takeover of HP if its share price drops far enough. HP and Oracle once were close partners, but now they hate each other.

I think it might be a little more complicated.

Read more

Microsoft sold 400 million Windows 7 licenses; what does it mean?

Steve Ballmer announced today that Microsoft has sold 400 million Windows 7 licenses, but anywhere from half to two-thirds of PCs are still running Windows XP and need to get with the program.

He also continues to insist Windows 8 will ship in 2012, which really makes me wonder why those XP users need to switch now. December 2012 is 17 short months away, and XP support runs until 2014. I see little need to rush out now and buy Windows 7, use it for 18-24 months, and then turn around and buy Windows 8. If XP is fulfilling users’ needs, what’s the hurry? Unless Windows 8 is going to be late, as bad as Vista, or both. But none of that can happen, right? (Note: It’s not 2014 anymore, so if you haven’t upgraded from XP, you need to.)

I’m sure the Windows 8 Police will be along to haul me away shortly for insinuating such things. But until that happens, that 400 million figure lets us do some other interesting extrapolation. Read more

How to clean an MBR and recover drive partitions

Sometimes it’s necessary to recover drive partitions because you accidentally repartitioned a drive you didn’t mean to, or because your MBR got infected or otherwise trashed. Here’s how to recover them, for free.

Infecting MBRs with malware is popular with virus writers again. And I fully expect chaos to ensue, because that’s what happened the last time there was more than one virus floating around that infected MBRs. They quit doing it for a good reason.

So here’s how to clean up the mess when an MBR gets infected, or when multiple infections blitzes the MBR and the hard drive loses the ability to boot, just displaying a message like Missing Operating System or Operating System Not Found.

We’ll be using the Gparted Live CD. Many Linux live CDs have the proper tools, but GParted works well and it’s a small download. You can try to use another Linux live CD, and it will work fine, but the icons might not all be where I say they are.

Read more

Dark ages of security, or golden age of hacking?

Earlier this week, Rob O’Hara argued that hackers, in spite of the publicity they get, aren’t necessarily sophisticated at all.

Details of the Citigroup hack prove it.
Read more

Windows, ARM, emulation, misconceptions and misremembered history

I keep reading stuff about Windows and ARM and, well, I think people just aren’t remembering history.

I’m not saying that Windows 8 on ARM will save the world, or even change it substantially. It probably won’t, since Microsoft tends not to get things right the first time. But will I automatically write off the project? No. It could prove useful for something other than what it was originally intended. That happens a lot.

But I’m more interested in clearing up the misinformation than in trying to predict the future.
Read more

It’s not even out yet and Paul Allen’s book has a mistake

If I were Paul Allen, I wouldn’t be very happy right now. Here’s why.

Read more

The decline and fall of system administration

Infoworld’s Paul Venizia stirred up a controversy, asking what happened to sysadmins who can fix things, as opposed to just rebuilding machines any time something went wrong.

The definition changed, mostly. At least that’s what I think.

Read more

Um, no, software shouldn’t have kill switches or time bombs in it

So,  ZDNet is advocating that Microsoft use a kill switch to render existing Windows XP computers non-functional. Then he relented and said maybe an expiration date would be sufficient.

John C Dvorak is attacking the idea, with good reason. Dvorak is right.
Read more

How I changed servers midstream

When upgrading this site, I replaced the underlying hardware as well. The old server was just a dead end in too many regards to be worth upgrading in place, and besides, being able to run new and old side by side for a time is helpful.

This type of maneuver is routine work for a professional sysadmin. But it’s been at least two years since I’ve done a similar maneuver at all, and at least five years since I did it with Linux.

When I built the new machine, I gave it a unique IP address. Turnkey Linux makes getting an operational LAMP stack trivial, and depending on what you want to run on that stack, you may even be able to get that installed for you too.

Unfortunately for me, the Geeklog migration tool doesn’t seem to work with WordPress 3.0.1. So I had to get WordPress running on my old hardware in order to migrate. I chose WordPress 2.0.11 because the 2.0 branch appeared to be the current branch when Justdave wrote his migration tool, and 2.0.11 ran without complaint on the dated versions of PHP and MySQL that were on my old server.

After importing the content, I used mysqldump to export my databases. Specifically:

mysqldump --opt -u [mysql username] -p [database name, probably wordpress] > wordpress.sql

I should have gzipped the file, but I didn’t.

gzip wordpress.sql

I then connected to the old server via FTP and transferred the file. Use your favorite file transfer method; I happened to have FTP set up for my internal network.

Uncompress the file if you compressed it:

gunzip wordpress.sql.gz

Then restore the file:

mysql -u [mysql username] -p [database name] < wordpress.sql

Or, if the database already exists, like in my case:

mysqlimport -u [uname] -p [database name] wordpress.sql

Then I connected to the webserver via my web browser. WordPress 3.0.1 saw the WordPress 2.0.11 database and informed me that it needed to be upgraded. So I let it do its thing, and a few minutes later, I had a functioning WordPress site with 10 years’ worth of legacy entries.

I messed around with it for a while. Finally, I decided to go live. And at this point, I should have physically moved the new server into its permanent home. I didn’t do that, so now when I decide to move the server, I’m going to have some downtime.

To flip the IP addresses, you need to know where your Linux box stores its IP address. Debian and Ubuntu both store it in /etc/network/interfaces. As far as I can tell, Red Hat and derivatives like CentOS store it in /etc/sysconfig/network-scripts/ifcfg-eth0, but I haven’t used Red Hat or a derivative in a long time, perhaps 2003.

If worse comes to worse, try something like this to determine where it’s stored:

grep -r [ip address] /etc/

I edited the appropriate file on both boxes, changing the IP address while leaving all of the other parameters unchanged.

I then issued the command ifdown eth0 on both machines.

On my new production server, I then issued the command ifup eth0. Depending on the Linux distribution, it might also be necessary to re-issue a default route command. I didn’t have to do that.

Depending on how much Linux/Unix cred you have at stake, you could just do it the Windows way and reboot the box. Or both of them.

Once I was satisfied everything was working, I powered down the old server and celebrated.