Archive for the ‘hardware’ Category

From Novice to Master, and Back Again

January 14, 2013

In 1985, I was a freshman at St. Olaf College in Minnesota. The college had a VAX 11/780 running 4.2BSD and a PDP-11/70 running v7 with some Berkeley and local code hacked in. It was my first experience with multi-user systems other than dialing into an MS-DOS BBS or two.

The college’s Academic Computing Center had printouts of the 4.2BSD manuals, plus some home-grown documentation, available for sale so students could learn how to use UNIX. One week I sat in the Science Center terminal room and started going through the alphabetical list of the commands available on the VAX, trying each one and reading its man page to learn what it did.

Eventually I got to “su”. “Become the super-user”? What’s that? Does it involve wearing a cape? Sounds interesting, so I tried it. To my disappointment, it just asked for a password, and wouldn’t do anything.

Shortly thereafter, someone came running into the room and asked, “Are you David MacKenzie? Did you just run ‘su’?” “Yeah… what does it do?” “Uh, don’t do that.” My failed “su” attempt had been logged on the system console and one of the sysadmins was worried about an attempted breakin.

Within a year, I did have root access on the VAX, as I learned enough to be hired as a student system programmer. I contributed to upgrading the machine to 4.3BSD when that was released.

Recently I was working on a CentOS Linux virtual machine and needed to look up the command-line options to “su”. I had worked for the past several years mostly on Macs where “sudo” is preferred, so my “su” skills were rusty. I ran “man su” and got the information I needed. Then at the bottom of the screen I sheepishly read “Written by David MacKenzie.”

In the 1990s, while filling in gaps in the GNU toolset, I wrote the GNU “su”, and I had forgotten about it. It’s still what Red Hat and other distributions are shipping.

At least I know what it does now.

Protecting Cable Service from Surges

February 9, 2012

I found out a few months ago that cable TV/Internet service is supposed to be grounded at the entrance to the building. I learned the hard way, when during two storms, the Comcast Business cable at my office was hit by surges (I suppose from lightning strikes somewhere exposed upstream). The surges killed our cable modem, which Comcast had to send a technician out to replace and reconfigure each time. That part cost us a day or so of downtime in each storm. Worse, the surges traveled down the Ethernet cable from the modem and destroyed other equipment. The first storm fried one Ethernet port in our firewall appliance, and the second strike killed all the Ethernet ports in our firewall appliance and a packet shaper rate limiter attached to it, equipment worth around $8,000 which we had to replace and make an insurance claim for.

After that, I did some research about what could be done. It appears that the National Electrical Code requires communications cable lines to be grounded at the building service entrance, as referenced in this Q&A from the New York State government and this Q&A from the Electrical Contractor Network. I am not an expert in the topic.

I came up with a two-pronged defense. The first was, we had Comcast send another technician out to ground the cable to an electrical panel where it enters our server room. He affirmed what I had read on the net, that the cable is supposed to be grounded at the building service entrance. He said that Comcast used to do it by driving a rod in the earth, but that now grounding to an electrical panel is preferred. He demonstrated the constant voltage differential between the two by touching the grounding wire against the splitter lug while the other end was screwed to the breaker panel; we saw little sparks arc.

The second prong of defense was to install an Ethernet surge protector on the CAT5 run between the cable modem and the new firewall, so even if a surge did hit the cable modem, it wouldn’t continue up the line to damage other equipment. We got the APC PNET1GB ProtectNet Standalone Surge Protector for 10/100/1000 Base – T Ethernet Lines for around $24 from Amazon. It uses a grounding wire run to an electrical outlet’s screw.

After getting the office taken care of, I implemented the same measures at home. We happen to have a Comcast-provided splitter where the cable enters our house, with a grounding lug on it, and a corner clamp for grounding already installed on the electrical meter box just above it. So all I needed to do was run a copper wire between them. I also got the Ethernet surge protector noted above to run between our cable modem and firewall/router.

So far, so good; no damage during storms at either place. It’s sad that Comcast doesn’t consistently protect customer lines when they do an install, though. If you have a cable line that isn’t grounded, consider calling your cable provider and asking them to send someone out to do it, and/or install an Ethernet surge protector yourself.

Here are some pictures of the installation at home.

Grounding cable run

Grounding clamp on electrical box

Grounding lug on cable splitter

Using Removable Drives on Windows

April 10, 2011

