Atomic I/O letters column #132Originally published 2012, in Atomic: Maximum Power Computing
Reprinted here July 12, 2012 Last modified 16-Jan-2015.
Mass storage misery 1
You know when people send you letters saying they're using their laptop or work computer or something because their usual PC is busted? I'd be doing that, if my data drive was still plugged in.
I've got a 1Tb C: drive in my PC, and added a 2Tb data drive the other day. Everything seemed fine and I was playing around with partitioning it in Disk Management (Windows 7, 64 bit), and then I think I went back to one partition, and made it "Active" by mistake, and now the computer won't boot if that drive's still plugged in.
I've got an old and almost busted WinXP laptop and a $10 eBay SATA to USB kit, so I plugged the data drive into the laptop and ran Disk Management there.
Bill Gates must have had a pretty good laugh when he made Disk Management able to make a partition "Active", but not able to make it UN-"Active" again.
How the hell do I fix this?
"Remember, it's not a proper command-line utility if it can't wreck your computer."
Note to all readers: If you're any kind of PC enthusiast, a sub-$100-delivered laptop that's young enough to run WinXP and have USB ports even if its battery life is now measured in seconds, and also the abovementioned cheap drive-to-USB adapter kits, should be on your "Oh, Shit" Shelf along with the spare PSU that I never stop telling people to keep handy. Cheap USB 2.0 drive adapters are a great way to make cloning a drive take five times as long as plugging it in via something faster, but for a lot of other applications they can turn a complete show-stopping bricked-computer problem into a merely annoying one.
(How cheap, I hear you ask? Less than ten bucks on eBay for a kit that connects to SATA and both 3.5-inch and laptop PATA drives, with cables and power supply. If all you want is the one adapter cable with drive plugs on one end and USB plugs on the other, then two to three bucks seems to be the going rate, but I'd get the fancier kit if I were you. As I write this, USB 3 versions of the same kit are around $US20 delivered; if you want to move a lot of data and, of course, have a USB 3 socket to plug the thing into, the extra speed is well worth the price.)
Disk Management can indeed make partitions Active, but not undo that. Perhaps this is to stop tinkerers from accidentally de-Activating their boot drive, but you'd think Microsoft could just block that feature for the system disk.
Anyway, there are various dedicated partition managers that can fix your problem, but Windows has a program that'll let you do it, too - the command-line utility Diskpart.
You run Diskpart, select the drive and partition you want to change, and then use the "inactive" command to de-activate it.
If you've got several drives that're hard to tell apart in a list and feel justifiably nervous about maybe doing the right thing to the wrong drive and ruining your week, make a System Repair CD, power down, unplug all drives except the one you want to work on, boot from the CD, use the open-command-line option in the list of repair tools, and run Diskpart there.
(A System Repair disc is a handy thing to have anyway - it's faster to work with than booting a Windows install disc and using the repair tools from that.)
Incidentally, setting a partition on an external, removable drive to Active shouldn't stop the computer from booting. You shouldn't even have to boot without the external drive plugged in. It's only doing it to internal disks that's a bad idea.
Mass storage misery 2
I've just installed my fifth hard drive into this computer, which makes me feel pretty studly. But now the computer won't boot unless the C drive's the only one connected. I think that's the deal, anyway; there are an awful lot of cables in there and I don't work well on my knees under the desk.
That came out wrong.
Anyway, the error I get is a black screen that says "Reboot and Select proper Boot device".
Help me avoid spending more of what I believe you call my "profanity allowance".
After a bit of back-and-forth, it transpired that H's problem is that his computer only wants to boot from the first SATA drive in the list, the one plugged into the first of the several SATA sockets on the motherboard.
You can go to the boot order in the BIOS setup program and change it around, to for instance put boot-from-optical-drive above boot-from-SATA-hard-drive in the list to make sure you boot from a bootable CD/DVD if there's one in the optical drive, but the only actual hard drive you can choose to boot from is the lowest-numbered one. That used, of course, to be the drive H wanted to boot from, but while hooking up the new drive, H had mixed up the cables.
(Note that the first drive, or the first low-level anything else, in a list of things connected to a computer will probably be indicated by a zero rather than a one, because that is how computers like to count. Beware of misunderstandings that may occur because of this; "the first drive" and "drive number 1" can very easily not be the same thing.)
Anyway, when H shuffled the cables around so C: was connected to the first plug again, the computer booted again.
I like to write the drive letter assigned to each drive on the end of the drive with a silver pen, because otherwise it's easy to get confused if you, like H and I, have five hard drives. While you're scribbling on your hardware, you can number the SATA cables as well.
My home comms cupboard seems to have contracted a prolific disease of wall warts.
I have the usual causes of this disease; router and network switch, but then to add to the mess, I have a couple of Ethernet to C-bus home automation units, an infrared repeater unit, a wireless link to my mate's place up the road powered from my comms cabinet... And the list goes on.
Most of these power hungry devices are running at 12 VDC.
My question is, would it be worthwhile using one large power supply for the 12 volts and be rid of the wall warts? Or are wall warts more efficient that I give them credit to be?
Modern switchmode plugpacks - the lightweight ones - are efficient enough that there's little to be gained by replacing them. A bad one might be only 80% efficient; a good one, 90% or more. Since they're seldom delivering very much power, even if you manage to replace an 80%-efficient one with a really good 95%-efficient power supply of some sort, it'll take you a long time to make back the price of the new power supply.
(If you're paying to air-condition your house, relatively small power differences can be more significant, because every unnecessary watt is another watt of heat your air conditioning has to pump away. If you're paying to heat your house, on the other hand, inefficient PSUs will help you!)
If you've got a cabinet full of small devices that all add up to well over a hundred watts, an upgrade could still be worthwhile. You can get dedicated switchmode PSUs suitable to replace a bunch of plugpacks of the same voltage (your cable-soldering skills permitting, of course); here in Australia, Jaycar have some fairly cheap options. DealExtreme have some much cheaper ones - in the 12-volt department, they've got one amp, two amp and three amp units topping out at less than $US10 delivered to anywhere.
If I were trying this, though, I'd first use an old PC power supply. Yellow wires are 12V, black wires are ground, to get an ATX PSU to power up when it's not connected to a computer, connect pin 14 on the motherboard connector (pin 14 is the only green wire) to ground, as per this:
A lightly loaded PC PSU may not be very efficient, but if you've got one kicking around already, it's worth a try.
A cheap electricity consumption meter will give you a pretty good idea of how much power, if any, you're saving.
If there are some old-fashioned hot-and-heavy plugpacks in your cabinet of gadgets, an upgrade may be more attractive. Old heavy plugpacks are simple transformer-based power supplies (their weight is almost all transformer), and their efficiency is lousy; easily only 50%, or worse. You don't need to rig one big PSU for everything to replace old plugpacks, of course; just swapping the old plugpacks out for modern ones with the same voltage and polarity, and the same or greater current capacity, will do.
Standby power is a related issue. Power supplies that're energised even when the device they power is turned off draw "vampire power" which is all, by definition, wasted. Vampire power can be quite substantial for older electronics, like TVs, stereo systems and some computer hardware. My slightly elderly 30-inch Dell 3007WFP-HC monitor, for instance, draws 17 watts when it's "off" (according to the abovementioned cheap power meter). Those sorts of numbers can add up fast.
Low standby power has been a selling point for a while now, though, so again there's not necessarily a lot to be saved. The current-model Dell U3011 30-incher, for instance, has standby power of less than two watts. And if the devices you're looking at are a cabinet full of IT gear that's all running 24/7, there is of course no standby-power issue at all.
If you go on holiday and don't need some or all of the stuff still running, though, it's worth turning as much gear as possible off at the wall, rather than turning the devices off and leaving their power supplies plugged in. This also prevents the gear from getting fried, or starting a fire, in the unlikely event of PSU failure, or a nearby lightning strike or pole-pig distribution transformer failure:
(Transformer failures usually aren't this... Close Encounters-y.)
I'm my office IT guy, on account of being slightly less useless at it than anybody else, so it falls to me to figure out stuff like why our explosion in a spaghetti factory LAN got very sick last week.
Long miserable dusty tangled story short, someone ran a chair over a cable and fractured it, then ran their own replacement cable, and in the process somehow managed to plug one port on our 48-Port You Beaut Paddy's Market Special Edition switch into another port on it. And then the network was almost completely broken, until I finally found the guilty cable and unplugged it.
Only ALMOST completely broken, though. Some pings got through, you could see shared resources and at least attempt to connect, and I think someone even managed to use the networked printer.
This keeps niggling at me. Shouldn't this have been a complete disaster? Why did it still work, a bit? What was the actual problem?
You had a switching loop.
When one port on a switch is connected to another port on the same switch, or to another switch that's already part of the same network, then broadcast packets that get sent out of every port - that's the definition of a broadcast packet - come back in the loop-connected ports, and now get sent out to everyone again, and again, and again, using up all of the available bandwidth and crowding out real traffic. The immense number of "broadcast storm" packets just compete with valid data, though, they don't override it, so your network will continue to work, after a fashion.
"Serious" networking gear, correctly configured, is immune to this. It'll automatically detect a loop and instantly block one of the culprit ports. But cheap consumer/small-office networking gear isn't smart enough to do that, and just talks to itself with great enthusiasm until you find the loop and unplug it.
You can intentionally create such a loop by just plugging in your own little $10 eBay switch somewhere and then connecting it to itself. It's sort of like tripping a breaker by sticking a paper clip in a power socket...
...but less dangerous.
Well, until the IT guy catches up with you, anyway.