In the last few months, I’ve been using USB and Firewire hard drives (and flash drives) on Microsoft Windows more than I used to. Getting them to work well is not as simple as it is on MacOS X.

Below I refer to running the Computer Management console. You can run it by right-clicking My Computer (XP, Server 2003) or Computer (7, Server 2008R2), which is either on the Start menu or on the desktop, and selecting Manage. Or you can find it in the Control Panel under Administrative Tools. In Computer Management, go to Disk Management, under the Storage category in the left sidebar.

Here are a few things I’ve learned about working with removable drives on Windows.

  1. How to safely eject a removable drive on Windows? On MacOS X, there’s a little eject button next to the drive in the Finder, or you can drag the icon from the desktop to the trash can, or right-click on it and select Eject. On Windows, a little Safely Remove Hardware icon appears in the system tray, but sometimes it’s hidden. And on Windows XP, if you have multiple removable devices plugged in, it’s hard to figure out which is which because the descriptions are so generic. On Windows 7 and Server 2008R2 it shows you more details about each device.
  2. By default, throughput of removable drives on Windows is only around half of what the hardware is capable of. Because it’s so hard to figure out how to safely remove the drives in Windows, the default setting is to optimize for safety, so you can just unplug the drive without needing to worry about flushing buffer caches. If you’re willing to use the Safely Remove Hardware mechanism, you can roughly double the drive’s performance. In Computer Management, right-click on the drive name and select Properties, go to the Policies tab, and select Optimize for performance. You have to do this for each different removable drive you plug into the PC; there doesn’t appear to be a way to make it the default, e.g. through a registry edit.
  3. Windows 7 comes with multiple Firewire drivers. You can select a driver in the Device Manager in the Properties box for the Firewire adapter, Driver tab, Update Driver button. To run the Device Manager, on Windows 7 you can search for it in the Control Panel; on Windows XP, right-click on My Computer, select Properties, Hardware tab, Device Manager button. Easy to find, right? The default Windows 7 Firewire driver works poorly; it is very slow and incompatible with many devices. You can also select the “Legacy” Windows XP style driver, but it’s missing some features (especially good Firewire 800, a.k.a. 1394b, support). You might also have the option of selecting a driver from your Firewire chipset’s manufacturer, such as LSI or Texas Instruments; in my experience, those work better than Microsoft’s drivers. Also better than either of the Microsoft drivers is the Unibrain ubCore Firewire driver. It gives better transfer speeds and higher reliability than other Windows Firewire drivers I’ve tried. It supports all the Firewire cards I’ve tried it with, not just the ones Unibrain makes. It’s a free download although you have to enter your email address for the link. It comes with a utility to switch between Unibrain’s Firewire drivers and Microsoft’s.
  4. Speaking of Unibrain, they do make some of the best Firewire controller cards. They maximize performance by using a chipset that is native PCI Express, not PCI or a bridge to a PCI chip like many others. I recommend the FireBoard800-e V.2 1394b PCI-Express adapter (for desktops) and FireCard800-e 1394b ExpressCard 34 adapter (for laptops with ExpressCard slots). I get them from industrialcomponent.com. They work on Mac Pro and MacBook Pro computers with those slots (using the built-in Apple drivers) as well as on Windows PCs.
  5. Drive letters, the ridiculous legacy of MS-DOS being a copy of CP/M, can cause problems on Windows, especially in the presence of mapped network shares. If you have several removable drives plugged in, Windows might start assigning them drive letters that are already used by mapped network shares, hiding the network shares. Then you have to manually assign the drive a different drive letter to resolve the conflict. In Computer Management, right-click on the drive partition and select Change Drive Letter and Paths.
  6. If you get a hard drive that’s pre-formatted for Windows, it might use the NTFS file system or it might use FAT32. If you’ll be using the drive only on Windows, make sure it’s formatted with NTFS, which supports files larger than 4GB, and is faster and much less likely to corrupt your files, especially if the power fails and you don’t have a battery backup. If you need to use the drive to transfer files between Windows and Mac systems, it’s easiest to do it using FAT32, because Macs can read but not write NTFS file systems. However, there are several add-on products that allow Macs to write to NTFS, including the free NTFS-3G, which I’ve used occasionally and haven’t had problems with. You can reformat a drive in Computer Management; right-click on the partition and select Format. If you use a drive mainly on Macs, you can buy MacDrive to allow Windows to read and write Mac HFS formatted drives.

Follow

Get every new post delivered to your Inbox.

Join 85 other followers